all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* git help please: I want a git log with --author!=<name>.
@ 2019-06-03  9:14 Alan Mackenzie
  2019-06-03  9:44 ` Cenk Gündoğan
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Alan Mackenzie @ 2019-06-03  9:14 UTC (permalink / raw)
  To: emacs-devel

Hello, Emacs.

I would like to get a git log of all commits to cc-*.el which weren't
made by me.  A kind of negative of:

    git log --author=Mackenzie -- lisp/progmodes/cc-*.el

.  Scanning the git-log manual page hasn't been helpful.  The only thing
possibly relevant is --not, but this is essentially undocumented (the
man page doesn't say what it does).  So I try:

    git log --not --author=Mackenzie -- lisp/progmodes/cc-*.el

, but get exactly the same output as before.  :-(

   ..... --author!=Mackenzie .....

is just a syntax error.

Now I could write an AWK script to filter the output from git log to get
what I want, but I think I really shouldn't have to.

Would somebody please tell me how to get what I want from git log, or
tell me that it can't be done.  Thanks!

-- 
Alan Mackenzie (Nuremberg, Germany).



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

* Re: git help please: I want a git log with --author!=<name>.
  2019-06-03  9:14 git help please: I want a git log with --author!=<name> Alan Mackenzie
@ 2019-06-03  9:44 ` Cenk Gündoğan
  2019-06-03  9:54 ` Basil L. Contovounesios
  2019-06-07 19:05 ` Tassilo Horn
  2 siblings, 0 replies; 5+ messages in thread
From: Cenk Gündoğan @ 2019-06-03  9:44 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1341 bytes --]

Hello Alan,

you could try --invert-grep. Does the following statement help?

git log --author=Mackenzie --invert-grep -- lisp/progmodes/cc-*.el

Cheers,
Cenk

On Mon, Jun 03 2019 at 11:14 +0200, Alan Mackenzie wrote:

> Hello, Emacs.
>
> I would like to get a git log of all commits to cc-*.el which weren't
> made by me.  A kind of negative of:
>
>     git log --author=Mackenzie -- lisp/progmodes/cc-*.el
>
> .  Scanning the git-log manual page hasn't been helpful.  The only thing
> possibly relevant is --not, but this is essentially undocumented (the
> man page doesn't say what it does).  So I try:
>
>     git log --not --author=Mackenzie -- lisp/progmodes/cc-*.el
>
> , but get exactly the same output as before.  :-(
>
>    ..... --author!=Mackenzie .....
>
> is just a syntax error.
>
> Now I could write an AWK script to filter the output from git log to get
> what I want, but I think I really shouldn't have to.
>
> Would somebody please tell me how to get what I want from git log, or
> tell me that it can't be done.  Thanks!

--
Cenk Gündoğan

Hamburg University of Applied Sciences
Dept. of Computer Science / Internet Technologies Group
Berliner Tor 7, 20099 Hamburg, Germany
Fon: +49 40 42875 - 8426
Mail: cenk.guendogan@haw-hamburg.de
Web: https://www.inet.haw-hamburg.de/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

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

* Re: git help please: I want a git log with --author!=<name>.
  2019-06-03  9:14 git help please: I want a git log with --author!=<name> Alan Mackenzie
  2019-06-03  9:44 ` Cenk Gündoğan
@ 2019-06-03  9:54 ` Basil L. Contovounesios
  2019-06-03 12:39   ` Alan Mackenzie
  2019-06-07 19:05 ` Tassilo Horn
  2 siblings, 1 reply; 5+ messages in thread
From: Basil L. Contovounesios @ 2019-06-03  9:54 UTC (permalink / raw)
  To: Alan Mackenzie; +Cc: emacs-devel

Alan Mackenzie <acm@muc.de> writes:

> I would like to get a git log of all commits to cc-*.el which weren't
> made by me.  A kind of negative of:
>
>     git log --author=Mackenzie -- lisp/progmodes/cc-*.el
>
> .  Scanning the git-log manual page hasn't been helpful.  The only thing
> possibly relevant is --not, but this is essentially undocumented (the
> man page doesn't say what it does).  So I try:
>
>     git log --not --author=Mackenzie -- lisp/progmodes/cc-*.el
>
> , but get exactly the same output as before.  :-(
>
>    ..... --author!=Mackenzie .....
>
> is just a syntax error.
>
> Now I could write an AWK script to filter the output from git log to get
> what I want, but I think I really shouldn't have to.
>
> Would somebody please tell me how to get what I want from git log, or
> tell me that it can't be done.  Thanks!

It seems to be possible with --invert-grep[1]:

  git log --author=Mackenzie --invert-grep -- lisp/progmodes/cc-*.el

[1]: https://stackoverflow.com/q/6889830/3084001

-- 
Basil



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

* Re: git help please: I want a git log with --author!=<name>.
  2019-06-03  9:54 ` Basil L. Contovounesios
@ 2019-06-03 12:39   ` Alan Mackenzie
  0 siblings, 0 replies; 5+ messages in thread
From: Alan Mackenzie @ 2019-06-03 12:39 UTC (permalink / raw)
  To: Basil L. Contovounesios; +Cc: emacs-devel

Hello, Basil.

On Mon, Jun 03, 2019 at 10:54:31 +0100, Basil L. Contovounesios wrote:
> Alan Mackenzie <acm@muc.de> writes:

> > I would like to get a git log of all commits to cc-*.el which weren't
> > made by me.  A kind of negative of:

> >     git log --author=Mackenzie -- lisp/progmodes/cc-*.el

[ .... ]

> It seems to be possible with --invert-grep[1]:

>   git log --author=Mackenzie --invert-grep -- lisp/progmodes/cc-*.el

Thanks, that does indeed work!  :-)

> [1]: https://stackoverflow.com/q/6889830/3084001

> -- 
> Basil

-- 
Alan Mackenzie (Nuremberg, Germany).



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

* Re: git help please: I want a git log with --author!=<name>.
  2019-06-03  9:14 git help please: I want a git log with --author!=<name> Alan Mackenzie
  2019-06-03  9:44 ` Cenk Gündoğan
  2019-06-03  9:54 ` Basil L. Contovounesios
@ 2019-06-07 19:05 ` Tassilo Horn
  2 siblings, 0 replies; 5+ messages in thread
From: Tassilo Horn @ 2019-06-07 19:05 UTC (permalink / raw)
  To: Alan Mackenzie; +Cc: emacs-devel

Alan Mackenzie <acm@muc.de> writes:

> .  Scanning the git-log manual page hasn't been helpful.  The only
> thing possibly relevant is --not, but this is essentially undocumented
> (the man page doesn't say what it does).  So I try:
>
>     git log --not --author=Mackenzie -- lisp/progmodes/cc-*.el

The --not is the human understandable version of "..", i.e.,

  git log emacs-26 --not master
  
gives all commits reachable from emacs-26 but not reachable from master,
as does the older but unrecognizable (to me) syntax

  git log master..emacs-26
  
too.  If you are in a hurry, a leading ^ is the same as --not, so you
could also say

    git log emacs-26 ^master

That's all documented in the git-rev-parse manpage.

Bye,
Tassilo



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

end of thread, other threads:[~2019-06-07 19:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-03  9:14 git help please: I want a git log with --author!=<name> Alan Mackenzie
2019-06-03  9:44 ` Cenk Gündoğan
2019-06-03  9:54 ` Basil L. Contovounesios
2019-06-03 12:39   ` Alan Mackenzie
2019-06-07 19:05 ` Tassilo Horn

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.