All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Levedahl <mlevedahl@gmail.com>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 1/2] commit.c - provide commit-type to the hooks/pre-commit script
Date: Sun, 06 Jun 2010 20:21:22 -0400	[thread overview]
Message-ID: <4C0C3B82.3030504@gmail.com> (raw)
In-Reply-To: <20100606221037.GE6993@coredump.intra.peff.net>

On 06/06/2010 06:10 PM, Jeff King wrote:
> On Sat, Jun 05, 2010 at 01:39:50PM -0400, Mark Levedahl wrote:
>
>    
>> -	if (!no_verify&&  run_hook(index_file, "pre-commit", NULL))
>> +	if (!no_verify&&  run_hook(index_file, "pre-commit", amend ? "amend" : "normal", NULL))
>> [...]
>> -	against=HEAD
>> +	if test "$1" = "amend"
>> +	then
>> +		against=HEAD~1
>> +	else
>> +		against=HEAD
>> +	fi
>>      
> Is there a reason to use the magic "amend" and "normal" words, if
> scripts are just going to end up changing them back into HEAD~1 and HEAD
> anyway?
>
> -Peff
>
>    
Well, git-gui's internal $commit_type variable has the values 
normal|amend, so I went with those. So , yes there is a reason, but 
maybe not a great one :^). Given some consensus, this is trivial to 
change. I'll let things cook a while longer before sending a new patch.

Mark

  reply	other threads:[~2010-06-07  0:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-05 17:39 [PATCH 1/2] commit.c - provide commit-type to the hooks/pre-commit script Mark Levedahl
2010-06-05 17:43 ` [PATCH 2/2] git-gui " Mark Levedahl
2010-06-06 22:10 ` [PATCH 1/2] commit.c " Jeff King
2010-06-07  0:21   ` Mark Levedahl [this message]
2010-06-07  6:26   ` Johannes Sixt
2010-06-07  6:38     ` Jeff King
2010-06-08  2:55       ` Mark Levedahl

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=4C0C3B82.3030504@gmail.com \
    --to=mlevedahl@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.