git log --author=me
Hi,
I've written a patch that allows me to be used as shorthand for $(user.name) or $(user.email) in the --author and --commiter fields.
The purpose being to make finding your own commits quicker and easier:
git log --author=me
Is this a change that would be accepted if submitted? The only thing it's currently missing is unit tests.
Regards,
Harry
Quoted 2 lines · Harry Jeffery
The purpose being to make finding your own commits quicker and easier:
git log --author=me
Since --author does a regexp search, this would most likely break someone's searches. Better add a new option for that functionality.
Andreas.
Signature · 3 lines
Andreas Schwab, [email protected] GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."
Quoted 7 lines · Andreas Schwab
Quoted 2 lines · Harry Jeffery
The purpose being to make finding your own commits quicker and easier:
git log --author=meSince --author does a regexp search, this would most likely break someone's searches. Better add a new option for that functionality.
I do not think it would hurt too much to add "--mine" to look for "--author" that matches you, but on the other hand, I am not sure its value outweighs the additional noise in the manual page.
It certainly does not help "I have done this much to this project in the time period, and you can look at the output of this command yourself to verify my claim. Type 'git shortlog --mine' and then promote me this season, please!" use case ;-)
So...
Quoted 7 lines · Junio C Hamano
Quoted 5 lines · Andreas Schwab
Quoted 2 lines · Harry Jeffery
The purpose being to make finding your own commits quicker and easier:
git log --author=me
Quoted 6 lines
Quoted 2 lines
Since --author does a regexp search, this would most likely break someone's searches. Better add a new option for that functionality.
I do not think it would hurt too much to add "--mine" to look for "--author" that matches you, but on the other hand, I am not sure its value outweighs the additional noise in the manual page.
I have a few aliases to congratulate myself for being such an awesome contributor from time to time ;-):
[alias]
mymaster = log --oneline [email protected] origin/master
It did require me to write these lines in my config file, but I think that the trouble of writing them is smaller than the extra noise in the manual page and possibly the output of git log -h. Having the shorthand "--author=me" would be better than "git log --mine" as far as cluttering the doc is concerned IMHO, but it's also likely to break someone's search.
BTW, the output of git log -h is disappointing:
$ git log -h
usage: git log [<options>] [<revision-range>] [[--] <path>...]
or: git show [<options>] <object>... -q, --quiet suppress diff output
--source show source
--use-mailmap Use mail map file
--decorate[=...] decorate options
-L <n,m:file> Process line range n,m in file, counting from 1There are far more options than this...
Signature · 2 lines
Matthieu Moy http://www-verimag.imag.fr/~moy/
Quoted 8 lines · Harry Jeffery
Hi,
I've written a patch that allows
meto be used as shorthand for $(user.name) or $(user.email) in the--authorand--commiterfields.The purpose being to make finding your own commits quicker and easier:
git log --author=me
It would be even cooler if it accepts mail aliases, then you can define "me" to your address and also have shortcuts to a few of your best friends. Though as Andreas pointed out --author is not a good fit because it accepts regex, and you can't use --mine either, so more work..
Signature · 1 line
Duy
Duy Nguyen venit, vidit, dixit 02.11.2015 19:37:
Quoted 10 lines · Harry Jeffery
Quoted 8 lines
Hi,
I've written a patch that allows
meto be used as shorthand for $(user.name) or $(user.email) in the--authorand--commiterfields.The purpose being to make finding your own commits quicker and easier:
git log --author=me
Quoted 6 lines
It would be even cooler if it accepts mail aliases, then you can define "me" to your address and also have shortcuts to a few of your best friends. Though as Andreas pointed out --author is not a good fit because it accepts regex, and you can't use --mine either, so more work..
Alternatively: How about teaching git-completion to complete the argument to --author? Expensive, I know, but faster than typing it out or realising "Michael J" is not as unique as you think ;)
Michael
Quoted 3 lines · Michael J Gruber
Alternatively: How about teaching git-completion to complete the argument to --author? Expensive, I know, but faster than typing it out or realising "Michael J" is not as unique as you think ;)
Or
$ git log --author="$me"
with
me='Michael J Gruber <[email protected]>'
in your $HOME/.profile or somewhere?
I personally would find "--author=me" not so bad (especially if finding _my_ work were a very important workflow element), and I may even tell people to do
$ git log --author='[m]e'
if they want to find anybody with substring 'me' in their ident.
But that is only if it weren't for existing users, and we live in an imperfect world where we seem to have many of existing users already.