git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v3] add --abbrev to 'git cherry'

From
Stephen Boyd <bebarino@gmail.com>
Date
May 31, 2009, 04:53 UTC
Message-ID
<4A220D65.4040708@gmail.com>
In-Reply-To
<7v63fiyyrz.fsf@alter.siamese.dyndns.org>
Junio C Hamano wrote:
Show 20 quoted lines
> Stephen Boyd <bebarino@gmail.com> writes:
>> You might want to look at using the parse options API. It has options
>> for verbose and abbrev builtin, so you don't have to do any extra
>> work....
>
> Why do people even think a change like this to a _plumbing_ command is
> desirable?
>
> Admittedly, there already is "verbose" option that adds redundant
> information to the output of this particular plumbing, which might
> arguably be equally wrong as what this patch does, but I think it is
> excusable.  At least it lets the Porcelain script that uses the command
> avoid calling 'git cat-file commit' to find out the title of the commit.
>
> But --abbrev does not even add any information.  If implemented correctly
> (which earlier iteration did not even do), it may not lose information by
> choping the output too short to make it ambiguous, but as others pointed
> out about using grep in the calling Porcelain to filter (or more likely,
> sift the lines into "+" and "-" bins) to shoot down -d/-D options, I do
> not see the point of adding --abbrev to this plumbing command very much.

I was tempted to say the same thing, but I decided to leave it up to the maintainer ;-) Maybe if there was a compelling use case it would make more sense?

Or, would it make more sense to just use git-log? Right now you can do git log --oneline --cherry-pick <head>..<upstream> and get close. Maybe we can add a "--cherry" option to git-log which will act like git-cherry by finding unmerged commits?

Previous: Junio C HamanoNext: Jeff Epler
Message 8 of 9 in “add --abbrev to 'git cherry'”
  1. add --abbrev to 'git cherry'Jeff Epler, May 30, 2009
  2. Markus HeidelbergMay 30, 2009
  3. add --abbrev to 'git cherry'Jeff Epler, May 30, 2009
  4. Stephen BoydMay 30, 2009
  5. Junio C HamanoMay 30, 2009
  6. Markus HeidelbergMay 30, 2009
  7. Junio C HamanoMay 31, 2009
  8. Stephen BoydMay 31, 2009
  9. Jeff EplerJun 1, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.