Re: [PATCH] rev-list: honor --abbrev=<n> when doing --pretty=oneline
- From
- Eric Wong <normalperson@yhbt.net>
- Date
- Apr 7, 2006, 03:13 UTC
- Message-ID
- <20060407031356.GA25525@hand.yhbt.net>
- In-Reply-To
- <7v64lmuqa5.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano <junkio@cox.net> wrote:
Show 27 quoted lines
> Eric Wong <normalperson@yhbt.net> writes: > > > Note that --abbrev=DEFAULT_ABBREV was on by default before, but > > it only affected the printing of the Merge: header). Let me > > know if anybody doesn't want the default behavior to change. > > I've never felt need for abbreviating commit object names, so I > only had the abbrev variable to determine how the merge parents > are shown. If you want to abbreviate the commit object names as > well, you _could_ do independent precision for parents and > commits, but that would be overkil. So I'd rather see a switch > to turn abbreviation for commits on, perhaps like this: > > $ git-rev-list --pretty=oneline --abbrev-commit -n 3 master > 454a35b Add documentation for git-imap-send. > ba3c937 blame.c: fix completely broken ancestry traversal. > 6cbd5d7 Tweaks to make asciidoc play nice. > > $ git-rev-list --pretty=oneline --abbrev=4 --abbrev-commit -n 3 master > 454a Add documentation for git-imap-send. > ba3c9 blame.c: fix completely broken ancestry traversal. > 6cbd5 Tweaks to make asciidoc play nice. > > Otherwise you might break Porcelains and people's scripts that > read from --pretty or --header output. > > -- >8 --
Sounds good, I like your patch. I'm not thrilled with the length of the '--abbrev-commit' switch, but I guess that's what aliases are for :>
-- Eric Wong