git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* What does 'git blame --before <rev> -- <file>' supposed to mean?
@ 2017-08-20 18:45 Kaartic Sivaraam
  2017-08-24  7:58 ` Kevin Daudt
  0 siblings, 1 reply; 3+ messages in thread
From: Kaartic Sivaraam @ 2017-08-20 18:45 UTC (permalink / raw)
  To: git

Hello all,

I tried to do a 'git blame' on a file and wanted to see the blame
before a particular revision of that file. I initially didn't know that
you could achieve that with,

    $ git blame <rev> <file>

I thought I need to pass the revision as a parameter so I tried (before
looking into the documentation) the command found in the subject. It
worked but to my surprise it had the same result as,

    $ git blame -- <file>

I was confused and came to know from the documentation that blame
doesn't have any '--before' option. That was even more surprising. Why
does blame accept an option which it doesn't identify? Shouldn't it
have warned that it doesn't accept the '--before' option? I guess it
should not accept it because it confuses the user a lot as the could
make it hard time for him to identify the issue.

'git blame' doesn't seem to be the only command that accepts options
not specified in the documentation there's 'git show' for it's company,

    $ git show --grep 'regex'

But the good thing with the above command is it behaves as expected. I
suspect this should be documented, anyway.

Thoughts ?

-- 
Kaartic

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-08-24 16:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-20 18:45 What does 'git blame --before <rev> -- <file>' supposed to mean? Kaartic Sivaraam
2017-08-24  7:58 ` Kevin Daudt
2017-08-24 16:35   ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).