git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Santi Béjar" <sbejar@gmail.com>
Cc: "Shawn O. Pearce" <spearce@spearce.org>, git@vger.kernel.org
Subject: Re: [PATCH] Teach git-describe --long to output always the long format
Date: Tue, 26 Feb 2008 01:19:35 -0800	[thread overview]
Message-ID: <7vy7986pnc.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: 8aa486160802251251u74a19b93l77ca3930d2387cb8@mail.gmail.com

"Santi Béjar" <sbejar@gmail.com> writes:

>>  Why can't you solve it?  Your example of two people giving the
>>  same name to different things shows a lack of communication
>>  between developers, and as long as you and the other guy are
>>  talking with each other the problem can be solved, can't it?
>
> But there are times when you can't/don't want to communicate
> (private/testing/forks, whatever).
>
> Anyway, even if this problem is solved I feel more confortable
> with a version in my binary (and output) with a descriptive
> name and a revision id.

As I think about it more, I think that such a lack of communication is
not something "git describe" should even claim to help working around.

But a uniform-looking describe output does have certain
attractiveness:

	$ git describe --long 31e0b2c 6c0f869
        v1.5.4.3-0-g31e0b2c
        v1.5.4.3-1-g6c0f869

So I have quite a big problem with your commit log message, even
though I am starting to like what it does.  Perhaps this would be more
to the point.

    git-describe: --long shows the object name even for a tagged commit
    
    This is useful when you want to see parts of the commit object name
    in "describe" output, even when the commit in question happens to be
    a tagged version.  Instead of just emitting the tag name, it will
    describe such a commit as v1.2-0-deadbeef (0th commit since tag v1.2
    that points at object deadbeef....).

By the way, I do not think "long" is what it does.  It does not even
show the full object name unless you tell it to with another option
(i.e. --abbrev).  The flag tells the command to use the normal output
format that is used to describe most other commits (untagged ones),
and signal the "taggedness" with the count part being "-0-".

Perhaps --nonexact-format, or even --redundant-output?

Hmmmmm...  "--always-count", as it is about always using the counted
format (which is the "normal" output format)?

I know, I am bad at naming, so I'll park the commit in 'pu',
with option name kept as "--long" as in your patch.

  reply	other threads:[~2008-02-26  9:20 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-24 14:46 [PATCH] Teach git-describe --long to output always the long format Santi Béjar
2008-02-25  2:36 ` Shawn O. Pearce
2008-02-25  3:08   ` Junio C Hamano
2008-02-25  8:34     ` Santi Béjar
2008-02-25  8:54       ` Junio C Hamano
2008-02-25  9:05         ` Santi Béjar
2008-02-25 20:11           ` Junio C Hamano
2008-02-25 20:51             ` Santi Béjar
2008-02-26  9:19               ` Junio C Hamano [this message]
2008-02-26  9:41                 ` Santi Béjar
2008-02-25  8:50     ` Jakub Narebski
2008-02-25  9:43 ` Santi Béjar

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=7vy7986pnc.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=sbejar@gmail.com \
    --cc=spearce@spearce.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).