Re: Any objectsions to enhancing git-log to show tags/branch heads?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Theodore Ts'o" <tytso@xxxxxxx> writes:

> I've recently noticed that I'm often firing up gitk for no other purpose
> than to see which changesets have which tags and branch heads.  Often
> I'll fire up gitk, quickly look at the tags/branches, and then kill it
> before it's done parsing the repository, resulting in python errors as
> it dies.
>
> So I'm wondering why we haven't arranged to have git-log show this
> information, and whether there would be any objections if "git-log"
> showed something like this:
> ...
> The only reason why I could imagine not doing this by default would be a
> potential performance problem if there were thousands of heads or branch
> heads.

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'?

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

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

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.

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?  What I am wondering is:

 (a) you have a handful specific commit IDs and wondering what
     they are, relative to known anchoring points.

     If this is the case, git-describe and git-name-rev may be
     your friend.

 (b) whenever you are browsing random part of history, you often
     wonder which ones are tagged or at the tip.  Browsing "git
     log" output does not give the visual cue of anchoring
     points like "gitk" output does, which annoys you.

     A code-free way to help with this is:

       $ git log | git -p name-rev --stdin

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]