On 20 August 2015 at 19:23, Jeff Law wrote: > On 08/20/2015 11:57 AM, Jason Merrill wrote: >> >> I hear that at Cauldron people were generally supportive of switching >> over to git as the primary GCC repository, and talked about me being >> involved in that transition. Does anyone have more information about >> this discussion? >> >> Our current workflow translates over to a git master pretty easily: >> basically, in the current git-svn workflow, replace git svn rebase and >> git svn dcommit with git pull --rebase and git push. > > Right. > >> >> It should be pretty straightforward to use the existing git mirror as >> the master repository; the main adjustment I'd want to make is rewriting >> the various subdirectory branches to be properly represented in git. >> This is straightforward, but we'll want to stop SVN commits to >> subdirectory branches shortly before the changeover. > > Seems reasonable. > > I think we also need to convert our SVN hooks into git hooks, but presumably > that'll be easy. > > I suspect Jakub will strongly want to see some kind commit hook to associate > something similar to an SVN id to each git commit to support his workflow > where the SVN ids are associated with the compiler binaries he keeps around > for very fast bisection. I think when we talked about it last year, he just > needs an increasing # for each commit, presumably starting with whatever the > last SVN ID is when we make the change.
IIUC you can get a per-branch rev number with: git rev-list --count --first-parent <branch> e.g. $ git rev-list --count --first-parent trunk 140323 I believe this says there are 140323 commits between the beginning of time and trunk. That's per-branch though, not a global revision number across all branches. (Maybe that's more useful anyway?) The number of commits on trunk since the gcc-5-branch point is: $ git rev-list --count --first-parent trunk ^gcc-5-branch 2877 I don't know if this is useful. FWIW I like David's suggestion of useful commit summaries in the first line.