summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-02-26 00:43:30 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-02-26 00:43:30 (GMT)
commit845d6030f81da3bb43bd24a78ef8c441a441c5d5 (patch)
tree8f53740bbf5e31f6a002bc6166c897417e58696e /Documentation
parent3da165ca289efd84ed648a4b87b7d9ed675937c2 (diff)
parent1eb4136ac2a24764257567b930535fcece01719f (diff)
downloadgit-845d6030f81da3bb43bd24a78ef8c441a441c5d5.zip
git-845d6030f81da3bb43bd24a78ef8c441a441c5d5.tar.gz
git-845d6030f81da3bb43bd24a78ef8c441a441c5d5.tar.bz2
Merge branch 'jc/diffcore-rotate'
"git {diff,log} --{skip,rotate}-to=<path>" allows the user to discard diff output for early paths or move them to the end of the output. * jc/diffcore-rotate: diff: --{rotate,skip}-to=<path>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/diff-options.txt8
-rw-r--r--Documentation/gitdiffcore.txt21
2 files changed, 29 insertions, 0 deletions
diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt
index e5733cc..aa2b5c1 100644
--- a/Documentation/diff-options.txt
+++ b/Documentation/diff-options.txt
@@ -700,6 +700,14 @@ matches a pattern if removing any number of the final pathname
components matches the pattern. For example, the pattern "`foo*bar`"
matches "`fooasdfbar`" and "`foo/bar/baz/asdf`" but not "`foobarx`".
+--skip-to=<file>::
+--rotate-to=<file>::
+ Discard the files before the named <file> from the output
+ (i.e. 'skip to'), or move them to the end of the output
+ (i.e. 'rotate to'). These were invented primarily for use
+ of the `git difftool` command, and may not be very useful
+ otherwise.
+
ifndef::git-format-patch[]
-R::
Swap two inputs; that is, show differences from index or
diff --git a/Documentation/gitdiffcore.txt b/Documentation/gitdiffcore.txt
index c970d9f..2bd1220 100644
--- a/Documentation/gitdiffcore.txt
+++ b/Documentation/gitdiffcore.txt
@@ -74,6 +74,7 @@ into another list. There are currently 5 such transformations:
- diffcore-merge-broken
- diffcore-pickaxe
- diffcore-order
+- diffcore-rotate
These are applied in sequence. The set of filepairs 'git diff-{asterisk}'
commands find are used as the input to diffcore-break, and
@@ -276,6 +277,26 @@ Documentation
t
------------------------------------------------
+diffcore-rotate: For Changing At Which Path Output Starts
+---------------------------------------------------------
+
+This transformation takes one pathname, and rotates the set of
+filepairs so that the filepair for the given pathname comes first,
+optionally discarding the paths that come before it. This is used
+to implement the `--skip-to` and the `--rotate-to` options. It is
+an error when the specified pathname is not in the set of filepairs,
+but it is not useful to error out when used with "git log" family of
+commands, because it is unreasonable to expect that a given path
+would be modified by each and every commit shown by the "git log"
+command. For this reason, when used with "git log", the filepair
+that sorts the same as, or the first one that sorts after, the given
+pathname is where the output starts.
+
+Use of this transformation combined with diffcore-order will produce
+unexpected results, as the input to this transformation is likely
+not sorted when diffcore-order is in effect.
+
+
SEE ALSO
--------
linkgit:git-diff[1],