git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Michael Vogt <mvo@ubuntu.com>
Cc: git@vger.kernel.org
Subject: Re: [RFC PATCH] Add "git show --follow-symlinks HEAD:symlink"
Date: Mon, 09 Apr 2018 11:28:45 +0200	[thread overview]
Message-ID: <87in90zq2a.fsf@evledraar.gmail.com> (raw)
In-Reply-To: <20180409090047.lfru2ul5fbnggfg7@bod>


On Mon, Apr 09 2018, Michael Vogt wrote:

> 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.

  reply	other threads:[~2018-04-09  9:28 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-09  9:00 [RFC PATCH] Add "git show --follow-symlinks HEAD:symlink" Michael Vogt
2018-04-09  9:28 ` Ævar Arnfjörð Bjarmason [this message]
2018-04-13  9:43   ` Michael Vogt
2018-04-13 17:28     ` Stefan Beller
2018-04-13 17:48       ` Michael Vogt
2018-04-13 19:33         ` Ævar Arnfjörð Bjarmason
2018-04-13 19:48           ` [PATCH] support: git show --follow-symlinks HEAD:symlink Michael Vogt
2018-04-13 21:03             ` Ævar Arnfjörð Bjarmason
2018-04-16  9:36               ` [PATCH v2] show: add --follow-symlinks option for <rev>:<path> Michael Vogt
2018-04-16  9:36                 ` [PATCH] " Michael Vogt
2018-04-16 23:05                   ` Junio C Hamano
2018-04-13 19:55           ` [RFC PATCH] Add "git show --follow-symlinks HEAD:symlink" Michael Vogt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87in90zq2a.fsf@evledraar.gmail.com \
    --to=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=mvo@ubuntu.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).