diff options
author | Elijah Newren <newren@gmail.com> | 2022-06-18 00:20:53 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-06-22 16:10:06 -0700 |
commit | b520bc6caa35e621396dd69ae4d84314615cf7ac (patch) | |
tree | af3e9a8de28d77b9a9118e1ad7d05fd3892b0084 /Documentation/git-merge-tree.txt | |
parent | 7fa3338870d66dd3946c5c3a0bd09dadb798893d (diff) | |
download | git-b520bc6caa35e621396dd69ae4d84314615cf7ac.tar.gz |
merge-tree: provide easy access to `ls-files -u` style info
Much like `git merge` updates the index with information of the form
(mode, oid, stage, name)
provide this output for conflicted files for merge-tree as well.
Provide a --name-only option for users to exclude the mode, oid, and
stage and only get the list of conflicted filenames.
Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-merge-tree.txt')
-rw-r--r-- | Documentation/git-merge-tree.txt | 34 |
1 files changed, 28 insertions, 6 deletions
diff --git a/Documentation/git-merge-tree.txt b/Documentation/git-merge-tree.txt index 68a51c8261..b89aabdb98 100644 --- a/Documentation/git-merge-tree.txt +++ b/Documentation/git-merge-tree.txt @@ -40,6 +40,13 @@ After the merge completes, a new toplevel tree object is created. See OPTIONS ------- +--name-only:: + In the Conflicted file info section, instead of writing a list + of (mode, oid, stage, path) tuples to output for conflicted + files, just provide a list of filenames with conflicts (and + do not list filenames multiple times if they have multiple + conflicting stages). + --[no-]messages:: Write any informational messages such as "Auto-merging <path>" or CONFLICT notices to the end of stdout. If unspecified, the @@ -58,7 +65,7 @@ line: Whereas for a conflicted merge, the output is by default of the form: <OID of toplevel tree> - <Conflicted file list> + <Conflicted file info> <Informational messages> These are discussed individually below. @@ -72,19 +79,24 @@ working tree at the end of `git merge`. If there were conflicts, then files within this tree may have embedded conflict markers. [[CFI]] -Conflicted file list +Conflicted file info ~~~~~~~~~~~~~~~~~~~~ -This is a sequence of lines containing a filename on each line, quoted -as explained for the configuration variable `core.quotePath` (see -linkgit:git-config[1]). +This is a sequence of lines with the format + + <mode> <object> <stage> <filename> + +The filename will be quoted as explained for the configuration +variable `core.quotePath` (see linkgit:git-config[1]). However, if +the `--name-only` option is passed, the mode, object, and stage will +be omitted. [[IM]] Informational messages ~~~~~~~~~~~~~~~~~~~~~~ This always starts with a blank line to separate it from the previous -section, and then has free-form messages about the merge, such as: +sections, and then has free-form messages about the merge, such as: * "Auto-merging <file>" * "CONFLICT (rename/delete): <oldfile> renamed...but deleted in..." @@ -116,6 +128,16 @@ used as a part of a series of steps such as: Note that when the exit status is non-zero, `NEWTREE` in this sequence will contain a lot more output than just a tree. +For conflicts, the output includes the same information that you'd get +with linkgit:git-merge[1]: + + * what would be written to the working tree (the + <<OIDTLT,OID of toplevel tree>>) + * the higher order stages that would be written to the index (the + <<CFI,Conflicted file info>>) + * any messages that would have been printed to stdout (the + <<IM,Informational messages>>) + [[DEPMERGE]] DEPRECATED DESCRIPTION ---------------------- |