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

Re: [PATCH 1/3] revlist.c: introduce --cherry for unsymmetric picking

From
Jay Soffian <jaysoffian@gmail.com>
Date
Feb 19, 2011, 14:47 UTC
Message-ID
<AANLkTinGkT0AJ6qeGi_z7Ck8wWM-jriUTqjDPvumjRwB@mail.gmail.com>
In-Reply-To
<7vzkptnn7x.fsf@alter.siamese.dyndns.org>
On Fri, Feb 18, 2011 at 2:42 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 8 quoted lines
> By the way, when this feature is properly implemented internally at the
> revision traversal level, we should be able to lose quite a lot of code
> from builtin/log.c, as format-patch in it was the original implementation
> of the whole thing, and it was done outside the revision walking machinery
> to implement patch equivalence filtering of the traversal result.  We
> would essentially feed the symmetric upstream...HEAD range with the
> cherry-pick flag, ask it to give only the right hand side (i.e. what are
> left after the patch equivalence filter), and emit the result.
Tangent: it occurred to me it would be useful to give the user some
say in how the patch-id is computed. Currently, the patch-id is the
hash of the diff hunks, which is very strict.

I think it would be useful to have a "loose" mode of computing the patch-id. What I was thinking was to use the hash of certain commit metadata that is likely to be unique: say, the commit authorship (name, email, timestamp) + commit subject and/or body.

This would allow rev-list to (optionally) filter out commits that, modulo conflict resolution, introduce the "same" change. IOW, give the user of rev-list some say about what a "same" commit is.

(I suppose this is my itch to scratch.) :-)
j.
Previous: Junio C HamanoNext: Michael J Gruber
Message 5 of 15 in “revlist.c: introduce --cherry for unsymmetric picking”
  1. 1/3 revlist.c: introduce --cherry for unsymmetric pickingMichael J Gruber, Feb 18, 2011
  2. 2/3 t6007: Make sure we test --cherry-pickMichael J Gruber, Feb 18, 2011
  3. 3/3 rev-list: documentation and test for --cherryMichael J Gruber, Feb 18, 2011
  4. Junio C HamanoFeb 18, 2011
  5. Jay SoffianFeb 19, 2011
  6. Michael J GruberFeb 21, 2011
  7. 1/2 revlist.c: introduce --left/right-only for unsymmetric pickingMichael J Gruber, Feb 21, 2011
  8. Junio C HamanoFeb 22, 2011
  9. Junio C HamanoFeb 22, 2011
  10. Junio C HamanoFeb 22, 2011
  11. t6007: test rev-list --cherryMichael J Gruber, Feb 22, 2011
  12. 2/2 rev-list: documentation and test for --left/right-onlyMichael J Gruber, Feb 21, 2011
  13. Jay SoffianFeb 21, 2011
  14. Michael J GruberFeb 22, 2011
  15. Junio C HamanoFeb 21, 2011

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.