git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Merge conflicts as .rej .orig files
@ 2005-08-19  3:06 Martin Langhoff
  2005-08-19  4:29 ` Linus Torvalds
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Martin Langhoff @ 2005-08-19  3:06 UTC (permalink / raw)
  To: GIT

After using arch for a while, I've gotten used to getting .rej and
.orig files instead of big ugly conflict markers inside the file.
Emacs has a nice 'diff' mode that is a boon when dealing with
conflicts this way.

Is there a way to convince cogito/git to leave reject files around?
What utility is git using to do the merges? Or at least: where should
I look?

cheers,


martin

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Merge conflicts as .rej .orig files
  2005-08-19  3:06 Merge conflicts as .rej .orig files Martin Langhoff
@ 2005-08-19  4:29 ` Linus Torvalds
  2005-08-19  8:27 ` Catalin Marinas
  2005-08-19 15:30 ` Daniel Barkalow
  2 siblings, 0 replies; 4+ messages in thread
From: Linus Torvalds @ 2005-08-19  4:29 UTC (permalink / raw)
  To: Martin Langhoff; +Cc: GIT



On Fri, 19 Aug 2005, Martin Langhoff wrote:
> 
> Is there a way to convince cogito/git to leave reject files around?

Nope.

Git just doesn't deal in patches. There's never any patch rejects: there 
are just two source files that get merged.

The ".orig" and ".rej" things are signs of patch-based systems. 

I'm sure you could fake it, but I'm also sure that there's an emacs mode 
for the "merge" style diffs. It is, after all, what CVS and RCS have used, 
so I'd expect that there be tons of support for making it look nice and 
help merges.

		Linus

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Merge conflicts as .rej .orig files
  2005-08-19  3:06 Merge conflicts as .rej .orig files Martin Langhoff
  2005-08-19  4:29 ` Linus Torvalds
@ 2005-08-19  8:27 ` Catalin Marinas
  2005-08-19 15:30 ` Daniel Barkalow
  2 siblings, 0 replies; 4+ messages in thread
From: Catalin Marinas @ 2005-08-19  8:27 UTC (permalink / raw)
  To: Martin Langhoff; +Cc: GIT

Martin Langhoff <martin.langhoff@gmail.com> wrote:
> After using arch for a while, I've gotten used to getting .rej and
> .orig files instead of big ugly conflict markers inside the file.
> Emacs has a nice 'diff' mode that is a boon when dealing with
> conflicts this way.
>
> Is there a way to convince cogito/git to leave reject files around?
> What utility is git using to do the merges? Or at least: where should
> I look?

You could have a look at StGIT as well. The tool you use for merges is
configurable via the stgitrc file (diff3 is used by default, which
leaves markers in the file). StGIT also leaves the 3 files involved in
the tree-way merge as <file>.{older,local,remote} for further
inspection.

If you prefer other tool than diff3, you can define it in the stgitrc
file. Two examples are given for emacs and xxdiff. You could also
write a small script which invokes diff3 by default and, if it fails,
run the emacs ediff-merge-files-with-ancestor function.

-- 
Catalin

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Merge conflicts as .rej .orig files
  2005-08-19  3:06 Merge conflicts as .rej .orig files Martin Langhoff
  2005-08-19  4:29 ` Linus Torvalds
  2005-08-19  8:27 ` Catalin Marinas
@ 2005-08-19 15:30 ` Daniel Barkalow
  2 siblings, 0 replies; 4+ messages in thread
From: Daniel Barkalow @ 2005-08-19 15:30 UTC (permalink / raw)
  To: Martin Langhoff; +Cc: GIT

On Fri, 19 Aug 2005, Martin Langhoff wrote:

> After using arch for a while, I've gotten used to getting .rej and
> .orig files instead of big ugly conflict markers inside the file.
> Emacs has a nice 'diff' mode that is a boon when dealing with
> conflicts this way.
>
> Is there a way to convince cogito/git to leave reject files around?
> What utility is git using to do the merges? Or at least: where should
> I look?

I believe you should be able to get that effect by having a version
of "git-merge-one-script" that does "diff -c $2 $3 | patch $1" or "diff -c
$2 $1 | patch $3", depending on which you want as the orig. (Or something
like that. I'm not sure exactly how to get the conflict files out of the
script and into the right place, or the arguments it gets.)

Of course, you'll probably have more conflicts to deal with, because the
merging code gets less information that way. (In particular, you'll lose
the "already contains changes" behavior, so you'll be unhappy if you have
patches merged upstream.)

	-Daniel
*This .sig left intentionally blank*

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-08-19 15:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-19  3:06 Merge conflicts as .rej .orig files Martin Langhoff
2005-08-19  4:29 ` Linus Torvalds
2005-08-19  8:27 ` Catalin Marinas
2005-08-19 15:30 ` Daniel Barkalow

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).