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.