On Tue, Apr 12, 2011 at 11:56:20AM -0700, Junio C Hamano wrote: > Carlos Martín Nieto <cmn@xxxxxxxx> writes: > > >> A patch to make --quiet not to squelch the patch output, and instead > >> silence any progress output would be a good addition. > > > > Something like this? I guess the only use case would be together with > > -o. > > When the user gives -q without giving -o to a new or an empty directory, > the user deserves to get what was asked on the command line, so I wouldn't > worry about this particular case. For a casual user, it is perfectly a > sensible thing to say "I'll eyeball; I don't have other files whose names > begin with [0-9]{4}- in my working tree" and I don't think we need safety > against doing that. > Agreed. > I however wonder if we should audit other commands in the "log" family to > see what they do when "--quiet" is given. I know what they do currently > is whatever they happen to do for a nonsense request, and in no way is a > designed behaviour. We simply did never think about that case. > > For example, what should "git show master^2 next^2" do with "--quiet"? Of > course the standard way to squelch diff output in the output from "show" > is to use "-s" (coming from "git diff-tree"), but giving "--quiet" should > at least be a no-op. > We get a similar effect to format-patch, and a line disappears carlos@bee:~/apps/git$ git show --oneline origin/master^2 origin/next^2 9973d93 t2021: mark a test as fixed diff --git a/t/t2021-checkout-overwrite.sh b/t/t2021-checkout-overwrite.sh index 27db2ad..5da63e9 100755 --- a/t/t2021-checkout-overwrite.sh +++ b/t/t2021-checkout-overwrite.sh @@ -39,7 +39,7 @@ test_expect_success SYMLINKS 'create a commit where dir a/b changed to symlink' [...] Diff here 9db1941 Merge branch 'js/checkout-untracked-symlink' and carlos@bee:~/apps/git$ git show --oneline --quiet origin/master^2 origin/next^2 9973d93 t2021: mark a test as fixed so we certainly should catch it. I'm not so sure what we should do with it, though. We shouldn't squelch all the output, because then it just makes the command useless (though I guess the user asked for it in that case). Maybe making it behave like a --no-diff option would make sense (i.e. pretend the user passed -s) in order to make it behave like a prettier version of rev-parse. Looking at the other cmd_ functions in builtin/log.c I see: - reflog ignores it - cherry complains that it doesn't know about the option - log -p --quiet is the same as log - whatchanged --quiet shows the same as log but skips every second commit - show --quiet skips one of the commits and I don't see any others, so whatchanged should be tought not to skip the commits. I'll what cmd_log does differently from cmd_whatchanged when passing options. cmn -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html