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

Re: [RFC PATCH] Add "git show --follow-symlinks HEAD:symlink"

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Apr 9, 2018, 09:28 UTC
Message-ID
<87in90zq2a.fsf@evledraar.gmail.com>
In-Reply-To
<20180409090047.lfru2ul5fbnggfg7@bod>
On Mon, Apr 09 2018, Michael Vogt wrote:
Show 27 quoted lines
> I noticed that `git show HEAD:path-to-symlink` does not work and
> returns an error like:
> "fatal: Path 'debian/changelog' exists on disk, but not in 'HEAD'."
>
> Looking at `git show` it seems there is no way right now to make
> git-show show blobs if they are symlinks [1].
>
> It would be nice to have this ability. Attached is a draft patch to
> allow to write: `git show --follow-symlinks HEAD:path-to-symlink`.
> Tests are missing in the patch, I'm happy to add those if there is a
> chance for the feature to get in.
>
> Cheers,
>  Michael
>
> [1] Using `git cat-file --follow-symlinks --batch < input` works but
>     feels a bit less elegant compared to supporting it directly in
>     git-show.
> From 616b7f21c057656960cb6b8a266095bbef734122 Mon Sep 17 00:00:00 2001
> From: Michael Vogt <mvo@ubuntu.com>
> Date: Mon, 9 Apr 2018 10:38:13 +0200
> Subject: [PATCH] support: git show --follow-symlinks HEAD:symlink
>
> Add support for the `--follow-symlinks` options to git-show. This
> allows to write:
>
>     git show --follow-symlink HEAD:path-a-symlink

The patch looks reasonable, but please submit it as described in Documentation/SubmittingPatches, i.e. inline instead of as an attachment, and with a signed-off-by line etc. We'd also need some tests for this.

Previous: Michael VogtNext: Michael Vogt
Message 2 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.