Re: [PATCH] do not overwrite untracked symlinks
- From
Clemens Buchacher <drizzd@aon.at>
- Date
- Feb 21, 2011, 19:46 UTC
- Message-ID
- <20110221194623.GA31181@localhost>
- In-Reply-To
- <7vaahpluy9.fsf@alter.siamese.dyndns.org>
Hi Junio,
On Sun, Feb 20, 2011 at 11:15:26PM -0800, Junio C Hamano wrote:
Show 7 quoted lines
> > The title of the test says that checkout must keep a/b-2/c/d; if "git > checkout" without "-f" doesn't do so and you had to change it to "git > checkout -f", it would mean one of two things: (1) you broke "checkout", > or (2) the behaviour the test wanted to keep working turned out to be > unwanted (iow, "git checkout" without "-f" should fail under the initial > condition this test sets up).
I didn't write the test, but to me it looks like the test wants to make sure that while the symlink is removed, the tree it's pointing to is not removed. I am not sure why that was ever a concern. But by adding -f the test stays the same, except for the fact that it is now forcefully overwriting a symlink, which could be done silently before.
But I am fine with removing the test if you think it's meaningless. And Hannes posted a number of tests for "symlink preservation" earlier in this thread:
http://mid.gmane.org/201102051918.44848.j6t@kdbg.org
We should rename the test to 2020, since 2019 is by now already taken. But otherwise I think the tests are fine as-is. I also used them to test my patch.
Clemens