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

Re: very slow cherry-pick'ing (old-2.6-bkcvs tree)

From
Shawn O. Pearce <spearce@spearce.org>
Date
Sep 7, 2007, 04:42 UTC
Message-ID
<20070907044223.GW18160@spearce.org>
In-Reply-To
<200709062351.l86NpnAK004807@agora.fsl.cs.sunysb.edu>
Erez Zadok <ezk@cs.sunysb.edu> wrote:
Show 8 quoted lines
> Our group maintains Unionfs on the latest -rc kernel, but we also maintain
> several backports going all the way to 2.6.9.  Once we complete the
> development and testing of a feature/fix in -latest, we cherry-pick those
> commits to older backports, and test those.  When I cherry-pick from -latest
> to my 2.6.{22,21,20,19,18} repositories, it works reasonably fast.  But when
> I cherry-pick to my 2.6.9 tree, it runs about 20 times slower!  Why?  Is
> there anything I can do to inspect what's going on and perhaps speed up the
> cherry-picking process?
I'm guessing its due to rename detection.

git-cherry-pick is implemented in terms of git-merge-recursive, which always does rename detection when files are deleted or added. This can take some considerable time if there's a lot of files that have been added/deleted.

What would probably be faster would be to dump the patches in question using git-format-patch and then apply them using git-am. This bypasses the rename detection as it is using strictly a diff and an apply.

-- 
Shawn.
Previous: Erez ZadokNext: Johannes Sixt
Message 2 of 3 in “very slow cherry-pick'ing (old-2.6-bkcvs tree)”
  1. Erez ZadokSep 6, 2007
  2. Shawn O. PearceSep 7, 2007
  3. Johannes SixtSep 7, 2007

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.