Skip Menu |

This queue is for tickets about the Git-FastExport CPAN distribution.

Report information
The Basics
Id: 123316
Status: open
Priority: 0/
Queue: Git-FastExport

People
Owner: Nobody in particular
Requestors: daniel.hammer+oss [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.107
Fixed in: (no value)



Subject: git-stitch-repo missing commits
I've attempted to use git-stitch-repo to combine 2 git repositories containing 881 commits in total. But when stitching the repositories together, the total commit count drops below the expected 881 in total. Also unexpected is the total number of commits seems to be dependent on which branch is checked out, see details below. Steps to reproduce 1. clone repositories ~/tmp$ git clone https://github.com/grails-plugins/grails-cache.git ~/tmp$ git clone https://github.com/grails-plugins/grails-quartz.git 2. determine total number of commits in the orginal repositories ~/tmp/grails-cache$ git rev-list --count HEAD 387 ~/tmp/grails-quartz$ git rev-list --count HEAD 494 3. stitch repositories 3.1 stitch grails-cache grails-quartz ~/tmp$ mkdir cache_quartz && cd cache_quartz ~/tmp/cache_quartz$ git init ~/tmp/cache_quartz$ git-stitch-repo ../grails-cache ../grails-quartz | git fast-import 3.1.1 verify total number of commits ~/tmp/cache_quartz$ git checkout master-grails-cache ~/tmp/cache_quartz$ git rev-list --count HEAD 556 Seems 325 commits are missing ~/tmp/cache_quartz$ git checkout master-grails-quartz ~/tmp/cache_quartz$ git rev-list --count HEAD 753 Seems 128 commits are missing Note: order of repository arguments to git-stitch-repo doesn't affect final result.
From: daniel.hammer+oss [...] gmail.com
On Wed Oct 18 04:43:43 2017, https://launchpad.net/~daniel-hammer wrote: Show quoted text
> I've attempted to use git-stitch-repo to combine 2 git repositories > containing 881 commits in total. > But when stitching the repositories together, the total commit count > drops below the expected 881 in total. Also unexpected is the total > number of commits seems to be dependent on which branch is checked > out, see details below. > > Steps to reproduce > > 1. clone repositories > ~/tmp$ git clone https://github.com/grails-plugins/grails-cache.git > ~/tmp$ git clone https://github.com/grails-plugins/grails-quartz.git > > 2. determine total number of commits in the orginal repositories > ~/tmp/grails-cache$ git rev-list --count HEAD > 387 > ~/tmp/grails-quartz$ git rev-list --count HEAD > 494 > > 3. stitch repositories > > 3.1 stitch grails-cache grails-quartz > > ~/tmp$ mkdir cache_quartz && cd cache_quartz > ~/tmp/cache_quartz$ git init > ~/tmp/cache_quartz$ git-stitch-repo ../grails-cache ../grails-quartz | > git fast-import > > 3.1.1 verify total number of commits > ~/tmp/cache_quartz$ git checkout master-grails-cache > ~/tmp/cache_quartz$ git rev-list --count HEAD > 556 > > Seems 325 commits are missing > > > ~/tmp/cache_quartz$ git checkout master-grails-quartz > ~/tmp/cache_quartz$ git rev-list --count HEAD > 753 > > Seems 128 commits are missing > > Note: order of repository arguments to git-stitch-repo doesn't affect > final result.
Known work-around; use https://github.com/robinst/git-merge-repos#preserve-history-for-paths instead. Utilizing git-merge-repos results in a similar directory structure and 882 commits - there's a final merge-commit.