Skip to content

Commit aed4509

Browse files
author
Junio C Hamano
committed
Merge branch 'maint'
* branch 'maint': Document git-repo-config --bool/--int options. tutorial: talk about user.name early and don't start with commit -a git-blame: fix rev parameter handling.
2 parents df6b7bf + eb07fd5 commit aed4509

File tree

3 files changed

+31
-5
lines changed

3 files changed

+31
-5
lines changed

Documentation/git-repo-config.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,12 @@ OPTIONS
7777
-l, --list::
7878
List all variables set in config file.
7979

80+
--bool::
81+
git-repo-config will ensure that the output is "true" or "false"
82+
83+
--int::
84+
git-repo-config will ensure that the output is a simple decimal number
85+
8086

8187
ENVIRONMENT
8288
-----------

Documentation/tutorial.txt

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,18 @@ diff" with:
1111
$ man git-diff
1212
------------------------------------------------
1313

14+
It is a good idea to introduce yourself to git before doing any
15+
operation. The easiest way to do so is:
16+
17+
------------------------------------------------
18+
$ cat >~/.gitconfig <<\EOF
19+
[user]
20+
name = Your Name Comes Here
21+
22+
EOF
23+
------------------------------------------------
24+
25+
1426
Importing a new project
1527
-----------------------
1628

@@ -31,7 +43,8 @@ defaulting to local storage area
3143

3244
You've now initialized the working directory--you may notice a new
3345
directory created, named ".git". Tell git that you want it to track
34-
every file under the current directory with
46+
every file under the current directory with (notice the dot '.'
47+
that means the current directory):
3548

3649
------------------------------------------------
3750
$ git add .
@@ -40,7 +53,7 @@ $ git add .
4053
Finally,
4154

4255
------------------------------------------------
43-
$ git commit -a
56+
$ git commit
4457
------------------------------------------------
4558

4659
will prompt you for a commit message, then record the current state
@@ -55,11 +68,17 @@ $ git diff
5568
to review your changes. When you're done,
5669

5770
------------------------------------------------
58-
$ git commit -a
71+
$ git commit file1 file2...
5972
------------------------------------------------
6073

6174
will again prompt your for a message describing the change, and then
62-
record the new versions of the modified files.
75+
record the new versions of the files you listed. It is cumbersome
76+
to list all files and you can say `-a` (which stands for 'all')
77+
instead.
78+
79+
------------------------------------------------
80+
$ git commit -a
81+
------------------------------------------------
6382

6483
A note on commit messages: Though not required, it's a good idea to
6584
begin the commit message with a single short (less than 50 character)
@@ -75,7 +94,7 @@ $ git add path/to/new/file
7594
------------------------------------------------
7695

7796
then commit as usual. No special command is required when removing a
78-
file; just remove it, then commit.
97+
file; just remove it, then tell `commit` about the file as usual.
7998

8099
At any point you can view the history of your changes using
81100

builtin-blame.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1787,6 +1787,7 @@ int cmd_blame(int argc, const char **argv, const char *prefix)
17871787
/* Now we got rev and path. We do not want the path pruning
17881788
* but we may want "bottom" processing.
17891789
*/
1790+
argv[unk++] = "--"; /* terminate the rev name */
17901791
argv[unk] = NULL;
17911792

17921793
init_revisions(&revs, NULL);

0 commit comments

Comments
 (0)