mirror of
https://github.com/git/git.git
synced 2025-03-27 16:58:05 +00:00
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>
This commit is contained in:
parent
66b2ed09c2
commit
7dccadf363
@ -34,5 +34,5 @@ people using 80-column terminals.
|
|||||||
Show the notes (see linkgit:git-notes[1]) that annotate the
|
Show the notes (see linkgit:git-notes[1]) that annotate the
|
||||||
commit, when showing the commit log message. This is the default
|
commit, when showing the commit log message. This is the default
|
||||||
for `git log`, `git show` and `git whatchanged` commands when
|
for `git log`, `git show` and `git whatchanged` commands when
|
||||||
there is no `--pretty` nor `--format` option is given on the
|
there is no `--pretty`, `--format` nor `--oneline` option is
|
||||||
command line.
|
given on the command line.
|
||||||
|
@ -1176,6 +1176,7 @@ static int handle_revision_opt(struct rev_info *revs, int argc, const char **arg
|
|||||||
} else if (!strcmp(arg, "--oneline")) {
|
} else if (!strcmp(arg, "--oneline")) {
|
||||||
revs->verbose_header = 1;
|
revs->verbose_header = 1;
|
||||||
get_commit_format("oneline", revs);
|
get_commit_format("oneline", revs);
|
||||||
|
revs->pretty_given = 1;
|
||||||
revs->abbrev_commit = 1;
|
revs->abbrev_commit = 1;
|
||||||
} else if (!strcmp(arg, "--graph")) {
|
} else if (!strcmp(arg, "--graph")) {
|
||||||
revs->topo_order = 1;
|
revs->topo_order = 1;
|
||||||
|
@ -192,11 +192,13 @@ test_expect_success 'git format-patch --show-notes does show notes' '
|
|||||||
grep spam output
|
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
|
do
|
||||||
case "$pretty" in
|
case "$pretty" in
|
||||||
"") p= not= negate="" ;;
|
"") p= not= negate="" ;;
|
||||||
?*) p="--pretty=$pretty" not=" not" negate="!" ;;
|
?*) p="$pretty" not=" not" negate="!" ;;
|
||||||
esac
|
esac
|
||||||
test_expect_success "git show $pretty does$not show notes" '
|
test_expect_success "git show $pretty does$not show notes" '
|
||||||
git show $p >output &&
|
git show $p >output &&
|
||||||
|
Loading…
x
Reference in New Issue
Block a user