git/builtin
Jeff King f9c75d858d log: fix --quiet synonym for -s
Originally the "--quiet" option was parsed by the
diff-option parser into the internal QUICK option. This had
the effect of silencing diff output from the log (which was
not intended, but happened to work and people started to
use it). But it also had other odd side effects at the diff
level (for example, it would suppress the second commit in
"git show A B").

To fix this, commit 1c40c36 converted log to parse-options
and handled the "quiet" option separately, not passing it
on to the diff code. However, it simply ignored the option,
which was a regression for people using it as a synonym for
"-s". Commit 01771a8 then fixed that by interpreting the
option to add DIFF_FORMAT_NO_OUTPUT to the list of output
formats.

However, that commit did not fix it in all cases. It sets
the flag after setup_revisions is called. Naively, this
makes sense because you would expect the setup_revisions
parser to overwrite our output format flag if "-p" or
another output format flag is seen.

However, that is not how the NO_OUTPUT flag works. We
actually store it in the bit-field as just another format.
At the end of setup_revisions, we call diff_setup_done,
which post-processes the bitfield and clears any other
formats if we have set NO_OUTPUT. By setting the flag after
setup_revisions is done, diff_setup_done does not have a
chance to make this tweak, and we end up with other format
options still set.

As a result, the flag would have no effect in "git log -p
--quiet" or "git show --quiet".  Fix it by setting the
format flag before the call to setup_revisions.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-08-28 15:37:29 -07:00
..
add.c Merge branch 'ar/clone-honor-umask-at-top' into maint 2012-07-22 13:04:05 -07:00
annotate.c
apply.c i18n: apply: split to fix a partial i18n message 2012-06-01 07:43:10 -07:00
archive.c Revert "upload-archive: use start_command instead of fork" 2011-11-15 15:39:33 -08:00
bisect--helper.c
blame.c Merge branch 'jc/maint-blame-unique-abbrev' into maint 2012-07-11 12:58:28 -07:00
branch.c branch: remove lego in i18n tracking info strings 2012-05-04 09:12:24 -07:00
bundle.c Teach progress eye-candy to fetch_refs_from_bundle() 2011-09-19 11:07:21 -07:00
cat-file.c cat-file: use streaming API to print blobs 2012-03-07 09:07:38 -08:00
check-attr.c Merge branch 'bc/attr-ignore-case' 2011-10-17 21:37:14 -07:00
check-ref-format.c Change check_refname_format() to reject unnormalized refnames 2011-10-05 13:45:30 -07:00
checkout-index.c checkout-index: remove obsolete comment 2011-08-17 10:39:47 -07:00
checkout.c Merge branch 'jk/maint-checkout-orphan-check-fix' into maint 2012-08-06 15:31:16 -07:00
clean.c Documentation: clarify "git clean -e <pattern>" 2011-08-28 23:47:55 -07:00
clone.c Merge branch 'ar/clone-honor-umask-at-top' into maint 2012-07-22 13:04:05 -07:00
column.c Add column layout skeleton and git-column 2012-04-27 09:26:37 -07:00
commit-tree.c Merge branch 'kk/maint-1.7.9-commit-tree' into kk/maint-commit-tree 2012-07-17 13:10:49 -07:00
commit.c Merge branch 'jk/maint-commit-check-committer-early' into maint-1.7.11 2012-08-24 12:05:08 -07:00
config.c config: remove useless assignment 2012-03-28 15:19:17 -07:00
count-objects.c
describe.c describe: Refresh the index when run with --dirty 2011-09-23 14:28:17 -07:00
diff-files.c
diff-index.c
diff-tree.c
diff.c fix pager.diff with diff --no-index 2012-06-15 14:27:35 -07:00
fast-export.c Merge branch 'js/fast-export-paths-with-spaces' into maint 2012-07-22 13:00:45 -07:00
fetch-pack.c Merge branch 'jk/fetch-pack-remove-dups-optim' 2012-05-29 13:09:08 -07:00
fetch.c Merge branch 'mb/fetch-call-a-non-branch-a-ref' into maint 2012-05-03 15:29:25 -07:00
fmt-merge-msg.c Merge branch 'jc/fmt-merge-msg-people' 2012-06-12 08:33:30 -07:00
for-each-ref.c Convert resolve_ref+xstrdup to new resolve_refdup function 2011-12-13 09:26:52 -08:00
fsck.c fsck: use streaming API for writing lost-found blobs 2012-03-07 09:07:39 -08:00
gc.c gc: use argv-array for sub-commands 2012-04-18 16:17:42 -07:00
grep.c Merge branch 'mm/verify-filename-fix' into maint 2012-07-11 12:45:49 -07:00
hash-object.c
help.c Merge branch 'nd/columns' 2012-05-03 15:13:31 -07:00
index-pack.c index-pack: Disable threading on cygwin 2012-06-26 14:23:03 -07:00
init-db.c builtin/init-db.c: eliminate -Wformat warning on Solaris 2011-12-20 16:02:08 -08:00
log.c log: fix --quiet synonym for -s 2012-08-28 15:37:29 -07:00
ls-files.c path_excluded(): update API to less cache-entry centric 2012-06-05 21:22:36 -07:00
ls-remote.c Merge branch 'jc/ls-remote-short-help' 2011-10-05 12:36:26 -07:00
ls-tree.c
mailinfo.c mailinfo: with -b, keep space after [foo] 2012-01-16 16:06:57 -08:00
mailsplit.c
merge-base.c
merge-file.c remove superfluous newlines in error messages 2012-04-30 15:45:51 -07:00
merge-index.c
merge-ours.c
merge-recursive.c
merge-tree.c
merge.c ident: rename IDENT_ERROR_ON_NO_NAME to IDENT_STRICT 2012-05-24 17:16:41 -07:00
mktag.c
mktree.c Merge "Move 'builtin-*' into a 'builtin/' subdirectory" 2011-11-10 09:10:51 -08:00
mv.c Merge branch 'jk/maint-mv' into maint 2011-12-28 11:32:36 -08:00
name-rev.c Merge branch 'jc/maint-name-rev-all' into maint-1.7.6 2011-12-13 21:12:34 -08:00
notes.c Merge branch 'nd/war-on-nul-in-commit' 2011-12-22 11:27:26 -08:00
pack-objects.c pack-objects: refactor write_object() into helper functions 2012-05-18 14:22:15 -07:00
pack-redundant.c
pack-refs.c
patch-id.c patch-id.c: use strbuf instead of a fixed buffer 2011-09-22 09:35:07 -07:00
prune-packed.c fix deletion of .git/objects sub-directories in git-prune/repack 2012-03-07 10:24:33 -08:00
prune.c fix deletion of .git/objects sub-directories in git-prune/repack 2012-03-07 10:24:33 -08:00
push.c Merge branch 'ct/advise-push-default' into maint 2012-05-11 11:18:43 -07:00
read-tree.c
receive-pack.c Merge branch 'cb/receive-pack-keep-errors' into maint 2012-02-21 15:14:41 -08:00
reflog.c prune: show progress while marking reachable objects 2011-11-07 22:12:19 -08:00
remote-ext.c
remote-fd.c
remote.c remote: fix typo 2012-05-20 18:48:10 -07:00
replace.c Convert many resolve_ref() calls to read_ref*() and ref_exists() 2011-11-13 12:21:06 -08:00
rerere.c
reset.c verify_filename(): ask the caller to chose the kind of diagnosis 2012-06-18 15:21:42 -07:00
rev-list.c Merge branch 'jk/maint-reflog-walk-count-vs-time' into maint 2012-05-14 11:46:16 -07:00
rev-parse.c Merge branch 'mm/verify-filename-fix' into maint 2012-07-11 12:45:49 -07:00
revert.c Merge branch 'cc/fix-missing-va-end-in-revert' into maint 2012-05-10 10:32:43 -07:00
rm.c
send-pack.c teach send-pack about --[no-]progress 2012-05-01 09:40:30 -07:00
shortlog.c
show-branch.c Rename resolve_ref() to resolve_ref_unsafe() 2011-12-13 09:39:46 -08:00
show-ref.c Convert many resolve_ref() calls to read_ref*() and ref_exists() 2011-11-13 12:21:06 -08:00
stripspace.c Update documentation for stripspace 2011-12-12 16:48:54 -08:00
symbolic-ref.c symbolic-ref --short: abbreviate the output unambiguously 2012-02-27 15:58:36 -08:00
tag.c ident: rename IDENT_ERROR_ON_NO_NAME to IDENT_STRICT 2012-05-24 17:16:41 -07:00
tar-tree.c
unpack-file.c
unpack-objects.c remove superfluous newlines in error messages 2012-04-30 15:45:51 -07:00
update-index.c Merge branch 'hv/submodule-update-nuke-submodules' into maint 2012-07-11 12:46:31 -07:00
update-ref.c update-ref: whitespace fix 2011-08-25 14:42:11 -07:00
update-server-info.c update-server-info: respect core.bigfilethreshold 2012-03-07 09:07:39 -08:00
upload-archive.c upload-archive: use start_command instead of fork 2011-11-21 14:32:40 -08:00
var.c ident: rename IDENT_ERROR_ON_NO_NAME to IDENT_STRICT 2012-05-24 17:16:41 -07:00
verify-pack.c
verify-tag.c verify-tag: Parse GPG configuration options. 2012-03-08 14:03:07 -08:00
write-tree.c