All of lore.kernel.org
 help / color / mirror / Atom feed
* untracked symlinks are less precious than untracked files?
@ 2011-02-02 19:25 Johannes Sixt
  2011-02-02 20:03 ` Junio C Hamano
  0 siblings, 1 reply; 14+ messages in thread
From: Johannes Sixt @ 2011-02-02 19:25 UTC (permalink / raw)
  To: git

While I was poking around in t6035-merge-dir-to-symlink.sh, I noticed this:

diff --git a/t/t6035-merge-dir-to-symlink.sh b/t/t6035-merge-dir-to-symlink.sh
index 92e02d5..46b401b 100755
--- a/t/t6035-merge-dir-to-symlink.sh
+++ b/t/t6035-merge-dir-to-symlink.sh
@@ -5,21 +5,22 @@ test_description='merging when a directory was replaced with 
a symlink'
 
 test_expect_success SYMLINKS 'create a commit where dir a/b changed to 
symlink' '
 	mkdir -p a/b/c a/b-2/c &&
 	> a/b/c/d &&
 	> a/b-2/c/d &&
 	> a/x &&
 	git add -A &&
 	git commit -m base &&
 	git tag start &&
 	rm -rf a/b &&
-	ln -s b-2 a/b &&
+	# ln -s b-2 a/b &&
+	>a/b &&
 	git add -A &&
 	git commit -m "dir to symlink"
 '
 
 test_expect_success SYMLINKS 'keep a/b-2/c/d across checkout' '
 	git checkout HEAD^0 &&
 	git reset --hard master &&
 	git rm --cached a/b &&
 	git commit -m "untracked symlink remains" &&
 	 git checkout start^0 &&

With this change, where a symlink is replaced by a regular file, the 'git 
checkout start^0' fails. At this time, a/b is untracked. When it is a 
symlink, it is replaced by a directory. When it is a file, the test fails:

error: The following untracked working tree files would be overwritten by 
checkout:
        a/b

Is it by design that symlinks are less precious than files, or is it an 
oversight?

-- Hannes

^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2011-02-22 20:02 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-02 19:25 untracked symlinks are less precious than untracked files? Johannes Sixt
2011-02-02 20:03 ` Junio C Hamano
2011-02-02 22:24   ` Johannes Sixt
2011-02-05 18:18     ` [PATCH] Demonstrate breakage: checkout overwrites untracked symlink with directory Johannes Sixt
2011-02-05 18:33       ` Clemens Buchacher
2011-02-09 23:48         ` Junio C Hamano
2011-02-10 21:49           ` Clemens Buchacher
2011-02-20 12:13         ` [PATCH] do not overwrite untracked symlinks Clemens Buchacher
2011-02-21  7:15           ` Junio C Hamano
2011-02-21 19:46             ` Clemens Buchacher
2011-02-22  6:54               ` Junio C Hamano
2011-02-22 19:26                 ` Clemens Buchacher
2011-02-22 20:01                   ` Junio C Hamano
2011-02-15  7:24       ` [PATCH] Demonstrate breakage: checkout overwrites untracked symlink with directory Johannes Sixt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.