Re: [PATCH 1/2] Change default merge backend from recursive to ort
From: Elijah Newren <hidden>
Date: 2021-08-03 03:40:06
Hi Philippe, On Mon, Aug 2, 2021 at 8:56 PM Philippe Blain [off-list ref] wrote:
Hi Elijah, Le 2021-07-31 à 20:07, Elijah Newren via GitGitGadget a écrit :quoted
From: Elijah Newren <redacted> * `git diff AUTO_MERGE` -- ability to see what changes the user has made to resolve conflicts so far (see commit 5291828df8 ("merge-ort: write $GIT_DIR/AUTO_MERGE whenever we hit a conflict", 2021-03-20) The last three have been implemented already (though only one has been submitted upstream so far;From what I could find this indeed only refers to your 5291828df8 (merge-ort: write $GIT_DIR/AUTO_MERGE whenever we hit a conflict, 2021-03-20). This is a very nice improvement, but I noticed it is not mentioned in the doc. Do you plan to update the 'git diff' doc to mention that special ref ? (And maybe also gitrevisions(5), where most of the special refs are listed ?) Do you plan to implement a new '--auto-merge' option to 'git diff' as a shortcut to 'git diff AUTO_MERGE', in order to hide a bit the special ref from users ?
Fair point, it probably does deserve to be documented somewhere, at least once ort is the default merge algorithm. I don't think it'd make sense to include a reference to it in gitrevisions(5), since $GIT_DIR/AUTO_MERGE is a reference to a tree rather than to a revision. But documenting that special ref in Documentation/git-diff.txt, and perhaps linking to it from other conflict-related options (e.g. --base, --ours, --theirs) may make sense. Your --auto-merge idea may also make sense, and it'd be somewhat similar to how git-rebase has a --show-current-patch option that is shorthand for `git show REBASE_HEAD` and is documented as such. However, it might be confusing to users how to combine --auto-merge with paths, whereas `git diff AUTO_MERGE -- pathname` is pretty clear once you know that AUTO_MERGE is a tree you can diff against. Hmmm....