Skip to content

Commit 402fa75

Browse files
author
Junio C Hamano
committed
Merge branch 'maint'
* maint: Have sample update hook not refuse deleting a branch through push. variable $projectdesc needs to be set before checking against unchanged default. Update git-annotate/git-blame documentation Update git-apply documentation Update git-applymbox documentation Update git-am documentation user-manual: use detached head when rewriting history user-manual: start revising "internals" chapter user-manual: detached HEAD user-manual: fix discussion of default clone Documentation: clarify track/no-track option. Documentation: clarify git-checkout -f, minor editing Documentation: minor edits of git-lost-found manpage
2 parents 9474eda + 9177649 commit 402fa75

File tree

11 files changed

+222
-137
lines changed

11 files changed

+222
-137
lines changed

Documentation/blame-options.txt

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
-b::
2+
Show blank SHA-1 for boundary commits. This can also
3+
be controlled via the `blame.blankboundary` config option.
4+
5+
--root::
6+
Do not treat root commits as boundaries. This can also be
7+
controlled via the `blame.showroot` config option.
8+
9+
--show-stats::
10+
Include additional statistics at the end of blame output.
11+
12+
-L n,m::
13+
Annotate only the specified line range (lines count from 1).
14+
15+
-l::
16+
Show long rev (Default: off).
17+
18+
-t::
19+
Show raw timestamp (Default: off).
20+
21+
-S <revs-file>::
22+
Use revs from revs-file instead of calling gitlink:git-rev-list[1].
23+
24+
-p, --porcelain::
25+
Show in a format designed for machine consumption.
26+
27+
--incremental::
28+
Show the result incrementally in a format designed for
29+
machine consumption.
30+
31+
--contents <file>::
32+
When <rev> is not specified, the command annotates the
33+
changes starting backwards from the working tree copy.
34+
This flag makes the command pretend as if the working
35+
tree copy has the contents of he named file (specify
36+
`-` to make the command read from the standard input).
37+
38+
-M|<num>|::
39+
Detect moving lines in the file as well. When a commit
40+
moves a block of lines in a file (e.g. the original file
41+
has A and then B, and the commit changes it to B and
42+
then A), traditional 'blame' algorithm typically blames
43+
the lines that were moved up (i.e. B) to the parent and
44+
assigns blame to the lines that were moved down (i.e. A)
45+
to the child commit. With this option, both groups of lines
46+
are blamed on the parent.
47+
48+
<num> is optional but it is the lower bound on the number of
49+
alphanumeric characters that git must detect as moving
50+
within a file for it to associate those lines with the parent
51+
commit.
52+
53+
-C|<num>|::
54+
In addition to `-M`, detect lines copied from other
55+
files that were modified in the same commit. This is
56+
useful when you reorganize your program and move code
57+
around across files. When this option is given twice,
58+
the command looks for copies from all other files in the
59+
parent for the commit that creates the file in addition.
60+
61+
<num> is optional but it is the lower bound on the number of
62+
alphanumeric characters that git must detect as moving
63+
between files for it to associate those lines with the parent
64+
commit.
65+
66+
-h, --help::
67+
Show help message.

Documentation/git-am.txt

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,18 @@ OPTIONS
2626
The list of mailbox files to read patches from. If you do not
2727
supply this argument, reads from the standard input.
2828

29-
--signoff::
29+
-s, --signoff::
3030
Add `Signed-off-by:` line to the commit message, using
3131
the committer identity of yourself.
3232

33-
--dotest=<dir>::
33+
-d=<dir>, --dotest=<dir>::
3434
Instead of `.dotest` directory, use <dir> as a working
3535
area to store extracted patches.
3636

37-
--keep::
37+
-k, --keep::
3838
Pass `-k` flag to `git-mailinfo` (see gitlink:git-mailinfo[1]).
3939

40-
--utf8::
40+
-u, --utf8::
4141
Pass `-u` flag to `git-mailinfo` (see gitlink:git-mailinfo[1]).
4242
The proposed commit log message taken from the e-mail
4343
are re-coded into UTF-8 encoding (configuration variable
@@ -48,14 +48,14 @@ This was optional in prior versions of git, but now it is the
4848
default. You could use `--no-utf8` to override this.
4949

5050
--no-utf8::
51-
Do not pass `-u` flag to `git-mailinfo` (see
51+
Pass `-n` flag to `git-mailinfo` (see
5252
gitlink:git-mailinfo[1]).
5353

54-
--binary::
54+
-b, --binary::
5555
Pass `--allow-binary-replacement` flag to `git-apply`
5656
(see gitlink:git-apply[1]).
5757

58-
--3way::
58+
-3, --3way::
5959
When the patch does not apply cleanly, fall back on
6060
3-way merge, if the patch records the identity of blobs
6161
it is supposed to apply to, and we have those blobs
@@ -73,17 +73,24 @@ default. You could use `--no-utf8` to override this.
7373
These flags are passed to the `git-apply` program that applies
7474
the patch.
7575

76-
--interactive::
76+
-i, --interactive::
7777
Run interactively, just like git-applymbox.
7878

79-
--resolved::
79+
-r, --resolved::
8080
After a patch failure (e.g. attempting to apply
8181
conflicting patch), the user has applied it by hand and
8282
the index file stores the result of the application.
8383
Make a commit using the authorship and commit log
8484
extracted from the e-mail message and the current index
8585
file, and continue.
8686

87+
--resolvemsg=<msg>::
88+
When a patch failure occurs, <msg> will be printed
89+
to the screen before exiting. This overrides the
90+
standard message informing you to use `--resolved`
91+
or `--skip` to handle the failure. This is solely
92+
for internal use between `git-rebase` and `git-am`.
93+
8794
DISCUSSION
8895
----------
8996

Documentation/git-annotate.txt

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,7 @@ which introduced the line. Optionally annotate from a given revision.
1616

1717
OPTIONS
1818
-------
19-
-l, --long::
20-
Show long rev (Defaults off).
21-
22-
-t, --time::
23-
Show raw timestamp (Defaults off).
24-
25-
-r, --rename::
26-
Follow renames (Defaults on).
27-
28-
-S, --rev-file <revs-file>::
29-
Use revs from revs-file instead of calling git-rev-list.
30-
31-
-h, --help::
32-
Show help message.
19+
include::blame-options.txt[]
3320

3421
SEE ALSO
3522
--------

Documentation/git-apply.txt

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@ git-apply - Apply a patch on a git index file and a working tree
99
SYNOPSIS
1010
--------
1111
[verse]
12-
'git-apply' [--stat] [--numstat] [--summary] [--check] [--index] [--apply]
13-
[--no-add] [--index-info] [--allow-binary-replacement | --binary]
14-
[-R | --reverse] [--reject] [-z] [-pNUM] [-CNUM] [--inaccurate-eof]
15-
[--whitespace=<nowarn|warn|error|error-all|strip>] [--exclude=PATH]
16-
[--cached] [--verbose] [<patch>...]
12+
'git-apply' [--stat] [--numstat] [--summary] [--check] [--index]
13+
[--apply] [--no-add] [--index-info] [-R | --reverse]
14+
[--allow-binary-replacement | --binary] [--reject] [-z]
15+
[-pNUM] [-CNUM] [--inaccurate-eof] [--cached]
16+
[--whitespace=<nowarn|warn|error|error-all|strip>]
17+
[--exclude=PATH] [--verbose] [<patch>...]
1718

1819
DESCRIPTION
1920
-----------
@@ -158,7 +159,7 @@ discouraged.
158159
correctly. This option adds support for applying such patches by
159160
working around this bug.
160161

161-
--verbose::
162+
-v, --verbose::
162163
Report progress to stderr. By default, only a message about the
163164
current patch being applied will be printed. This option will cause
164165
additional information to be reported.

Documentation/git-applymbox.txt

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,20 @@ OPTIONS
4242
and the current tree.
4343

4444
-u::
45-
The commit log message, author name and author email are
46-
taken from the e-mail, and after minimally decoding MIME
47-
transfer encoding, re-coded in UTF-8 by transliterating
48-
them. This used to be optional but now it is the default.
45+
Pass `-u` flag to `git-mailinfo` (see gitlink:git-mailinfo[1]).
46+
The proposed commit log message taken from the e-mail
47+
are re-coded into UTF-8 encoding (configuration variable
48+
`i18n.commitencoding` can be used to specify project's
49+
preferred encoding if it is not UTF-8). This used to be
50+
optional but now it is the default.
4951
+
5052
Note that the patch is always used as-is without charset
5153
conversion, even with this flag.
5254

55+
-n::
56+
Pass `-n` flag to `git-mailinfo` (see
57+
gitlink:git-mailinfo[1]).
58+
5359
-c .dotest/<num>::
5460
When the patch contained in an e-mail does not cleanly
5561
apply, the command exits with an error message. The

Documentation/git-blame.txt

Lines changed: 14 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ git-blame - Show what revision and author last modified each line of a file
88
SYNOPSIS
99
--------
1010
[verse]
11-
'git-blame' [-c] [-l] [-t] [-f] [-n] [-p] [--incremental] [-L n,m] [-S <revs-file>]
12-
[-M] [-C] [-C] [--since=<date>] [<rev> | --contents <file>] [--] <file>
11+
'git-blame' [-c] [-l] [-t] [-f] [-n] [-p] [--incremental] [-L n,m]
12+
[-S <revs-file>] [-M] [-C] [-C] [--since=<date>]
13+
[<rev> | --contents <file>] [--] <file>
1314

1415
DESCRIPTION
1516
-----------
@@ -37,20 +38,19 @@ ea4c7f9bf69e781dd0cd88d2bccb2bf5cc15c9a7 git-blame: Make the output
3738

3839
OPTIONS
3940
-------
40-
-c, --compatibility::
41-
Use the same output mode as gitlink:git-annotate[1] (Default: off).
42-
43-
-L n,m::
44-
Annotate only the specified line range (lines count from 1).
45-
46-
-l, --long::
47-
Show long rev (Default: off).
41+
include::blame-options.txt[]
4842

49-
-t, --time::
50-
Show raw timestamp (Default: off).
43+
-c::
44+
Use the same output mode as gitlink:git-annotate[1] (Default: off).
5145

52-
-S, --rev-file <revs-file>::
53-
Use revs from revs-file instead of calling gitlink:git-rev-list[1].
46+
--score-debug::
47+
Include debugging information related to the movement of
48+
lines between files (see `-C`) and lines moved within a
49+
file (see `-M`). The first number listed is the score.
50+
This is the number of alphanumeric characters detected
51+
to be moved between or within files. This must be above
52+
a certain threshold for git-blame to consider those lines
53+
of code to have been moved.
5454

5555
-f, --show-name::
5656
Show filename in the original commit. By default
@@ -60,42 +60,6 @@ OPTIONS
6060
-n, --show-number::
6161
Show line number in the original commit (Default: off).
6262

63-
-p, --porcelain::
64-
Show in a format designed for machine consumption.
65-
66-
--incremental::
67-
Show the result incrementally in a format designed for
68-
machine consumption.
69-
70-
--contents <file>::
71-
When <rev> is not specified, the command annotates the
72-
changes starting backwards from the working tree copy.
73-
This flag makes the command pretend as if the working
74-
tree copy has the contents of he named file (specify
75-
`-` to make the command read from the standard input).
76-
77-
-M::
78-
Detect moving lines in the file as well. When a commit
79-
moves a block of lines in a file (e.g. the original file
80-
has A and then B, and the commit changes it to B and
81-
then A), traditional 'blame' algorithm typically blames
82-
the lines that were moved up (i.e. B) to the parent and
83-
assigns blame to the lines that were moved down (i.e. A)
84-
to the child commit. With this option, both groups of
85-
lines are blamed on the parent.
86-
87-
-C::
88-
In addition to `-M`, detect lines copied from other
89-
files that were modified in the same commit. This is
90-
useful when you reorganize your program and move code
91-
around across files. When this option is given twice,
92-
the command looks for copies from all other files in the
93-
parent for the commit that creates the file in addition.
94-
95-
-h, --help::
96-
Show help message.
97-
98-
9963
THE PORCELAIN FORMAT
10064
--------------------
10165

Documentation/git-checkout.txt

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ options, which will be passed to `git branch`.
2323

2424
When <paths> are given, this command does *not* switch
2525
branches. It updates the named paths in the working tree from
26-
the index file (i.e. it runs `git-checkout-index -f -u`), or a
27-
named commit. In
28-
this case, `-f` and `-b` options are meaningless and giving
26+
the index file (i.e. it runs `git-checkout-index -f -u`), or
27+
from a named commit. In
28+
this case, the `-f` and `-b` options are meaningless and giving
2929
either of them results in an error. <tree-ish> argument can be
3030
used to specify a specific tree-ish (i.e. commit, tag or tree)
3131
to update the index for the given paths before updating the
@@ -38,7 +38,8 @@ OPTIONS
3838
Quiet, supress feedback messages.
3939

4040
-f::
41-
Force a re-read of everything.
41+
Proceed even if the index or the working tree differs
42+
from HEAD. This is used to throw away local changes.
4243

4344
-b::
4445
Create a new branch named <new_branch> and start it at
@@ -48,13 +49,17 @@ OPTIONS
4849

4950
--track::
5051
When -b is given and a branch is created off a remote branch,
51-
setup so that git-pull will automatically retrieve data from
52-
the remote branch.
52+
set up configuration so that git-pull will automatically
53+
retrieve data from the remote branch. Set the
54+
branch.autosetupmerge configuration variable to true if you
55+
want git-checkout and git-branch to always behave as if
56+
'--track' were given.
5357

5458
--no-track::
5559
When -b is given and a branch is created off a remote branch,
56-
force that git-pull will automatically retrieve data from
57-
the remote branch independent of the configuration settings.
60+
set up configuration so that git-pull will not retrieve data
61+
from the remote branch, ignoring the branch.autosetupmerge
62+
configuration variable.
5863

5964
-l::
6065
Create the new branch's ref log. This activates recording of

Documentation/git-lost-found.txt

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,39 +12,38 @@ SYNOPSIS
1212
DESCRIPTION
1313
-----------
1414
Finds dangling commits and tags from the object database, and
15-
creates refs to them in .git/lost-found/ directory. Commits and
16-
tags that dereference to commits go to .git/lost-found/commit
17-
and others are stored in .git/lost-found/other directory.
15+
creates refs to them in the .git/lost-found/ directory. Commits and
16+
tags that dereference to commits are stored in .git/lost-found/commit,
17+
and other objects are stored in .git/lost-found/other.
1818

1919

2020
OUTPUT
2121
------
22-
One line description from the commit and tag found along with
23-
their object name are printed on the standard output.
24-
22+
Prints to standard output the object names and one-line descriptions
23+
of any commits or tags found.
2524

2625
EXAMPLE
2726
-------
2827

29-
Suppose you run 'git tag -f' and mistyped the tag to overwrite.
28+
Suppose you run 'git tag -f' and mistype the tag to overwrite.
3029
The ref to your tag is overwritten, but until you run 'git
31-
prune', it is still there.
30+
prune', the tag itself is still there.
3231

3332
------------
3433
$ git lost-found
3534
[1ef2b196d909eed523d4f3c9bf54b78cdd6843c6] GIT 0.99.9c
3635
...
3736
------------
3837

39-
Also you can use gitk to browse how they relate to each other
40-
and existing (probably old) tags.
38+
Also you can use gitk to browse how any tags found relate to each
39+
other.
4140

4241
------------
4342
$ gitk $(cd .git/lost-found/commit && echo ??*)
4443
------------
4544

46-
After making sure that it is the object you are looking for, you
47-
can reconnect it to your regular .git/refs hierarchy.
45+
After making sure you know which the object is the tag you are looking
46+
for, you can reconnect it to your regular .git/refs hierarchy.
4847

4948
------------
5049
$ git cat-file -t 1ef2b196

0 commit comments

Comments
 (0)