Skip to content

Commit 59b3867

Browse files
bedhangergitster
authored andcommitted
Documentation: user-manual: limit potentially confusing usage of 3dots (and 2dots)
Using them as continuation indications for abbreviated SHA-1 values bears the risk that they are mistaken for the dotted range operators. Commands which expect a single commit will fail when given a range of commits. Also, add a note that sometimes, 3dots are just continuation indications. Signed-off-by: Ann T Ropea <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 17206ba commit 59b3867

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

Documentation/user-manual.txt

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ do so (now or later) by using -b with the checkout command again. Example:
319319

320320
git checkout -b new_branch_name
321321

322-
HEAD is now at 427abfa... Linux v2.6.17
322+
HEAD is now at 427abfa Linux v2.6.17
323323
------------------------------------------------
324324

325325
The HEAD then refers to the SHA-1 of the commit instead of to a branch,
@@ -508,7 +508,7 @@ Bisecting: 3537 revisions left to test after this
508508

509509
If you run `git branch` at this point, you'll see that Git has
510510
temporarily moved you in "(no branch)". HEAD is now detached from any
511-
branch and points directly to a commit (with commit id 65934...) that
511+
branch and points directly to a commit (with commit id 65934) that
512512
is reachable from "master" but not from v2.6.18. Compile and test it,
513513
and see whether it crashes. Assume it does crash. Then:
514514

@@ -549,14 +549,14 @@ says "bisect". Choose a safe-looking commit nearby, note its commit
549549
id, and check it out with:
550550

551551
-------------------------------------------------
552-
$ git reset --hard fb47ddb2db...
552+
$ git reset --hard fb47ddb2db
553553
-------------------------------------------------
554554

555555
then test, run `bisect good` or `bisect bad` as appropriate, and
556556
continue.
557557

558558
Instead of `git bisect visualize` and then `git reset --hard
559-
fb47ddb2db...`, you might just want to tell Git that you want to skip
559+
fb47ddb2db`, you might just want to tell Git that you want to skip
560560
the current commit:
561561

562562
-------------------------------------------------
@@ -3426,6 +3426,8 @@ Date:
34263426
...
34273427
:100644 100644 oldsha... 4b9458b... M somedirectory/myfile
34283428
------------------------------------------------
3429+
(Note that in the above, the "..." are used as continuation
3430+
indications, not as symmetric difference operators!)
34293431

34303432
This tells you that the immediately following version of the file was
34313433
"newsha", and that the immediately preceding version was "oldsha".
@@ -3449,7 +3451,7 @@ and your repository is good again!
34493451
$ git log --raw --all
34503452
------------------------------------------------
34513453

3452-
and just looked for the sha of the missing object (4b9458b..) in that
3454+
and just looked for the sha of the missing object (4b9458b) in that
34533455
whole thing. It's up to you--Git does *have* a lot of information, it is
34543456
just missing one particular blob version.
34553457

@@ -4114,9 +4116,9 @@ program, e.g. `diff3`, `merge`, or Git's own merge-file, on
41144116
the blob objects from these three stages yourself, like this:
41154117

41164118
------------------------------------------------
4117-
$ git cat-file blob 263414f... >hello.c~1
4118-
$ git cat-file blob 06fa6a2... >hello.c~2
4119-
$ git cat-file blob cc44c73... >hello.c~3
4119+
$ git cat-file blob 263414f >hello.c~1
4120+
$ git cat-file blob 06fa6a2 >hello.c~2
4121+
$ git cat-file blob cc44c73 >hello.c~3
41204122
$ git merge-file hello.c~2 hello.c~1 hello.c~3
41214123
------------------------------------------------
41224124

@@ -4374,7 +4376,7 @@ $ git log --no-merges t/
43744376
------------------------
43754377

43764378
In the pager (`less`), just search for "bundle", go a few lines back,
4377-
and see that it is in commit 18449ab0... Now just copy this object name,
4379+
and see that it is in commit 18449ab0. Now just copy this object name,
43784380
and paste it into the command line
43794381

43804382
-------------------

0 commit comments

Comments
 (0)