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

Re: [PATCH v2 2/3] sha1_name: get_sha1_with_context learns to follow symlinks

From
David Turner <dturner@twopensource.com>
Date
May 9, 2015, 20:34 UTC
Message-ID
<1431203670.24139.5.camel@ubuntu>
In-Reply-To
<xmqqlhgxhcqb.fsf@gitster.dls.corp.google.com>
On Sat, 2015-05-09 at 10:39 -0700, Junio C Hamano wrote:
Show 16 quoted lines
> Junio C Hamano <gitster@pobox.com> writes:
> 
> > dturner@twopensource.com writes:
> >
> >> From: David Turner <dturner@twitter.com>
> >>
> >> Wire up get_sha1_with_context to call get_tree_entry_follow_symlinks
> >> when GET_SHA1_FOLLOW_SYMLINKS is passed in flags. G_S_FOLLOW_SYMLINKS
> >> is incompatible with G_S_ONLY_TO_DIE because the diagnosis that
> >> ONLY_TO_DIE triggers does not consider symlinks.
> >
> > Is "does not consider" something fundamental, or it just happens to
> > be that way right now?
> 
> Regardless of the answer to this question, I find the last part of
> this hunk puzzling.

You're right -- this code is wrong, for the reasons you explain. I'm going to follow your earlier suggestion and use a strbuf for the new field.

Previous: Junio C HamanoNext: David Turner
Message 5 of 8 in “tree-walk: learn get_tree_entry_follow_symlinks”
  1. 1/3 tree-walk: learn get_tree_entry_follow_symlinksdturner@twopensource.com, May 8, 2015
  2. 2/3 sha1_name: get_sha1_with_context learns to follow symlinksdturner@twopensource.com, May 8, 2015
  3. Junio C HamanoMay 9, 2015
  4. Junio C HamanoMay 9, 2015
  5. David TurnerMay 9, 2015
  6. David TurnerMay 9, 2015
  7. 3/3 cat-file: add --follow-symlinks to --batchdturner@twopensource.com, May 8, 2015
  8. Junio C HamanoMay 9, 2015

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.