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

Re: [JGIT PATCH] Create a debugging tool "jgit rebuild-commitgraph"

From
Shawn O. Pearce <spearce@spearce.org>
Date
Mar 13, 2009, 14:52 UTC
Message-ID
<20090313145250.GD22920@spearce.org>
In-Reply-To
<alpine.DEB.1.00.0903131549200.6288@intel-tinevez-2-302>
Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
Show 17 quoted lines
> On Fri, 13 Mar 2009, Shawn O. Pearce wrote:
> 
> > This is a command line tool which can be used to import only
> > the commit graph of another Git repository, to help debug a
> > topology related bug, without actually needing a clone of the
> > problematic repository.
> > 
> > Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
> > ---
> > 
> >  I used this yesterday to obtain a DAG from someone's private
> >  repository and recreate the same structure on my own system,
> >  to debug why RevWalk was busted in their case.
> 
> Heh:
> 
> http://repo.or.cz/w/git/dscho.git?a=blob;f=my-fake-history.sh;h=e108ce99a5ebd75230c3cfc56b88d9769fec8bc1;hb=master

Heh. I knew both you and Nico have written something like this in the past, but I couldn't find it.

Your script is almost what I needed. But I also needed to force GIT_COMMITTER_DATE to match the timestamp, as I suspected the commit times had something to do with the problem I was seeing.

I also whack the entire ref space to match the source repository, which mattered because I was trying to debug:

  git rev-list $insha1 --not --all
in JGit...
-- 
Shawn.
Previous: Johannes SchindelinNext: Robin Rosenberg
Message 3 of 8 in “Create a debugging tool "jgit rebuild-commitgraph"”
  1. Create a debugging tool "jgit rebuild-commitgraph"Shawn O. Pearce, Mar 13, 2009
  2. Johannes SchindelinMar 13, 2009
  3. Shawn O. PearceMar 13, 2009
  4. Robin RosenbergMar 15, 2009
  5. Shawn O. PearceMar 16, 2009
  6. Robin RosenbergMar 16, 2009
  7. Shawn O. PearceMar 16, 2009
  8. Create a debugging tool "jgit debug-rebuild-commitgraph"Shawn O. Pearce, Mar 16, 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.