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

Re: [PATCH v2 0/4] Multiple subtree split fixes regarding complex repos

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 12, 2018, 07:35 UTC
Message-ID
<xmqqk1mnbosr.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<20181011194605.19518-1-rstrain@swri.org>
Roger Strain <rstrain@swri.org> writes:
> After doing some testing at scale, determined that one call was
> taking too long; replaced that with an alternate call which
> returns the same data significantly faster.
Curious where the time goes.  Do you know?
> Also, if anyone has any other feedback on these I'd really love to
> hear it. It's working better for us (as in, it actually generates

The previous one is already in 'next'; please make it incremental with explanation as to why "show -s" is worse than "log -1" (but see below).

>                 # processing commit without normal parent information;
>                 # fetch from repo
> -               parents=$(git show -s --pretty=%P "$rev")
> +               parents=$(git log --pretty=%P -n 1 "$rev")
If you want to learn the parents of a given commit:
	$ git help revisions
says
       <rev>^@, e.g. HEAD^@
           A suffix ^ followed by an at sign is the same as listing all parents of <rev>
           (meaning, include anything reachable from its parents, but not the commit
           itself).
so
		parents=$(git rev-parse "$rev^@")
ought to be the most efficient way to do this, I suspect.
Previous: Roger StrainNext: Roger Strain
Message 8 of 11 in “Multiple subtree split fixes regarding complex repos”
  1. 0/4 Multiple subtree split fixes regarding complex reposStrain, Roger L, Sep 28, 2018
  2. 3/4 subtree: use commits before rejoins for splitsStrain, Roger L, Sep 28, 2018
  3. 2/4 subtree: make --ignore-joins pay attention to addsStrain, Roger L, Sep 28, 2018
  4. 1/4 subtree: refactor split of a commit into standalone methodStrain, Roger L, Sep 28, 2018
  5. 4/4 subtree: improve decision on merges kept in splitStrain, Roger L, Sep 28, 2018
  6. 4/4 subtree: improve decision on merges kept in splitRoger Strain, Oct 11, 2018
  7. 0/4 Multiple subtree split fixes regarding complex reposRoger Strain, Oct 11, 2018
  8. Junio C HamanoOct 12, 2018
  9. 3/4 subtree: use commits before rejoins for splitsRoger Strain, Oct 11, 2018
  10. 2/4 subtree: make --ignore-joins pay attention to addsRoger Strain, Oct 11, 2018
  11. 1/4 subtree: refactor split of a commit into standalone methodRoger Strain, Oct 11, 2018

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.