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

Re: 'git commit' duplicates parents?

From: Dan Holmsand <hidden>
Date: 2016-06-15 22:42:00

Linus Torvalds wrote:
On Mon, 20 Jun 2005, Dan Holmsand wrote:
quoted
git-resolve-script still seems a bit too eager to write MERGE_HEAD and 
ORIG_HEAD - they only make sense if there's actually been any merging 
done, don't they?

Patch below shows what I mean.

I considered this, but decided that MERGE_HEAD is potentially very useful
for some of the other failure exits. There's a few "exit 1"'s in there,
for example when the "git-read-tree -m"  fails because of a dirty
workspace.
Yeah, but that was exactly what I was after...

As far as I understand it, the git-read-tree -u -m doesn't actually do
anything when the workspace is dirty - so there's actually no merging 
going on, right?

If you react to the dirty-workspace-warnings in such a failed merge by 
"git commit-ing" (and not noting the MERGE_HEAD warning, which has been 
known to happen), you'll end up with an unwanted parent in the commit.

Or am I just being stupid :-?

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