From: Junio C Hamano <gitster@pobox.com>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: git@vger.kernel.org
Subject: Re: RFH: git show HEAD:$SUBMODULE
Date: Thu, 05 Feb 2009 09:35:53 -0800 [thread overview]
Message-ID: <7vwsc4eqh2.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <alpine.DEB.1.00.0902051744520.7491@intel-tinevez-2-302> (Johannes Schindelin's message of "Thu, 5 Feb 2009 17:46:51 +0100 (CET)")
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> at the moment, 'show HEAD:$SUBMODULE' fails horribly, as git-show abuses
> the revision walker to parse the command line parameters, and the revision
> walker does not like a non-existing commit.
>
> Instead, it would be nicer to show the user something like
>
> HEAD:$SUBMODULE
> submodule at commit $COMMIT_NAME
>
> However, I have no clue how to go about getting that. I want to avoid
> having to parse the parameters twice, but I also do not want to fsck up
> the revision walker...
>
> Ideas?
This is not an idea but it falls into the same category as handling this
in a way different from the current code.
$ cd Documentation
$ git show HEAD:git.txt
You really shouldn't letting revision machinery to parse it if you want to
see these work in the way you want, because both in your example and in
the often asked-for "relative to cwd" example, what you are *asking for*
is not just an object name, but you are using the mechanism that is meant
to be used for one.
I personally think reusing the "object name" syntax for either of the
above usages is a mistake, though. If HEAD:$submodule_path is a notation
for naming an object (which happens to resolve to a commit) and HEAD:git.txt
is a notation for naming a blob object that is found at the top level of
the tree-ish that can be called HEAD, they should retain the same meaning
throughout the system and "git show" shouldn't be messing with the
semantics of the notation.
prev parent reply other threads:[~2009-02-05 17:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-05 16:46 RFH: git show HEAD:$SUBMODULE Johannes Schindelin
2009-02-05 17:35 ` Junio C Hamano [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vwsc4eqh2.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
/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.
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 NNTP newsgroup(s).