mirror of
https://github.com/git/git.git
synced 2026-08-09 17:40:16 +00:00
Have a repo with a subtree merge, do a 'git log --follow prefix/test.c', the output only contains history in the outer repo, not commits that were merged via a subtree merge. What happens is that 'git log --follow' stores the followed path only in opt->diffopt.pathspec, so in case the commit history is non-linear, and multiple parents have renames to the followed path, then the end result isn't really defined: the first commit that happens to be visited in one of the parents update opt->diffopt.pathspec, and from that point, only that updated path is visited. Fix the problem by introducing a commit -> path map (follow_pathspec_slab) that stores what will be a path to follow when visiting that parent. At the top of log_tree_commit(), if the slab has an entry for this commit, we replace opt->diffopt.pathspec with a path from this entry, so the correct path is followed, even if an unrelated sub-tree changed the path to be followed to something else. After log_tree_diff() runs, we record each parent's path in the slab. As a result, the walk order doesn't matter, which was exactly the source of problems previously. This helps with subtree merges (rename happens inside the merge commit), but also fixes the general case when the rename happens in the history of parents, not in the merge commit itself. Signed-off-by: Miklos Vajna <vmiklos@collabora.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
76 lines
2.6 KiB
Plaintext
76 lines
2.6 KiB
Plaintext
`log.abbrevCommit`::
|
|
If `true`, make
|
|
ifndef::with-breaking-changes[]
|
|
linkgit:git-log[1], linkgit:git-show[1], and
|
|
linkgit:git-whatchanged[1]
|
|
endif::with-breaking-changes[]
|
|
ifdef::with-breaking-changes[]
|
|
linkgit:git-log[1] and linkgit:git-show[1]
|
|
endif::with-breaking-changes[]
|
|
assume `--abbrev-commit`. You may
|
|
override this option with `--no-abbrev-commit`.
|
|
|
|
`log.date`::
|
|
Set the default date-time mode for the `log` command.
|
|
Setting a value for log.date is similar to using `git log`'s
|
|
`--date` option. See linkgit:git-log[1] for details.
|
|
+
|
|
If the format is set to "auto:foo" and the pager is in use, format
|
|
"foo" will be used for the date format. Otherwise, "default" will
|
|
be used.
|
|
|
|
`log.decorate`::
|
|
Print out the ref names of any commits that are shown by the log
|
|
command. Possible values are:
|
|
+
|
|
--
|
|
`short`;; the ref name prefixes `refs/heads/`, `refs/tags/` and
|
|
`refs/remotes/` are not printed.
|
|
`full`;; the full ref name (including prefix) are printed.
|
|
`auto`;; if the output is going to a terminal,
|
|
the ref names are shown as if `short` were given, otherwise no ref
|
|
names are shown.
|
|
--
|
|
+
|
|
This is the same as the `--decorate` option of the `git log`.
|
|
|
|
`log.initialDecorationSet`::
|
|
By default, `git log` only shows decorations for certain known ref
|
|
namespaces. If 'all' is specified, then show all refs as
|
|
decorations.
|
|
|
|
`log.excludeDecoration`::
|
|
Exclude the specified patterns from the log decorations. This is
|
|
similar to the `--decorate-refs-exclude` command-line option, but
|
|
the config option can be overridden by the `--decorate-refs`
|
|
option.
|
|
|
|
`log.diffMerges`::
|
|
Set diff format to be used when `--diff-merges=on` is
|
|
specified, see `--diff-merges` in linkgit:git-log[1] for
|
|
details. Defaults to `separate`.
|
|
|
|
`log.follow`::
|
|
If `true`, `git log` will act as if the `--follow` option was used when
|
|
a single <path> is given. This has the same limitations as `--follow`,
|
|
i.e. it cannot be used to follow multiple files.
|
|
|
|
`log.graphColors`::
|
|
A list of colors, separated by commas, that can be used to draw
|
|
history lines in `git log --graph`.
|
|
|
|
`log.showRoot`::
|
|
If true, the initial commit will be shown as a big creation event.
|
|
This is equivalent to a diff against an empty tree.
|
|
Tools like linkgit:git-log[1] or linkgit:git-whatchanged[1], which
|
|
normally hide the root commit will now show it. True by default.
|
|
|
|
`log.showSignature`::
|
|
If true, makes linkgit:git-log[1], linkgit:git-show[1], and
|
|
linkgit:git-whatchanged[1] assume `--show-signature`.
|
|
|
|
`log.mailmap`::
|
|
If true, makes linkgit:git-log[1], linkgit:git-show[1], and
|
|
linkgit:git-whatchanged[1] assume `--use-mailmap`, otherwise
|
|
assume `--no-use-mailmap`. True by default.
|