You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been trying to use git log's -S option and get the output displayed in git. My first try was tig -S foo, which just says tig: No revisions match the given arguments.. Originally I thought that tig just didn't support this flag somehow, then I thought there was a bug in forwarding flags to git log and finally, after some strace experiments and re-reading the documentation more carefully, I realized that I should be using tig -Sfoo without a space and it works as expected.
I realize that this is a necessary limitation of tig not knowing how git log's arguments work and it is actually documented in the manpage:
The first command line parameter not starting with "-" is interpreted as being either a revision specification or a path and will end the option parsing.
However, it is not so obvious and easy to miss, so I'd suggest two improvements:
Make it more explicit that spaces should be omitted in the manpage (suggestion below).
Let the error message include the revision arguments tried. E.g. if tig -S foo would say: tig: No revisions match the arguments "foo", then I probably would have realized what was going on earlier.
For 1, how about adding a note under OPTIONS:
Note that this means that any arguments to options should be specified together. For example, run tig -Sfoo instead of tig -S foo, and tig --grep=foo instead of tig --grep foo, otherwise foo will be interpreted as a revision rather than an argument to -S.
The text was updated successfully, but these errors were encountered:
I've been trying to use
git log
's-S
option and get the output displayed in git. My first try wastig -S foo
, which just saystig: No revisions match the given arguments.
. Originally I thought that tig just didn't support this flag somehow, then I thought there was a bug in forwarding flags togit log
and finally, after somestrace
experiments and re-reading the documentation more carefully, I realized that I should be usingtig -Sfoo
without a space and it works as expected.I realize that this is a necessary limitation of
tig
not knowing howgit log
's arguments work and it is actually documented in the manpage:However, it is not so obvious and easy to miss, so I'd suggest two improvements:
tig -S foo
would say:tig: No revisions match the arguments "foo"
, then I probably would have realized what was going on earlier.For 1, how about adding a note under
OPTIONS
:The text was updated successfully, but these errors were encountered: