summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 66b2ed0)
raw | patch | inline | side by side (parent: 66b2ed0)
author | Junio C Hamano <gitster@pobox.com> | |
Thu, 21 Jan 2010 22:57:41 +0000 (14:57 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 21 Jan 2010 22:57:41 +0000 (14:57 -0800) |
This option should be treated pretty much the same as --format="%h %s".
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/pretty-options.txt | patch | blob | history | |
revision.c | patch | blob | history | |
t/t3301-notes.sh | patch | blob | history |
index 140120092083558b418decca69088b336d134153..aa96caeab26ee6132adbef03d2ca17e91f634208 100644 (file)
Show the notes (see linkgit:git-notes[1]) that annotate the
commit, when showing the commit log message. This is the default
for `git log`, `git show` and `git whatchanged` commands when
- there is no `--pretty` nor `--format` option is given on the
- command line.
+ there is no `--pretty`, `--format` nor `--oneline` option is
+ given on the command line.
diff --git a/revision.c b/revision.c
index 0de78fbad6008b72aba946df0dfd03d5183f42bf..34f9ab98d1872770ef4d54014c31ece6eb7c8c39 100644 (file)
--- a/revision.c
+++ b/revision.c
@@ -1176,6 +1176,7 @@ static int handle_revision_opt(struct rev_info *revs, int argc, const char **arg
} else if (!strcmp(arg, "--oneline")) {
revs->verbose_header = 1;
get_commit_format("oneline", revs);
+ revs->pretty_given = 1;
revs->abbrev_commit = 1;
} else if (!strcmp(arg, "--graph")) {
revs->topo_order = 1;
diff --git a/t/t3301-notes.sh b/t/t3301-notes.sh
index 977d6536515e4128a2130a8b5fc911e2c0aafe40..5d9604b8155401a2e345a69a5d030cffd7d16818 100755 (executable)
--- a/t/t3301-notes.sh
+++ b/t/t3301-notes.sh
grep spam output
'
-for pretty in "" raw short medium full fuller format:%s
+for pretty in \
+ "" --pretty --pretty=raw --pretty=short --pretty=medium \
+ --pretty=full --pretty=fuller --pretty=format:%s --oneline
do
case "$pretty" in
"") p= not= negate="" ;;
- ?*) p="--pretty=$pretty" not=" not" negate="!" ;;
+ ?*) p="$pretty" not=" not" negate="!" ;;
esac
test_expect_success "git show $pretty does$not show notes" '
git show $p >output &&