From: sean <seanlkml@sympatico.ca>
To: Junio C Hamano <junkio@cox.net>
Cc: git@vger.kernel.org
Subject: Re: git-commit: allow From: line to be entered in commit message
Date: Thu, 12 Jan 2006 23:51:03 -0500 [thread overview]
Message-ID: <BAYC1-PASMTP01A07DAA61F181E9D9679EAE260@CEZ.ICE> (raw)
Message-ID: <20060112235103.42665813.seanlkml@sympatico.ca> (raw)
In-Reply-To: <7vzmm0eod1.fsf@assigned-by-dhcp.cox.net>
On Thu, 12 Jan 2006 20:35:54 -0800
Junio C Hamano <junkio@cox.net> wrote:
> You are obviously not talking about the use of "git commit" as a
> building block of some script (if you were, it would not make an
> iota of difference whether it is a command line option, an extra
> "echo From: $name" prepending that to the body of the message,
> or setting GIT_AUTHOR_* variables).
Correct. Although, even as a building block script this might
be a nice little touch; as you mentioned it might be able to
simplify the git-am script.
> So you must be talking about some manual process, at the end of
> which the user invokes "git commit" from the command line.
Yes, and in truth I only have a vague notion of his process.
> But I would imagine that "git commit" is preceded by a bigger
> process of preparing the tree to the committable state out of
> what is stored in the foreign SCM, after the user figures out
> which commit to pick from (in the original example; the
> committable state may come from something other than SCM ---
> e.g. set of tarballs or patch application or random monkey
> typing). And the whole process of "preparing the tree" and
> "committing" would be done number of times (otherwise we would
> not be having this discussion --- just use GIT_AUTHOR_* which is
> already available), so having to set them as separate steps
> between 'preparing the tree' and 'committing using "git commit"'
> is cumbersome.
Agreed, except even in the one-off case I think being able to set
the author info on the command line would be better. The GIT_AUTHOR_*
variables only really make sense for defaults, and even that is better
handled with .git/config nowadays.
>
> But you would write 'preparing the tree' (which may include
> "figuring out who the author is and what the log has to say" if
> the committable state is coming from a foreign SCM) script
> anyway, and I simply do not understand why inserting a couple of
> setting and exporting of GIT_AUTHOR_* variables at the very end
> of that script before calling "git commit" from it, to make it
> not just a 'preparing the tree' script but 'prepare the tree and
> commit' script is such a big deal for you.
Hmmm.. we've already agreed that if there is a script to prepare
the tree then this is a non-issue. We're only talking when
everything is done from the command line. In fact, i'm suggesting
that if you offer this on the command line (or From: line) that fewer
scripts would need to be hacked together by git users for some simple
cases.
> If the committable state does not come from foreign SCM, then
> 'preparing tree' stage may only be able to prepare a committable
> tree, and log and authorship information might need to be
> typed/pasted by the user. But then your script would just do
> "read author" or "${VISUAL-vi} .msgfile" before eventually
> calling 'GIT_AUTHOR_NAME="$author" git commit -F .msgfile' from
> there, so I do not think it is such a big deal either.
Yes, this is almost what I emailed to the gentleman in the first place,
but as you noted there is more than just one variable to set so you can't
do it that way.. you end up having to:
$ export GIT_AUTHOR_NAME="$author"
$ GIT_AUTHOR_EMAIL="$email" git commit -F .msgfile
Which is cumbersome and also ends up destroying your defaults if you happen
to use that method, so afterward you have to unset them or reset them back
to your own author info. If git handled a GIT_AUTHOR_COMBINED or some such
where you could give the name and email together in one variable which
would be parsed, then that suggestion would be slightly more palatable
but still seems more obtuse than either just accepting it on the command
line or via a From: line.
> I guess the disagreement is primarily coming from that you think
> "git commit" is always the uppermost UI layer, while I feel "git
> commit" is _one_ possible building block of bigger scripts, but
> the true building block is "git commit-tree".
>
Yes, I think you nailed it here. I do see git-commit as a end-user script
rather than just a building block.
Sean
next prev parent reply other threads:[~2006-01-13 4:55 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20060112093700.1d3d25db.seanlkml@sympatico.ca>
2006-01-12 14:37 ` git-commit: allow From: line to be entered in commit message sean
[not found] ` <20060112102123.581e373e.seanlkml@sympatico.ca>
2006-01-12 15:21 ` sean
2006-01-12 20:13 ` Junio C Hamano
2006-01-12 21:53 ` Andreas Ericsson
2006-01-12 22:15 ` Junio C Hamano
[not found] ` <20060112214307.174f5719.seanlkml@sympatico.ca>
2006-01-13 2:43 ` sean
[not found] ` <20060112213207.05d76b28.seanlkml@sympatico.ca>
2006-01-13 2:32 ` sean
2006-01-13 4:03 ` Junio C Hamano
[not found] ` <20060112230633.0858694a.seanlkml@sympatico.ca>
2006-01-13 4:06 ` sean
2006-01-13 4:35 ` Junio C Hamano
[not found] ` <20060112235103.42665813.seanlkml@sympatico.ca>
2006-01-13 4:51 ` sean [this message]
2006-01-13 11:11 ` Artem Khodush
2006-01-13 17:40 ` Junio C Hamano
[not found] ` <20060113125404.58c4ce30.seanlkml@sympatico.ca>
2006-01-13 17:54 ` sean
2006-01-13 19:51 ` Junio C Hamano
2006-01-13 21:53 ` Johannes Schindelin
2006-01-12 19:00 ` Joel Becker
2006-01-12 20:22 ` Junio C Hamano
2006-01-13 6:58 ` Joel Becker
2006-01-13 7:06 ` Junio C Hamano
2006-01-13 19:12 ` Joel Becker
2006-01-13 19:39 ` Junio C Hamano
2006-01-13 20:01 ` Joel Becker
2006-01-13 20:33 ` Junio C Hamano
2006-01-13 20:46 ` Junio C Hamano
2006-01-13 21:47 ` Johannes Schindelin
2006-01-12 20:16 ` Alex Riesen
[not found] ` <20060112214642.3c88282c.seanlkml@sympatico.ca>
2006-01-13 2:46 ` sean
2006-01-13 3:58 ` Junio C Hamano
[not found] ` <20060112225800.411a04c1.seanlkml@sympatico.ca>
2006-01-13 3:58 ` sean
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=BAYC1-PASMTP01A07DAA61F181E9D9679EAE260@CEZ.ICE \
--to=seanlkml@sympatico.ca \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
/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).