From: David Kowis <dkowis@shlrm.org>
To: Nikolai Weibull <now@bitwi.se>
Cc: Yakov Lerner <iler.ml@gmail.com>, git@vger.kernel.org
Subject: Re: Thoughts on adding another hook to git
Date: Tue, 13 Jun 2006 08:03:50 -0500 [thread overview]
Message-ID: <448EB7B6.4020708@shlrm.org> (raw)
In-Reply-To: <dbfc82860606122329w77c566evb94ca79081a0a057@mail.gmail.com>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Nikolai Weibull wrote:
> On 6/12/06, David Kowis <dkowis@shlrm.org> wrote:
>> Yakov Lerner wrote:
>
>> > git-commit sure creates those temp files with
>> > specific naming in specific dir. You could check for
>> > that in EDITOR script. In the script, you could even check
>> > the name of the parent process.
>
>> This is true. However, I'd be running that script every time something
>> invoked $EDITOR. And some people may not like that solution. I'm
>> thinking that more than just I will like to use this pre-edit hook.
>> Especially in the distro I'm helping develop.
>
> Perhaps you could tell us what editor you are using. That way we may
> provide additional solutions.
>
I'm using vim. But that's irrelevant with what I'm trying to do.
Perhaps I need to explain more:
In SourceMage, we have a collection of scripts, the grimoire, that
contain the little bits of instructions on how to build and install all
the software. 99% of the time most commits are based in one directory.
For example:
I just updated the abook spell (A spell is that collection of
instructions I mentioned earlier.)
I modified two files. DETAILS and HISTORY.
DETAILS contains the version information, and a source hash to verify
downloads (and a bit of other stuff, but it's not important). HISTORY is
just a changelog. Now I do `git commit .`
I get:
1 # Explicit paths specified without -i nor -o; assuming --only paths...
2 #
3 # Updated but not checked in:
4 # (will commit)
5 #
6 # modified: mail/abook/DETAILS
7 # modified: mail/abook/HISTORY
What I'd like to be able to do is have that "abook" directory name
automatically added to the top of my commit message before it gets into
the editor. I can do this with a script (echo ${PWD##*/}) but it'd need
to be a hook before the editor shows up.
1 abook:
2 # Explicit paths specified without -i nor -o; assuming --only paths...
3 #
4 # Updated but not checked in:
5 # (will commit)
6 #
7 # modified: mail/abook/DETAILS
8 # modified: mail/abook/HISTORY
It helps in the short log (git log) for describing for which spell the
log refers. Although it could be done with an EDITOR script I don't
think that's the best solution. It's certainly not a good solution to
give out to a lot of people. Most of the changes to our grimoire are
like this one, so this would be extremely useful to us.
Hope that clears things up a bit,
- --
David Kowis
ISO Team Lead - www.sourcemage.org
Source Mage GNU/Linux
Progress isn't made by early risers. It's made by lazy men trying to
find easier ways to do something.
- Robert Heinlein
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (MingW32)
iQGVAwUBRI63tsnf+vRw63ObAQqvqAv/QkyEi4/wIDo+sQGMPkXhj/e7yMDXbVLm
XYaVhlxOG3rXfaEu6ecdjm8b6h4UYCMFnhYKUiDqD42LlEdofCIOecGULyP5Nx9q
JAL8BaZpq4MwRQt4HiX9oLQBTIW2ZcD9Fg5ZqFUL3QWFbjednbEl+M8/41JGFL4s
XpvIcKHfAy90qdG5QrgsHdQTAS6JG+9mFmyi4d0wlDWBh4WoutfEfL/nwbH79d2B
Udq6j/SIy0dmsbjNmzJnPYn5IVrFYGez4y5bW7LDpO5ddf4027iz9mNb8hd0wCzL
akh1f4xQQ178iaFz4y60TTmNavxswRmdoKTghRKet0MXTtBTUXe0TUJ5vNOtKODz
5MWu9M5/olCcLqlb7L6wnvqJ9HnJTvAEAUQpvKztQcC2Uy2XkpznW3XmeEK50CLU
VQjxSzubUfXDxkf/hS1nY3WKL3UuQoGWVDmL2Maxno+Kwb3YoyW5+etvYvfoqNT7
Vi7bpiX6fPVF/r6ogATzqla2EFLsta1f
=m3vG
-----END PGP SIGNATURE-----
next prev parent reply other threads:[~2006-06-13 13:04 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-12 18:27 Thoughts on adding another hook to git David Kowis
2006-06-12 19:06 ` Yakov Lerner
2006-06-12 19:10 ` David Kowis
2006-06-12 19:18 ` Yakov Lerner
2006-06-12 19:22 ` David Kowis
2006-06-13 6:29 ` Nikolai Weibull
2006-06-13 13:03 ` David Kowis [this message]
2006-06-13 15:26 ` Nikolai Weibull
2006-06-13 18:41 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=448EB7B6.4020708@shlrm.org \
--to=dkowis@shlrm.org \
--cc=git@vger.kernel.org \
--cc=iler.ml@gmail.com \
--cc=now@bitwi.se \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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 NNTP newsgroup(s).