* Feature Request: View transformation operator for git commit object's read
[not found] ` <001e01d6f0cd$f5aaed30$e100c790$@gmail.com>
@ 2021-01-22 17:27 ` Jacek Lipiec
0 siblings, 0 replies; only message in thread
From: Jacek Lipiec @ 2021-01-22 17:27 UTC (permalink / raw)
To: git
Hey,
Recently I was thinking about various methods to bring order to a
chaos of commit messages that are used throughout the dev space –
namely conventional commits and, as alternative, emoji-log. First
method focuses on context, while the second one focuses on
presentation. Both are trying to bend current GIT capabilities to
convey context.
Feature request:
Option to add a transforming script to the output of all read
operations on commit object.
Example:
$ GIT SHOW FDCCAE00C2D112717306F91A21BFA2BBDDB7DCF6
COMMIT FDCCAE00C2D112717306F91A21BFA2BBDDB7DCF6
MERGE: 6A235DB 0FCD13B
AUTHOR: JACEK LIPIEC <jacek.lipiec.bc@gmail.com>
DATE: THU NOV 7 21:11:45 2020 +0100
FEAT(LANG): SOME LANG FEATURE
with view transformation script of, either:
/^FEAT\((?<SCOPE>.+?)\)/ => 👌
/^FEAT\((?<SCOPE>.+?)\)/ => <SPAN TITLE=”SCOPE: $SCOPE”>👌</SPAN>
it could work like this:
$ GIT CONFIG VIEW.TRANSFORMATION.EMOJI=/^FEAT\((?<SCOPE>.+?)\):/ => 👌
$ GIT CONFIG VIEW.TRANSFORMATION.FULLTEXT=/^FEAT\((?<SCOPE>.+?)\):/
=> FEATURE $REST WITH SCOPE $SCOPE
$ GIT CONFIG
VIEW.TRANSFORMATION.SHELLSCRIPT=/HOME/JACEK/PARSE-COMMIT-MESSAGE.SH
$ GIT SHOW –TRANSFORM=EMOJI FDCCAE00C2D112717306F91A21BFA2BBDDB7DCF6
COMMIT FDCCAE00C2D112717306F91A21BFA2BBDDB7DCF6
MERGE: 6A235DB 0FCD13B
AUTHOR: JACEK LIPIEC <JACEK.LIPIEC.BC@GMAIL.COM>
DATE: THU NOV 7 21:11:45 2020 +0100
👌: SOME LANG FEATURE
$ GIT SHOW –TRANSFORM= FULLTEXT FDCCAE00C2D112717306F91A21BFA2BBDDB7DCF6
COMMIT FDCCAE00C2D112717306F91A21BFA2BBDDB7DCF6
MERGE: 6A235DB 0FCD13B
AUTHOR: JACEK LIPIEC <JACEK.LIPIEC.BC@GMAIL.COM>
DATE: THU NOV 7 21:11:45 2020 +0100
FEATURE SOME LANG FEATURE WITH SCOPE LANG
Would allow both backwards compatibility and an option to return a
result in a way that can be easily read by humans, or alternatively,
easily parsable by machine.
Z poważaniem/Regards,
Jacek Lipiec
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-01-22 17:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <000001d6f0cd$40f07270$c2d15750$@gmail.com>
[not found] ` <001e01d6f0cd$f5aaed30$e100c790$@gmail.com>
2021-01-22 17:27 ` Feature Request: View transformation operator for git commit object's read Jacek Lipiec
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).