[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [csmith-project/csmith] cef528: More paths wrong...



Would this have been avoided if I had not forgotten to do a "git pull" before the "git commit"?

John


On 05/23/2011 10:13 PM, Eric Eide wrote:
Git commentary:

	>  Commit: 878f6182294089ebc55f0b9a764ea77ca3817132
	>  Author: John Regehr<regehr@cs.utah.edu>
	>  Date:   2011-05-23 (Mon, 23 May 2011)
	>
	>  Changed paths:
	>    M BUGS_REPORTED.TXT
	>
	>  Log Message:
	>  -----------
	>  Merge branch 'master' of github.com:csmith-project/csmith

I think that many gitters would say that this would have been better handled by
`git rebase'.  If you look at the recent history, you'll see that we have a
branched history, with only a very little work on each branch:

	[zin:~/csmith] eeide% git log --oneline --graph -n 4
	*   878f618 Merge branch 'master' of github.com:csmith-project/csmith
	|\
	| * a0cabb4 Reported one more clang wrong code bug
	* | cef5282 More paths wrong...
	|/
	* 5cb9751 Fixup a path.

If you had rebased your work on the current origin/HEAD, then we would have a
simpler history.

FWIW, on the internal Emulab project mailing list, we have recently been having
a major discussion about how we should handle git branches: when we should keep
them, when we should rebase them, etc.  If you are interested in this, I could
forward some of the discussion to you.

The general consensus is that we should "keep" branches in the central
repository only when they embody significant trails of work, i.e., multiple
commits on a particular topic.  Little stuff, not representing long trains of
thought, should simply be rebased onto origin/HEAD and then merged.  (Git calls
this a "fast-forward" merge.)

My $0.02.

Eric.