{"thread":{"id":"1584","subject":"Merge conflicts as .rej .orig files","startedAt":"2005-08-19T03:06:14Z","lastAt":"2005-08-19T15:30:36Z","messageCount":4,"participants":["Martin Langhoff","Linus Torvalds","Catalin Marinas","Daniel Barkalow"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"7540","messageId":"46a038f9050818200625d64a12@mail.gmail.com","threadId":"1584","inReplyTo":null,"subject":"Merge conflicts as .rej .orig files","fromName":"Martin Langhoff","fromEmail":"martin.langhoff@gmail.com","sentAt":"2005-08-19T03:06:14Z","receivedAt":"2005-08-19T03:06:14Z","isPatch":false,"sender":{"key":"martin.langhoff@gmail.com","avatar":"https://gravatar.com/avatar/1e3f311b6c4c15836501901ca58f8c0b0667246488084ba524d8bc9867e22fd9?d=mp&s=160"},"body":"After using arch for a while, I've gotten used to getting .rej and\n.orig files instead of big ugly conflict markers inside the file.\nEmacs has a nice 'diff' mode that is a boon when dealing with\nconflicts this way.\n\nIs there a way to convince cogito/git to leave reject files around?\nWhat utility is git using to do the merges? Or at least: where should\nI look?\n\ncheers,\n\n\nmartin\n"},{"id":"7545","messageId":"Pine.LNX.4.58.0508182125490.3412@g5.osdl.org","threadId":"1584","inReplyTo":"46a038f9050818200625d64a12@mail.gmail.com","subject":"Re: Merge conflicts as .rej .orig files","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2005-08-19T04:29:48Z","receivedAt":"2005-08-19T04:29:48Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Fri, 19 Aug 2005, Martin Langhoff wrote:\n> \n> Is there a way to convince cogito/git to leave reject files around?\n\nNope.\n\nGit just doesn't deal in patches. There's never any patch rejects: there \nare just two source files that get merged.\n\nThe \".orig\" and \".rej\" things are signs of patch-based systems. \n\nI'm sure you could fake it, but I'm also sure that there's an emacs mode \nfor the \"merge\" style diffs. It is, after all, what CVS and RCS have used, \nso I'd expect that there be tons of support for making it look nice and \nhelp merges.\n\n\t\tLinus\n"},{"id":"7554","messageId":"tnxmznepbzn.fsf@arm.com","threadId":"1584","inReplyTo":"46a038f9050818200625d64a12@mail.gmail.com","subject":"Re: Merge conflicts as .rej .orig files","fromName":"Catalin Marinas","fromEmail":"catalin.marinas@gmail.com","sentAt":"2005-08-19T08:27:56Z","receivedAt":"2005-08-19T08:27:56Z","isPatch":false,"sender":{"key":"catalin.marinas@gmail.com","avatar":null},"body":"Martin Langhoff <martin.langhoff@gmail.com> wrote:\n> After using arch for a while, I've gotten used to getting .rej and\n> .orig files instead of big ugly conflict markers inside the file.\n> Emacs has a nice 'diff' mode that is a boon when dealing with\n> conflicts this way.\n>\n> Is there a way to convince cogito/git to leave reject files around?\n> What utility is git using to do the merges? Or at least: where should\n> I look?\n\nYou could have a look at StGIT as well. The tool you use for merges is\nconfigurable via the stgitrc file (diff3 is used by default, which\nleaves markers in the file). StGIT also leaves the 3 files involved in\nthe tree-way merge as <file>.{older,local,remote} for further\ninspection.\n\nIf you prefer other tool than diff3, you can define it in the stgitrc\nfile. Two examples are given for emacs and xxdiff. You could also\nwrite a small script which invokes diff3 by default and, if it fails,\nrun the emacs ediff-merge-files-with-ancestor function.\n\n-- \nCatalin\n"},{"id":"7565","messageId":"Pine.LNX.4.63.0508191115200.23242@iabervon.org","threadId":"1584","inReplyTo":"46a038f9050818200625d64a12@mail.gmail.com","subject":"Re: Merge conflicts as .rej .orig files","fromName":"Daniel Barkalow","fromEmail":"barkalow@iabervon.org","sentAt":"2005-08-19T15:30:36Z","receivedAt":"2005-08-19T15:30:36Z","isPatch":false,"sender":{"key":"barkalow@iabervon.org","avatar":"https://avatars.githubusercontent.com/u/55364219?v=4"},"body":"On Fri, 19 Aug 2005, Martin Langhoff wrote:\n\n> After using arch for a while, I've gotten used to getting .rej and\n> .orig files instead of big ugly conflict markers inside the file.\n> Emacs has a nice 'diff' mode that is a boon when dealing with\n> conflicts this way.\n>\n> Is there a way to convince cogito/git to leave reject files around?\n> What utility is git using to do the merges? Or at least: where should\n> I look?\n\nI believe you should be able to get that effect by having a version\nof \"git-merge-one-script\" that does \"diff -c $2 $3 | patch $1\" or \"diff -c\n$2 $1 | patch $3\", depending on which you want as the orig. (Or something\nlike that. I'm not sure exactly how to get the conflict files out of the\nscript and into the right place, or the arguments it gets.)\n\nOf course, you'll probably have more conflicts to deal with, because the\nmerging code gets less information that way. (In particular, you'll lose\nthe \"already contains changes\" behavior, so you'll be unhappy if you have\npatches merged upstream.)\n\n\t-Daniel\n*This .sig left intentionally blank*\n"}]}