Re: Merge-Recursive Improvements
- From
- Stefan Monnier <monnier@iro.umontreal.ca>
- Date
- Feb 12, 2008, 23:03 UTC
- Message-ID
- <jwv3arxairx.fsf-monnier+gmane.comp.version-control.git@gnu.org>
- In-Reply-To
- <A21B3CA8-6240-434F-87A9-C6F76DA15265@gmail.com>
> "ORIG_HEAD...MERGE_HEAD" diffs to see what was going on. I could use an > external diff tool (yuck), but I would like to modify the conflict markers > to resemble those of Perforce:
Show 7 quoted lines
>>>>>>>> merge-base:file.txt > Original code. > ======= HEAD:file.txt > Head code. > ======= merge:file.txt > Merged code. > <<<<<<<
Having such 3-parts conflicts helps tremendously when you have to do the merge by hand, so I'm 100% in favor of such a change.
BUT Please, please, pretty please, don't follow Perforce who blindly disregards previous standards. Instead use the format used by diff3 which has been there for ages:
<<<<<<< foo original text ||||||| bar ancestor ======= new text >>>>>>> baz
> Third, git doesn't appear to have any sense of context when performing a > merge. Another contrived example which wouldn't be flagged as a merge > conflict:
> ptr = malloc(len); // Added in HEAD. > init(); // Included in merge-base. > ptr = malloc(len); // Added in "merge".
Yes, that's nasty.
> Fourth, git doesn't provide a mechanism for merges to ignore whitespace > changes.
I can live with that. As long as the conflict is clearly marked with all 3 parts, I can use any external tool I want to resolve the conflict.
Stefan