Skip to content

Commit abea85d

Browse files
jasamplergitster
authored andcommitted
core-tutorial.txt: Fix showing the current behaviour.
The --root option from "git diff-tree" won't do nothing when is given to commands like git-whatchanged or git-log, because those always print the initial commit by default. This fixes the tutorial explaining the function of the log.showroot configuration variable. Signed-off-by: Carlos Rica <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent ac7fa27 commit abea85d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Documentation/core-tutorial.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -535,18 +535,18 @@ with the associated patches use the more complex (and much more
535535
powerful)
536536

537537
----------------
538-
$ git-whatchanged -p --root
538+
$ git-whatchanged -p
539539
----------------
540540

541541
and you will see exactly what has changed in the repository over its
542542
short history.
543543

544544
[NOTE]
545-
The `\--root` flag is a flag to `git-diff-tree` to tell it to
546-
show the initial aka 'root' commit too. Normally you'd probably not
547-
want to see the initial import diff, but since the tutorial project
548-
was started from scratch and is so small, we use it to make the result
549-
a bit more interesting.
545+
When using the above two commands, the initial commit will be shown.
546+
If this is a problem because it is huge, you can hide it by setting
547+
the log.showroot configuration variable to false. Having this, you
548+
can still show it for each command just adding the `\--root` option,
549+
which is a flag for `git-diff-tree` accepted by both commands.
550550

551551
With that, you should now be having some inkling of what git does, and
552552
can explore on your own.

0 commit comments

Comments
 (0)