git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* auto commit merge using the default merge message
@ 2009-04-23  7:46 Caleb Cushing
  2009-04-23  7:57 ` Alex Riesen
  0 siblings, 1 reply; 10+ messages in thread
From: Caleb Cushing @ 2009-04-23  7:46 UTC (permalink / raw)
  To: git

so I do the same merge all the time... sorta, I'm not sure rerere
would actually work because the file is different each time... I just
have to delete it each time. and I want to automate the process.
checkout merge rm commmit, problem is commit brings and editor up, I
want to commit with the 'auto inserted merge message' that is
generated, without seeing the editor, how do I do this?

-- 
Caleb Cushing

http://xenoterracide.blogspot.com

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: auto commit merge using the default merge message
  2009-04-23  7:46 auto commit merge using the default merge message Caleb Cushing
@ 2009-04-23  7:57 ` Alex Riesen
  2009-04-23  8:25   ` Michael J Gruber
  0 siblings, 1 reply; 10+ messages in thread
From: Alex Riesen @ 2009-04-23  7:57 UTC (permalink / raw)
  To: Caleb Cushing; +Cc: git

2009/4/23 Caleb Cushing <xenoterracide@gmail.com>:
> so I do the same merge all the time... sorta, I'm not sure rerere
> would actually work because the file is different each time... I just
> have to delete it each time. and I want to automate the process.
> checkout merge rm commmit, problem is commit brings and editor up, I
> want to commit with the 'auto inserted merge message' that is
> generated, without seeing the editor, how do I do this?

See git commit -C <commit-with-fitting-description>,
git commit -F <message-file> and git commit -m "message text".

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: auto commit merge using the default merge message
  2009-04-23  7:57 ` Alex Riesen
@ 2009-04-23  8:25   ` Michael J Gruber
  2009-04-23  8:32     ` Junio C Hamano
  0 siblings, 1 reply; 10+ messages in thread
From: Michael J Gruber @ 2009-04-23  8:25 UTC (permalink / raw)
  To: Alex Riesen; +Cc: Caleb Cushing, git

Alex Riesen venit, vidit, dixit 23.04.2009 09:57:
> 2009/4/23 Caleb Cushing <xenoterracide@gmail.com>:
>> so I do the same merge all the time... sorta, I'm not sure rerere
>> would actually work because the file is different each time... I just
>> have to delete it each time. and I want to automate the process.
>> checkout merge rm commmit, problem is commit brings and editor up, I
>> want to commit with the 'auto inserted merge message' that is
>> generated, without seeing the editor, how do I do this?
> 
> See git commit -C <commit-with-fitting-description>,
> git commit -F <message-file> and git commit -m "message text".

I think he wants the auto generated message which may be different for
each merge. Maybe something like

GIT_EDITOR=/bin/true git commit

will do the trick.

Michael

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: auto commit merge using the default merge message
  2009-04-23  8:25   ` Michael J Gruber
@ 2009-04-23  8:32     ` Junio C Hamano
  2009-04-23  9:07       ` Michael J Gruber
  2009-04-24  1:31       ` Caleb Cushing
  0 siblings, 2 replies; 10+ messages in thread
From: Junio C Hamano @ 2009-04-23  8:32 UTC (permalink / raw)
  To: Michael J Gruber; +Cc: Alex Riesen, Caleb Cushing, git

Michael J Gruber <git@drmicha.warpmail.net> writes:

> I think he wants the auto generated message which may be different for
> each merge. Maybe something like
>
> GIT_EDITOR=/bin/true git commit
>
> will do the trick.

Use "GIT_EDITOR=:" instead.  It also is *true* just like /bin/true, but
git knows a simple magic about this and avoids an extra fork+exec.

A similar trick exists for GIT_PAGER=cat (not "/bin/cat"), by the way.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: auto commit merge using the default merge message
  2009-04-23  8:32     ` Junio C Hamano
@ 2009-04-23  9:07       ` Michael J Gruber
  2009-04-23 16:19         ` Brian Gernhardt
  2009-04-24  1:31       ` Caleb Cushing
  1 sibling, 1 reply; 10+ messages in thread
From: Michael J Gruber @ 2009-04-23  9:07 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Alex Riesen, Caleb Cushing, git

Junio C Hamano venit, vidit, dixit 23.04.2009 10:32:
> Michael J Gruber <git@drmicha.warpmail.net> writes:
> 
>> I think he wants the auto generated message which may be different
>> for each merge. Maybe something like
>> 
>> GIT_EDITOR=/bin/true git commit
>> 
>> will do the trick.
> 
> Use "GIT_EDITOR=:" instead.  It also is *true* just like /bin/true,
> but git knows a simple magic about this and avoids an extra
> fork+exec.

Good to know!

> A similar trick exists for GIT_PAGER=cat (not "/bin/cat"), by the
> way.
> 

So, GIT_PAGER=cat differs from GIT_PAGER=/bin/cat even when `which
cat`==/bin/cat?

Michael

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: auto commit merge using the default merge message
  2009-04-23  9:07       ` Michael J Gruber
@ 2009-04-23 16:19         ` Brian Gernhardt
  0 siblings, 0 replies; 10+ messages in thread
From: Brian Gernhardt @ 2009-04-23 16:19 UTC (permalink / raw)
  To: Michael J Gruber; +Cc: Junio C Hamano, Alex Riesen, Caleb Cushing, git


On Apr 23, 2009, at 5:07 AM, Michael J Gruber wrote:

> Junio C Hamano venit, vidit, dixit 23.04.2009 10:32:
>> Use "GIT_EDITOR=:" instead.  It also is *true* just like /bin/true,
>> but git knows a simple magic about this and avoids an extra
>> fork+exec.
>
> Good to know!
>
>> A similar trick exists for GIT_PAGER=cat (not "/bin/cat"), by the
>> way.
>>
>
> So, GIT_PAGER=cat differs from GIT_PAGER=/bin/cat even when `which
> cat`==/bin/cat?

Yes, if $GIT_PAGER == "cat", then git won't launch a pager at all.  If  
$GIT_PAGER == "/bin/cat", then git will launch /bin/cat and pipe all  
of it's output through it.  The result is (assuming a functional /bin/ 
cat) identical, but "cat" avoids the extra memory usage of "/bin/cat".

~~ Brian

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: auto commit merge using the default merge message
  2009-04-23  8:32     ` Junio C Hamano
  2009-04-23  9:07       ` Michael J Gruber
@ 2009-04-24  1:31       ` Caleb Cushing
  2009-04-24 14:06         ` Jeff King
  1 sibling, 1 reply; 10+ messages in thread
From: Caleb Cushing @ 2009-04-24  1:31 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Michael J Gruber, Alex Riesen, git

On Thu, Apr 23, 2009 at 4:32 AM, Junio C Hamano <gitster@pobox.com> wrote:
> Use "GIT_EDITOR=:" instead.  It also is *true* just like /bin/true, but
> git knows a simple magic about this and avoids an extra fork+exec.
>

So I could put

GIT_EDITOR=:

at the top of my shell script, and then whenever I need to do a
commit, just git commit and it'll work (assuming the commit has a
default message).

-- 
Caleb Cushing

http://xenoterracide.blogspot.com

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: auto commit merge using the default merge message
  2009-04-24  1:31       ` Caleb Cushing
@ 2009-04-24 14:06         ` Jeff King
  2009-04-24 17:50           ` Caleb Cushing
  0 siblings, 1 reply; 10+ messages in thread
From: Jeff King @ 2009-04-24 14:06 UTC (permalink / raw)
  To: Caleb Cushing; +Cc: Junio C Hamano, Michael J Gruber, Alex Riesen, git

On Thu, Apr 23, 2009 at 09:31:10PM -0400, Caleb Cushing wrote:

> On Thu, Apr 23, 2009 at 4:32 AM, Junio C Hamano <gitster@pobox.com> wrote:
> > Use "GIT_EDITOR=:" instead.  It also is *true* just like /bin/true, but
> > git knows a simple magic about this and avoids an extra fork+exec.
> >
> 
> So I could put
> 
> GIT_EDITOR=:
> 
> at the top of my shell script, and then whenever I need to do a
> commit, just git commit and it'll work (assuming the commit has a
> default message).

You need to also

  export GIT_EDITOR

for "git commit" to see it.

-Peff

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: auto commit merge using the default merge message
  2009-04-24 14:06         ` Jeff King
@ 2009-04-24 17:50           ` Caleb Cushing
  2009-04-24 17:55             ` Jeff King
  0 siblings, 1 reply; 10+ messages in thread
From: Caleb Cushing @ 2009-04-24 17:50 UTC (permalink / raw)
  To: Jeff King; +Cc: Junio C Hamano, Michael J Gruber, Alex Riesen, git

On Fri, Apr 24, 2009 at 10:06 AM, Jeff King <peff@peff.net> wrote:
> export GIT_EDITOR
>

maybe I'm being silly, but won't that then affect my interactive shells?

-- 
Caleb Cushing

http://xenoterracide.blogspot.com

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: auto commit merge using the default merge message
  2009-04-24 17:50           ` Caleb Cushing
@ 2009-04-24 17:55             ` Jeff King
  0 siblings, 0 replies; 10+ messages in thread
From: Jeff King @ 2009-04-24 17:55 UTC (permalink / raw)
  To: Caleb Cushing; +Cc: git

On Fri, Apr 24, 2009 at 01:50:57PM -0400, Caleb Cushing wrote:

> On Fri, Apr 24, 2009 at 10:06 AM, Jeff King <peff@peff.net> wrote:
> > export GIT_EDITOR
> >
> maybe I'm being silly, but won't that then affect my interactive shells?

No, because you're putting it in your shell script, not in your .profile
(right?). The "export" command just tells the shell "pass this variable
in the environment to any child processes you spawn". Without it, the
variable is local to that shell.

-Peff

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2009-04-24 17:56 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-23  7:46 auto commit merge using the default merge message Caleb Cushing
2009-04-23  7:57 ` Alex Riesen
2009-04-23  8:25   ` Michael J Gruber
2009-04-23  8:32     ` Junio C Hamano
2009-04-23  9:07       ` Michael J Gruber
2009-04-23 16:19         ` Brian Gernhardt
2009-04-24  1:31       ` Caleb Cushing
2009-04-24 14:06         ` Jeff King
2009-04-24 17:50           ` Caleb Cushing
2009-04-24 17:55             ` Jeff King

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).