-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
core-tutorial: trim the section on Inspecting Changes
Back when the core tutorial was written, `log` and `whatchanged` were scripted Porcelains. In the "Inspecting Changes" section that talks about the plumbing commands in the diff family, it made sense to use `log` and `whatchanged` as good examples of the use of these plumbing commands, and because even these scripted Porcelains were novelty (there wasn't the new end-user tutorial written), it made some sense to illustrate uses of the `git log` (and `git whatchanged`) scripted Porcelain commands. But we no longer have scripted `log` and `whatchanged` to serve as examples, and this document is not where the end users learn what `git log` command is about. Stop at briefly mentioning the possibility of combining rev-list with diff-tree to build your own log, and leave the end-user documentation of `log` to the new tutorial and the user manual. Also resurrect the last version of `git-log`, `git-whatchanged`, and `git-show` to serve as examples to contrib/examples/ directory. While at it, remove 'whatchanged' from a list of sample commands that are affected by GIT_FLUSH environment variable. This is not meant to be an exhaustive list but as a list of typical ones, and an old command that is kept primarily for backward compatibility does not belong to it. Helped-by: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
- Loading branch information
Junio C Hamano
committed
Aug 13, 2013
1 parent
64948ad
commit 627a8b8
Showing
4 changed files
with
47 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/sh | ||
# | ||
# Copyright (c) 2005 Linus Torvalds | ||
# | ||
|
||
USAGE='[--max-count=<n>] [<since>..<limit>] [--pretty=<format>] [git-rev-list options]' | ||
SUBDIRECTORY_OK='Yes' | ||
. git-sh-setup | ||
|
||
revs=$(git-rev-parse --revs-only --no-flags --default HEAD "$@") || exit | ||
[ "$revs" ] || { | ||
die "No HEAD ref" | ||
} | ||
git-rev-list --pretty $(git-rev-parse --default HEAD "$@") | | ||
LESS=-S ${PAGER:-less} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/sh | ||
|
||
USAGE='[-p] [--max-count=<n>] [<since>..<limit>] [--pretty=<format>] [-m] [git-diff-tree options] [git-rev-list options]' | ||
SUBDIRECTORY_OK='Yes' | ||
. git-sh-setup | ||
|
||
diff_tree_flags=$(git-rev-parse --sq --no-revs --flags "$@") || exit | ||
case "$0" in | ||
*whatchanged) | ||
count= | ||
test -z "$diff_tree_flags" && | ||
diff_tree_flags=$(git-repo-config --get whatchanged.difftree) | ||
diff_tree_default_flags='-c -M --abbrev' ;; | ||
*show) | ||
count=-n1 | ||
test -z "$diff_tree_flags" && | ||
diff_tree_flags=$(git-repo-config --get show.difftree) | ||
diff_tree_default_flags='--cc --always' ;; | ||
esac | ||
test -z "$diff_tree_flags" && | ||
diff_tree_flags="$diff_tree_default_flags" | ||
|
||
rev_list_args=$(git-rev-parse --sq --default HEAD --revs-only "$@") && | ||
diff_tree_args=$(git-rev-parse --sq --no-revs --no-flags "$@") && | ||
|
||
eval "git-rev-list $count $rev_list_args" | | ||
eval "git-diff-tree --stdin --pretty -r $diff_tree_flags $diff_tree_args" | | ||
LESS="$LESS -S" ${PAGER:-less} |