Chromium Code Reviews| Index: docs/src/git-upstream-diff.txt |
| diff --git a/docs/src/git-upstream-diff.txt b/docs/src/git-upstream-diff.txt |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..6ee59eb8051e1968e87a327ee01c608a4cc17315 |
| --- /dev/null |
| +++ b/docs/src/git-upstream-diff.txt |
| @@ -0,0 +1,81 @@ |
| +git-upstream-diff(1) |
| +==================== |
| + |
| +NAME |
| +---- |
| +git-upstream-diff - |
| +include::_git-upstream-diff_desc.helper.txt[] |
| + |
| +SYNOPSIS |
| +-------- |
| +[verse] |
| +'git upstream-diff' [--wordwise] [<extra args for git-diff>*] |
| + |
| +DESCRIPTION |
| +----------- |
| + |
| +Shows a diff beween your current branch and it's upstream. This is 'roughly' the |
| +same as: |
| + |
| +---- |
| +git diff --patience -C -C HEAD@{upstream} <1> <2> |
| +---- |
| +<1> `-C -C` detects file copies/renames |
| +<2> `--patience` uses the patience-diff algorithm, which tends to produce nicer |
| + diffs in many cases. |
| + |
| +The difference is that `HEAD@{upstream}` is actually the tagged merge base of |
| +your branch (See linkgit:git-rebase-update[1]). This means that if your upstream |
|
agable
2014/03/25 19:37:23
linkgit:git-mark-merge-base
|
| +branch was rebased, but you haven't yet rebased the current branch on top of it, |
| +you'll still see an accurate diff compared to just diffing against |
| +`@{upstream}`. |
| + |
| +The `--wordwise` option also allows `git-diff` to do word-by-word comparison |
| +in a semi-intelligent way. However, sometimes it can produce surprising results, |
| +so it is disabled by default. |
| + |
| + |
| +OPTIONS |
| +------- |
| + |
| +--wordwise:: |
| + Print a colorized word-wise diff instead of a line-wise diff. |
| + |
| +<extra args for git-diff>:: |
| + Extra arguments are included in the invocation of linkgit:git-diff[1]. These |
|
agable
2014/03/25 19:37:23
80 chars
iannucci
2014/03/26 01:39:49
Done.
|
| + can be anything that `git-diff` normally takes. |
| ++ |
| +-- |
| +`--stat`;; |
| + This is particularly useful to show 'which' files have been changed in |
| + comparison to the upstream branch. |
| +`-- <filename patterns>*`;; |
| + Restrict the diff to only show the diff for given files compared to the |
| + upstream. |
| +-- |
| + |
| + |
| +CONFIGURATION VARIABLES |
| +----------------------- |
| + |
| +depot-tools.upstream-diff.default-args |
| +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| + |
| +A list-configuration variable. Each instance of this config variable will be |
| +prepended to all invocations of `git upstream-diff`, as if you had passed them |
| +on the command line. |
| + |
| +include::_aliases.txt[] |
| + |
| +---- |
| +[alias] |
| + git udiff = upstream-diff |
| +---- |
| + |
| +SEE ALSO |
| +-------- |
| +linkgit:git-rebase-update[1] |
| + |
| +include::_footer.txt[] |
| + |
| +// vim: ft=asciidoc noexpandtab: |