Re: LCA06 Cogito/GIT workshop - (Re: git-whatchanged: exit out early on errors)
- From
Linus Torvalds <torvalds@osdl.org>
- Date
- Jan 28, 2006, 05:53 UTC
- Message-ID
- <Pine.LNX.4.64.0601280047240.2909@evo.osdl.org>
- In-Reply-To
- <46a038f90601272133o53438987ka6b97c21d0cdf921@mail.gmail.com>
On Sat, 28 Jan 2006, Martin Langhoff wrote:
> > BTW, have you still got that patch to git-merge to seed the commit msg > with conflicted files? ;-)
Nope. But it was something like the appended (totally untested, and slightly improved).
The point being that we'd fill in a template that the committer will hopefully edit to explain what he did to fix up the merge for each file that had conflicts.
Linus
---
diff --git a/git-merge.sh b/git-merge.sh index 0a158ef..9f828f3 100755 --- a/git-merge.sh +++ b/git-merge.sh @@ -301,5 +301,9 @@ then "Automatic merge went well; stopped before committing as requested" exit 0 else + echo >"$GIT_DIR/MERGE_MSG" + echo "Conflicts in" >"$GIT_DIR/MERGE_MSG" + git-ls-files --unmerged | cut -f2 | uniq | + sed 's/^.*/ \0:/' >"$GIT_DIR/MERGE_MSG" die "Automatic merge failed; fix up by hand" fi