Re: [PATCH 08/10] revert: Introduce HEAD, TODO files to persist state, plan

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

 



Ramkumar Ramachandra wrote:

> is there some
> API I can use to avoid iterating over all the commits twice? Once to
> populate the commit_list to persist the TODO, and the second time to
> actually pick them?

Good catch.  (If I understand correctly this was a potential problem
with the previous iterations, too.)

So, before thinking about what APIs git provides, what is the desired
behavior?  It is possible to walk a revision list incrementally (like
"git log" does); should cherry-pick take advantage of that?

. If yes, the "todo list" would have to be in some form that can be
  updated incrementally (something like the original revision range
  with the commits already cherry-picked negated).  This sounds
  complicated to me.

. If no, the "todo list" needs to be fully resolved to start out, and
  then the cherry-pick loop can just walk through it.  In git API
  terms, that means first populating the commit_list (for example
  using a loop that gets revisions and inserts them at the end of a
  commit_list, or by preparing the revision walk with "limited" flag
  set), then walking through it with commit_list APIs.
--
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]