git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* "git-pull --no-commit" should imply --no-ff...?
@ 2008-06-21 14:08 Stefan Richter
  2008-06-22 13:36 ` Graham Wilson
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Richter @ 2008-06-21 14:08 UTC (permalink / raw
  To: git

Hi list,

trying "git pull --no-commit . foo" for the first time, I was confused
that --no-commit was a no-op when the pull resulted in a fast-forward.
I.e. HEAD advanced the whole chain of commits to foo.  I expected it to
apply the diff of HEAD..foo but not commit them.

I then learned that "git pull --no-ff --no-commit . foo" does what I
wanted.  What good does it do to ignore --no-commit in the fast-forward
case unless --no-ff is given?

This is with git 1.5.4.5.
-- 
Stefan Richter
-=====-==--- -==- =-=-=
http://arcgraph.de/sr/

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

* Re: "git-pull --no-commit" should imply --no-ff...?
  2008-06-21 14:08 "git-pull --no-commit" should imply --no-ff...? Stefan Richter
@ 2008-06-22 13:36 ` Graham Wilson
  2008-06-22 13:49   ` Miklos Vajna
  2008-06-22 14:01   ` Stefan Richter
  0 siblings, 2 replies; 4+ messages in thread
From: Graham Wilson @ 2008-06-22 13:36 UTC (permalink / raw
  To: Stefan Richter; +Cc: git

On Sat, Jun 21, 2008 at 04:08:51PM +0200, Stefan Richter wrote:
> trying "git pull --no-commit . foo" for the first time, I was confused
> that --no-commit was a no-op when the pull resulted in a fast-forward.
> I.e. HEAD advanced the whole chain of commits to foo.  I expected it to
> apply the diff of HEAD..foo but not commit them.

--no-commit to me seems to mean don't commit a merge commit. Maybe what
you want is something like:

 git-diff HEAD foo | git-apply

-- 
gram

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

* Re: "git-pull --no-commit" should imply --no-ff...?
  2008-06-22 13:36 ` Graham Wilson
@ 2008-06-22 13:49   ` Miklos Vajna
  2008-06-22 14:01   ` Stefan Richter
  1 sibling, 0 replies; 4+ messages in thread
From: Miklos Vajna @ 2008-06-22 13:49 UTC (permalink / raw
  To: Stefan Richter, git

[-- Attachment #1: Type: text/plain, Size: 619 bytes --]

On Sun, Jun 22, 2008 at 08:36:06AM -0500, Graham Wilson <graham@mknod.org> wrote:
> On Sat, Jun 21, 2008 at 04:08:51PM +0200, Stefan Richter wrote:
> > trying "git pull --no-commit . foo" for the first time, I was confused
> > that --no-commit was a no-op when the pull resulted in a fast-forward.
> > I.e. HEAD advanced the whole chain of commits to foo.  I expected it to
> > apply the diff of HEAD..foo but not commit them.
> 
> --no-commit to me seems to mean don't commit a merge commit. Maybe what
> you want is something like:
> 
>  git-diff HEAD foo | git-apply

Or git merge --no-commit --squash?

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

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

* Re: "git-pull --no-commit" should imply --no-ff...?
  2008-06-22 13:36 ` Graham Wilson
  2008-06-22 13:49   ` Miklos Vajna
@ 2008-06-22 14:01   ` Stefan Richter
  1 sibling, 0 replies; 4+ messages in thread
From: Stefan Richter @ 2008-06-22 14:01 UTC (permalink / raw
  To: git

Graham Wilson wrote:
> On Sat, Jun 21, 2008 at 04:08:51PM +0200, Stefan Richter wrote:
>> trying "git pull --no-commit . foo" for the first time, I was confused
>> that --no-commit was a no-op when the pull resulted in a fast-forward.
>> I.e. HEAD advanced the whole chain of commits to foo.  I expected it to
>> apply the diff of HEAD..foo but not commit them.
> 
> --no-commit to me seems to mean don't commit a merge commit. Maybe what
> you want is something like:
> 
>  git-diff HEAD foo | git-apply
> 

Yes, I obviously got the wrong idea about git-pull --no-commit.
git-diff + git-apply indeed accomplishes what I wanted to do.  Thanks,
-- 
Stefan Richter
-=====-==--- -==- =-==-
http://arcgraph.de/sr/

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

end of thread, other threads:[~2008-06-22 14:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-21 14:08 "git-pull --no-commit" should imply --no-ff...? Stefan Richter
2008-06-22 13:36 ` Graham Wilson
2008-06-22 13:49   ` Miklos Vajna
2008-06-22 14:01   ` Stefan Richter

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).