On Thu, Jul 07, 2011 at 11:45:57AM -0700, Scott Bronson wrote: > What is the best way to determine why a git merge failed? > I'm writing a script that needs to do different things depending > on what went wrong. > > Right now I'm parsing error messages. It's obviously a bad > idea and prone to breakage but it does work. Example: Sorry, that's the best you can do with "git merge" currently. The usual advice would be to check the repo status yourself with plumbing tools, but: 1. That's a lot of work on the part of a script writer. 2. It's not atomic. You want to know why a merge failed, but circumstances might have changed since the original failure. It would be nice if "git merge" gave different exit codes for various situations. I don't think it would be all that big a change, and you might be a good person to suggest which conditions need their own exit code, as you are also writing the consuming end of the codes. Want to write a patch? -Peff -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html