Skip to content

Commit

Permalink
Merge branch 'ah/misc-doc-updates'
Browse files Browse the repository at this point in the history
Misc doc fixes.

* ah/misc-doc-updates:
  doc: normalize [--options] to [options] in git-diff
  doc: add note about shell quoting to revision.txt
  git-svn: remove ''--add-author-from' for 'commit-diff'
  doc: add '-d' and '-o' for 'git push'
  doc: clarify ignore rules for git ls-files
  doc: align 'diff --no-index' in text and synopsis
  doc: improve formatting in githooks.txt
  • Loading branch information
gitster committed May 23, 2018
2 parents fda537a + 5356a3c commit be75d12
Show file tree
Hide file tree
Showing 6 changed files with 77 additions and 68 deletions.
16 changes: 8 additions & 8 deletions Documentation/git-diff.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,23 @@ SYNOPSIS
'git diff' [options] --cached [<commit>] [--] [<path>...]
'git diff' [options] <commit> <commit> [--] [<path>...]
'git diff' [options] <blob> <blob>
'git diff' [options] [--no-index] [--] <path> <path>
'git diff' [options] --no-index [--] <path> <path>

DESCRIPTION
-----------
Show changes between the working tree and the index or a tree, changes
between the index and a tree, changes between two trees, changes between
two blob objects, or changes between two files on disk.

'git diff' [--options] [--] [<path>...]::
'git diff' [options] [--] [<path>...]::

This form is to view the changes you made relative to
the index (staging area for the next commit). In other
words, the differences are what you _could_ tell Git to
further add to the index but you still haven't. You can
stage these changes by using linkgit:git-add[1].

'git diff' --no-index [--options] [--] [<path>...]::
'git diff' [options] --no-index [--] <path> <path>::

This form is to compare the given two paths on the
filesystem. You can omit the `--no-index` option when
Expand All @@ -38,7 +38,7 @@ two blob objects, or changes between two files on disk.
or when running the command outside a working tree
controlled by Git.

'git diff' [--options] --cached [<commit>] [--] [<path>...]::
'git diff' [options] --cached [<commit>] [--] [<path>...]::

This form is to view the changes you staged for the next
commit relative to the named <commit>. Typically you
Expand All @@ -48,26 +48,26 @@ two blob objects, or changes between two files on disk.
<commit> is not given, it shows all staged changes.
--staged is a synonym of --cached.

'git diff' [--options] <commit> [--] [<path>...]::
'git diff' [options] <commit> [--] [<path>...]::

This form is to view the changes you have in your
working tree relative to the named <commit>. You can
use HEAD to compare it with the latest commit, or a
branch name to compare with the tip of a different
branch.

'git diff' [--options] <commit> <commit> [--] [<path>...]::
'git diff' [options] <commit> <commit> [--] [<path>...]::

This is to view the changes between two arbitrary
<commit>.

'git diff' [--options] <commit>..<commit> [--] [<path>...]::
'git diff' [options] <commit>..<commit> [--] [<path>...]::

This is synonymous to the previous form. If <commit> on
one side is omitted, it will have the same effect as
using HEAD instead.

'git diff' [--options] <commit>\...<commit> [--] [<path>...]::
'git diff' [options] <commit>\...<commit> [--] [<path>...]::

This form is to view the changes on the branch containing
and up to the second <commit>, starting at a common ancestor
Expand Down
3 changes: 2 additions & 1 deletion Documentation/git-ls-files.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ OPTIONS
Show only ignored files in the output. When showing files in the
index, print only those matched by an exclude pattern. When
showing "other" files, show only those matched by an exclude
pattern.
pattern. Standard ignore rules are not automatically activated,
therefore at least one of the `--exclude*` options is required.

-s::
--stage::
Expand Down
3 changes: 2 additions & 1 deletion Documentation/git-push.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ SYNOPSIS
[verse]
'git push' [--all | --mirror | --tags] [--follow-tags] [--atomic] [-n | --dry-run] [--receive-pack=<git-receive-pack>]
[--repo=<repository>] [-f | --force] [-d | --delete] [--prune] [-v | --verbose]
[-u | --set-upstream] [--push-option=<string>]
[-u | --set-upstream] [-o <string> | --push-option=<string>]
[--[no-]signed|--signed=(true|false|if-asked)]
[--force-with-lease[=<refname>[:<expect>]]]
[--no-verify] [<repository> [<refspec>...]]
Expand Down Expand Up @@ -123,6 +123,7 @@ already exists on the remote side.
will be tab-separated and sent to stdout instead of stderr. The full
symbolic names of the refs will be given.

-d::
--delete::
All listed refs are deleted from the remote repository. This is
the same as prefixing all refs with a colon.
Expand Down
2 changes: 1 addition & 1 deletion Documentation/git-svn.txt
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,7 @@ creating the branch or tag.
config key: svn.useLogAuthor

--add-author-from::
When committing to svn from Git (as part of 'commit-diff', 'set-tree' or 'dcommit'
When committing to svn from Git (as part of 'set-tree' or 'dcommit'
operations), if the existing log message doesn't already have a
`From:` or `Signed-off-by:` line, append a `From:` line based on the
Git commit's author string. If you use this, then `--use-log-author`
Expand Down
Loading

0 comments on commit be75d12

Please sign in to comment.