* force a merge conflict
@ 2008-11-09 15:09 Caleb Cushing
2008-11-09 18:39 ` Deskin Miller
[not found] ` <85647ef50811110914w7e1d36afh23b43b44ba0e2cf3@mail.gmail.com>
0 siblings, 2 replies; 7+ messages in thread
From: Caleb Cushing @ 2008-11-09 15:09 UTC (permalink / raw)
To: git
is there any way to force a merge conflict?
there are 2 projects which have basically diverged becoming
incompatible, and both have updated since there common ancestry. I'm
working slowing on merging them back together.
in this case I have a dev branch and fork branch the fork is a copy of
dev except I committed one of the files from the fork. I need to merge
this file back into dev, but git thinks it's a fast forward, because
it really is for git, in reality it isn't, both files have newer
history than their common ancestry.
--
Caleb Cushing
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: force a merge conflict
2008-11-09 15:09 force a merge conflict Caleb Cushing
@ 2008-11-09 18:39 ` Deskin Miller
2008-11-09 20:19 ` Caleb Cushing
[not found] ` <85647ef50811110914w7e1d36afh23b43b44ba0e2cf3@mail.gmail.com>
1 sibling, 1 reply; 7+ messages in thread
From: Deskin Miller @ 2008-11-09 18:39 UTC (permalink / raw)
To: Caleb Cushing; +Cc: git
On Sun, Nov 09, 2008 at 10:09:49AM -0500, Caleb Cushing wrote:
> is there any way to force a merge conflict?
I'm not sure a 'conflict' is what you want, based on what you say below;
rather, it seems you simply want to force a 'merge commit', i.e. a commit with
multiple parents.
> in this case I have a dev branch and fork branch the fork is a copy of
> dev except I committed one of the files from the fork. I need to merge
> this file back into dev, but git thinks it's a fast forward, because
> it really is for git, in reality it isn't, both files have newer
> history than their common ancestry.
git merge --no-ff ?
Hope that helps,
Deskin Miller
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: force a merge conflict
2008-11-09 18:39 ` Deskin Miller
@ 2008-11-09 20:19 ` Caleb Cushing
2008-11-09 20:35 ` Deskin Miller
2008-11-10 19:11 ` Brett Simmers
0 siblings, 2 replies; 7+ messages in thread
From: Caleb Cushing @ 2008-11-09 20:19 UTC (permalink / raw)
To: Deskin Miller; +Cc: git
> I'm not sure a 'conflict' is what you want, based on what you say below;
> rather, it seems you simply want to force a 'merge commit', i.e. a commit with
> multiple parents.
>
> git merge --no-ff ?
>
I tried that but I don't see that it's any different than a fast
forward in this scenario. Actually I don't see any difference between
it and a fast-forward.
--
Caleb Cushing
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: force a merge conflict
2008-11-09 20:19 ` Caleb Cushing
@ 2008-11-09 20:35 ` Deskin Miller
2008-11-10 19:11 ` Brett Simmers
1 sibling, 0 replies; 7+ messages in thread
From: Deskin Miller @ 2008-11-09 20:35 UTC (permalink / raw)
To: Caleb Cushing; +Cc: git
On Sun, Nov 09, 2008 at 03:19:57PM -0500, Caleb Cushing wrote:
> > I'm not sure a 'conflict' is what you want, based on what you say below;
> > rather, it seems you simply want to force a 'merge commit', i.e. a commit with
> > multiple parents.
>
> >
> > git merge --no-ff ?
> >
> I tried that but I don't see that it's any different than a fast
> forward in this scenario. Actually I don't see any difference between
> it and a fast-forward.
Look at the results of 'git merge' and 'git merge --no-ff' in gitk. Or,
compare the resultant sha1 for the two commit objects. Or, look at 'git log'
of the resulting commit objects, and look for a 'Merge:' line.
Deskin Miller
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: force a merge conflict
2008-11-09 20:19 ` Caleb Cushing
2008-11-09 20:35 ` Deskin Miller
@ 2008-11-10 19:11 ` Brett Simmers
2008-11-11 17:10 ` Caleb Cushing
1 sibling, 1 reply; 7+ messages in thread
From: Brett Simmers @ 2008-11-10 19:11 UTC (permalink / raw)
To: Caleb Cushing; +Cc: Deskin Miller, git
> I tried that but I don't see that it's any different than a fast
> forward in this scenario. Actually I don't see any difference between
> it and a fast-forward.
If you want to be given a chance to edit the result before the merge
commit, you probably want 'git merge --no-commit'.
-Brett
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: force a merge conflict
2008-11-10 19:11 ` Brett Simmers
@ 2008-11-11 17:10 ` Caleb Cushing
0 siblings, 0 replies; 7+ messages in thread
From: Caleb Cushing @ 2008-11-11 17:10 UTC (permalink / raw)
To: Brett Simmers; +Cc: Deskin Miller, git
> If you want to be given a chance to edit the result before the merge
> commit, you probably want 'git merge --no-commit'.
That's the closest to what I need to do... unfortunately it's not what
I need to do. Apparently I'll have to do a vimdiff outside of git
since git doesn't appear to be capable of doing what I need it to do.
--
Caleb Cushing
^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <85647ef50811110914w7e1d36afh23b43b44ba0e2cf3@mail.gmail.com>]
* Re: force a merge conflict
[not found] ` <85647ef50811110914w7e1d36afh23b43b44ba0e2cf3@mail.gmail.com>
@ 2008-11-11 17:24 ` Caleb Cushing
0 siblings, 0 replies; 7+ messages in thread
From: Caleb Cushing @ 2008-11-11 17:24 UTC (permalink / raw)
To: Constantine Plotnikov; +Cc: git
> Is not the following option of the merge just for it?
>
> --no-commit
> Perform the merge but pretend the merge failed and do not
> autocommit, to give the user a chance to inspect and further tweak the
> merge result before committing.
yes and no... it doesn't auto-magically allow me to do what a merge
conflict does. which is put together a diff. all it really did was not
commit the auto merge.
as far as --no-ff I'm not saying it commits the same way but I didn't
see any difference in the resulting diffs, which, imho, all that
matters is whether the resulting merged code is correct.
--
Caleb Cushing
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-11-11 17:25 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-09 15:09 force a merge conflict Caleb Cushing
2008-11-09 18:39 ` Deskin Miller
2008-11-09 20:19 ` Caleb Cushing
2008-11-09 20:35 ` Deskin Miller
2008-11-10 19:11 ` Brett Simmers
2008-11-11 17:10 ` Caleb Cushing
[not found] ` <85647ef50811110914w7e1d36afh23b43b44ba0e2cf3@mail.gmail.com>
2008-11-11 17:24 ` Caleb Cushing
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).