git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Theodore Tso <tytso@mit.edu>
To: Junio C Hamano <junkio@cox.net>
Cc: git@vger.kernel.org
Subject: Re: Any objectsions to enhancing git-log to show tags/branch heads?
Date: Mon, 16 Apr 2007 16:46:59 -0400	[thread overview]
Message-ID: <20070416204659.GI27533@thunk.org> (raw)
In-Reply-To: <7vy7kstdom.fsf@assigned-by-dhcp.cox.net>

On Mon, Apr 16, 2007 at 10:46:33AM -0700, Junio C Hamano wrote:
> I cannot comment on performance impact without knowing exactly
> what semantics is being proposed.
> 
>  (1) If a commit is not directly pointed by any ref, would it
>      get HEAD: or TAG: line, perhaps ala 'git-describe'?

No.

>  (2) If a commit is at the tip of two branches, what happens?
>      Would it get two HEAD: lines?

Yup, I was assuming it would get two Head: lines, one for each head.

>  (3) Same question as (2) when a commit is tagged with two tags,
>      or at the tip of a branch and pointed by a tag.

Two tag: lines, one for each tag.  Mercurial's "hg log" does this
today, by the way, and I've found it to be very handy since it makes
it easier to find various tagged releases when browsing the revision
history.

> As to the impact on people's existing scripts that read git-log,
> I think changing --pretty=anything would cause breakage for
> somebody.  A new --pretty=format: tag would be the least
> destabilizing, but I dunno.

When I write my shell scripts and parse "Foo: " headers I always
explicitly grep out the headers I want, and assumin a blank line after
the headers, because I expect that future versions might add new
headers, and I want my code to be robust; but I can imagine there
might be some less-than-robust scripts out there....

> But the fact that you kill gitk before it stops drawing suggests
> that you are interested in recent commits only?  What is exactly the
> use case?

Well, usually what I'm interested in is near the tip, but not always.
In general, seeing the anchor points is part of the problem, and so
"git log | git -p name-rev --stdin" is useful, although it isn't as
useful as "gitk" when a revision has multiple HEAD or TAG's associated
with it, and git-name-rev doesn't know which one(s) would be of
greatest interest.

						- Ted

  reply	other threads:[~2007-04-16 20:47 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-16 12:45 Any objectsions to enhancing git-log to show tags/branch heads? Theodore Ts'o
2007-04-16 17:46 ` Junio C Hamano
2007-04-16 20:46   ` Theodore Tso [this message]
2007-04-16 18:13 ` Peter Baumann
2007-04-16 18:27   ` J. Bruce Fields
2007-04-17  5:07     ` Peter Baumann
2007-04-17 13:36       ` J. Bruce Fields
2007-04-16 19:01   ` Julian Phillips
2007-04-17  5:08     ` Peter Baumann
2007-04-16 23:00 ` Linus Torvalds
2007-04-17  2:21   ` Theodore Tso
2007-04-17  2:30     ` Jakub Narebski
2007-04-17  3:00       ` Linus Torvalds
2007-04-23 10:00         ` Junio C Hamano
2007-04-17  3:15       ` Theodore Tso

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=20070416204659.GI27533@thunk.org \
    --to=tytso@mit.edu \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    /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).