Thread (4 messages) flat view 4 messages, 3 authors, 2016-06-15

Re: Handling merge conflicts a bit more gracefully..

From: Linus Torvalds <torvalds@osdl.org>
Date: 2016-06-15 22:41:59

Possibly related (same subject, not in this thread)


On Wed, 8 Jun 2005, Junio C Hamano wrote:
 # Deleted in both.

Making sure that the path does not exist in the work tree with
test -f "$4" would be more sensible, before running --remove.
Yeah, my (broken) thinking was that since it wasn't in both, it wasn't in 
the working directory either, but you're right, that's just crazy talk. 
There could be a stale file there.

Made it do a

	rm -f -- "$4" || exit 1

instead (and changed the other one to do the "|| exit 1" too, since you're 
also obviously right on the directory issue).
 # Modified in both, but differently.
+	merge -p "$src1" "$orig" "$src2" > "$4"

Again, make sure "$4" is not a directory before redirecting into
it from merge, so that you can tell merge failures from it?
Hmm.. What's the cleanest way to check for redirection errors, but still
be able to distinguish those cleanly from "merge" itself returning an
error?

			Linus
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help