git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [Feature request] "Hooks" for git log
@ 2020-03-12 15:06 Konstantin Tokarev
  2020-03-12 16:21 ` Konstantin Tokarev
  2020-03-12 18:58 ` Junio C Hamano
  0 siblings, 2 replies; 6+ messages in thread
From: Konstantin Tokarev @ 2020-03-12 15:06 UTC (permalink / raw)
  To: git@vger.kernel.org

Hello,

While it's possible to filter commits in `git log` by their contents with
--grep and -S options, it's not always possible for formulate desirable
filter in their terms.

I think it would be very useful if git log provided new option named e.g.
--hook or --script, which would take script path as an argument.
git log would follow it's normal way of operation, applying other filtering
options it was given, however intstead of printing info on commit that
matches filters, it invokes script with commit hash as an argument.
Script can do whatever it needs with hash, including any git operations,
can print commit info to log if needed, or print something else, or keep
silence. If script returns non-zero, parent git log command terminates,
otherwise it continues.

-- 
Regards,
Konstantin



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

end of thread, other threads:[~2020-03-12 19:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-12 15:06 [Feature request] "Hooks" for git log Konstantin Tokarev
2020-03-12 16:21 ` Konstantin Tokarev
2020-03-12 18:58 ` Junio C Hamano
2020-03-12 19:08   ` Konstantin Tokarev
2020-03-12 19:24     ` Konstantin Tokarev
2020-03-12 19:31       ` Junio C Hamano

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).