git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: Junio C HamanoNext: Junio C Hamano
Message 10 of 14 in “untracked symlinks are less precious than untracked files?”
  1. Johannes SixtFeb 2, 2011
  2. Junio C HamanoFeb 2, 2011
  3. Johannes SixtFeb 2, 2011
  4. Demonstrate breakage: checkout overwrites untracked symlink with directoryJohannes Sixt, Feb 5, 2011
  5. Clemens BuchacherFeb 5, 2011
  6. Junio C HamanoFeb 9, 2011
  7. Clemens BuchacherFeb 10, 2011
  8. do not overwrite untracked symlinksClemens Buchacher, Feb 20, 2011
  9. Junio C HamanoFeb 21, 2011
  10. Clemens BuchacherFeb 21, 2011
  11. Junio C HamanoFeb 22, 2011
  12. Clemens BuchacherFeb 22, 2011
  13. Junio C HamanoFeb 22, 2011
  14. Johannes SixtFeb 15, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.