* [PATCH] git-pasky: Add .gitrc directory to allow command defaults like with .cvsrc
@ 2005-04-22 16:28 Fabian Franz
2005-04-22 16:38 ` Petr Baudis
0 siblings, 1 reply; 2+ messages in thread
From: Fabian Franz @ 2005-04-22 16:28 UTC (permalink / raw)
To: git
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
one thing I liked about CVS was its way to configure default parameters for
commands.
And as I really like the colored log output, I wanted it as default.
While .cvsrc parsing would be quite expensive, using a directory + files
should be fairly cheap and result just in one additional stat-call.
So I added "-c" to ~/.gitrc/log and some code to parse this.
Index: git
===================================================================
- --- 0a9ee5a4d947b998a7ce489242800b39f98eeee5/git (mode:100755
sha1:39969debd59ed51c57973c819cdcc3ca8a7da819)
+++ uncommitted/git (mode:100755)
@@ -67,6 +67,7 @@
exit 1
fi
+[ -e "$HOME/.gitrc/$cmd" ] && set -- $(cat "$HOME/.gitrc/$cmd") "$@"
case "$cmd" in
"add") gitadd.sh "$@";;
cu
Fabian
PS: Should the commandline parsing be cleaned up or do you want to do that
after first release of cogito? And if yes, do you want to use "getopts" or
would this be not supported on some systems?
PPS: I'm fairly new to git, how do I create a diff with the signed-by fields
and with what do I need to sign it?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFCaSZDI0lSH7CXz7MRAoq8AJwM2lxPfl0ej32WU7q6bh6WIq5+EACgghGn
mvJzbvg6/bxWLFKfsP1ZEeI=
=03wm
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] git-pasky: Add .gitrc directory to allow command defaults like with .cvsrc
2005-04-22 16:28 [PATCH] git-pasky: Add .gitrc directory to allow command defaults like with .cvsrc Fabian Franz
@ 2005-04-22 16:38 ` Petr Baudis
0 siblings, 0 replies; 2+ messages in thread
From: Petr Baudis @ 2005-04-22 16:38 UTC (permalink / raw)
To: Fabian Franz; +Cc: git
Dear diary, on Fri, Apr 22, 2005 at 06:28:48PM CEST, I got a letter
where Fabian Franz <FabianFranz@gmx.de> told me that...
> Hi,
Hello,
> PS: Should the commandline parsing be cleaned up or do you want to do that
> after first release of cogito? And if yes, do you want to use "getopts" or
> would this be not supported on some systems?
I want to go for Perl in the longer term.
> PPS: I'm fairly new to git, how do I create a diff with the signed-by fields
> and with what do I need to sign it?
Put
Signed-off-by: Fabian Franz <FabianFranz@gmx.de>
in front of your patch.
--
Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
C++: an octopus made by nailing extra legs onto a dog. -- Steve Taylor
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-04-22 16:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-22 16:28 [PATCH] git-pasky: Add .gitrc directory to allow command defaults like with .cvsrc Fabian Franz
2005-04-22 16:38 ` Petr Baudis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox