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

Re: [PATCH v5 3/3] cat-file: add --follow-symlinks to --batch

From
Junio C Hamano <gitster@pobox.com>
Date
May 14, 2015, 20:06 UTC
Message-ID
<xmqqiobukjow.fsf@gitster.dls.corp.google.com>
In-Reply-To
<1431455779.16652.20.camel@ubuntu>
David Turner <dturner@twopensource.com> writes:
Show 10 quoted lines
> On Tue, 2015-05-12 at 11:07 -0700, Junio C Hamano wrote:
>
>>  * Is it fundamental that this is only for --batch family, or is it
>>    just lack of need by the current implementor and implementation?
>>    "git cat-file --follow-symlinks blob :RelNotes" does not sound
>>    a nonsense request to me.
>
> The reason that --follow-symlinks doesn't work for non-batch requests is
> that it is impossible to distinguish out-of-tree symlinks from valid
> output in non-batch output. I will add text explaining this. 

Actually, I do not think that is a valid reason not to consider supporting "git cat-file --follow-symlinks blob :RelNotes" in future versions of Git. "--batch" and "--batch-check" needs to continue, so it needs to give diagnosis in-line in its output and let the driving script continue talking with it, but a single-shot request "git cat-file --follow-symlinks blob :RelNotes" can signal that the link does not resolve in-tree (or in-index) by erroring out.

So I still view it as "we currently do not need it outside --batch; if somebody wants to, feel free to add it to non-batch mode". It does not have to be called a bug but I would say it is a missing feature. And not handling an in-index path e.g. :RelNotes falls into the same category, I would say.

Just to avoid misunderstanding, I still think this series (at its 9th iteration) is good from the point of new feature without filling these two missing features.

Previous: David Turner
Message 20 of 20 in “cat-file --follow-symlinks”
  1. 0/3 cat-file --follow-symlinksdturner@twopensource.com, May 11, 2015
  2. 1/3 tree-walk: learn get_tree_entry_follow_symlinksdturner@twopensource.com, May 11, 2015
  3. Johannes SixtMay 12, 2015
  4. 2/3 sha1_name: get_sha1_with_context learns to follow symlinksdturner@twopensource.com, May 11, 2015
  5. 3/3 cat-file: add --follow-symlinks to --batchdturner@twopensource.com, May 11, 2015
  6. Johannes SixtMay 12, 2015
  7. Junio C HamanoMay 12, 2015
  8. David TurnerMay 12, 2015
  9. Junio C HamanoMay 12, 2015
  10. David TurnerMay 12, 2015
  11. Junio C HamanoMay 12, 2015
  12. Junio C HamanoMay 12, 2015
  13. David TurnerMay 12, 2015
  14. Junio C HamanoMay 12, 2015
  15. Junio C HamanoMay 12, 2015
  16. Junio C HamanoMay 12, 2015
  17. David TurnerMay 12, 2015
  18. Junio C HamanoMay 12, 2015
  19. David TurnerMay 12, 2015
  20. Junio C HamanoMay 14, 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.