Thread (41 messages) flat view 41 messages, 20 authors, 2016-06-15

Re: LCA06 Cogito/GIT workshop - (Re: git-whatchanged: exit out early on errors)

From: Linus Torvalds <torvalds@osdl.org>
Date: 2016-06-15 22:42:17
Subsystem: the rest · Maintainer: Linus Torvalds


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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help