summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-01-21 22:57:41 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-01-21 22:57:41 (GMT)
commit7dccadf363f9d9ff564ad34117266b2d557a2bc8 (patch)
tree8c2eede9c5628b6c8f0fdcb3e756e204c49dea9e
parent66b2ed09c2f0f212c5cd5c095c1f1052ecbb9491 (diff)
downloadgit-7dccadf363f9d9ff564ad34117266b2d557a2bc8.zip
git-7dccadf363f9d9ff564ad34117266b2d557a2bc8.tar.gz
git-7dccadf363f9d9ff564ad34117266b2d557a2bc8.tar.bz2
Fix "log --oneline" not to show notes
This option should be treated pretty much the same as --format="%h %s". Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--Documentation/pretty-options.txt4
-rw-r--r--revision.c1
-rwxr-xr-xt/t3301-notes.sh6
3 files changed, 7 insertions, 4 deletions
diff --git a/Documentation/pretty-options.txt b/Documentation/pretty-options.txt
index 1401200..aa96cae 100644
--- a/Documentation/pretty-options.txt
+++ b/Documentation/pretty-options.txt
@@ -34,5 +34,5 @@ people using 80-column terminals.
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 0de78fb..34f9ab9 100644
--- 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 977d653..5d9604b 100755
--- a/t/t3301-notes.sh
+++ b/t/t3301-notes.sh
@@ -192,11 +192,13 @@ test_expect_success 'git format-patch --show-notes does show notes' '
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 &&