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

Re: [PATCH] show: add --follow-symlinks option for <rev>:<path>

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 16, 2018, 23:05 UTC
Message-ID
<xmqqin8qwy4z.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<20180416093625.15752-2-mvo@ubuntu.com>
Michael Vogt <mvo@ubuntu.com> writes:
> Add a --follow-symlinks option that'll resolve symlinks to their
> targets when the target is of the form <rev>:<path>.

This not only affects "show" but all in the "log" family of commands, because the change is made to revision.[ch] that is shared by them. I doubt that is desirable.

I offhand do not think of any command other than "show", to which this feature makes any sense [*1*]. And I certainly do not mind if the feature is limited to "show" and nothing else for that reason.

But I do mind the implementation that seeps through to other commands (because "log_init_finish()" is shared with commands in the family other than "show", and because "struct rev_info" is shared across all the commands in the "log" famil) and not limited to "show", which is a sign of typical end-user confusion waiting to happen.

Thanks.
[Footnote]

For example, "git log" is affected by this patch but I am not sure what it even means that we can ask this question:

	$ git log -p --follow-symlinks -- RelNotes

Can we see how each update to Documentation/RelNotes/2.17.0.txt as well as change of RelNotes symlink from 2.17.0.txt to 2.18.0.txt in the patch form? If that were the case, it might make some sense to allow the feature to be triggered by "git log" like your change to builtin/log.c did, but I somehow do not think that is what your patch does.

Previous: Michael VogtNext: Michael Vogt
Message 11 of 12 in “Add "git show --follow-symlinks HEAD:symlink"”
  1. Add "git show --follow-symlinks HEAD:symlink"Michael Vogt, Apr 9, 2018
  2. Ævar Arnfjörð BjarmasonApr 9, 2018
  3. Michael VogtApr 13, 2018
  4. Stefan BellerApr 13, 2018
  5. Michael VogtApr 13, 2018
  6. Ævar Arnfjörð BjarmasonApr 13, 2018
  7. support: git show --follow-symlinks HEAD:symlinkMichael Vogt, Apr 13, 2018
  8. Ævar Arnfjörð BjarmasonApr 13, 2018
  9. show: add --follow-symlinks option for <rev>:<path>Michael Vogt, Apr 16, 2018
  10. show: add --follow-symlinks option for <rev>:<path>Michael Vogt, Apr 16, 2018
  11. Junio C HamanoApr 16, 2018
  12. Michael VogtApr 13, 2018

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.