# "git-pull --no-commit" should imply --no-ff...?

4 messages from 2008-06-21 to 2008-06-22. Participants: Stefan Richter, Graham Wilson, Miklos Vajna.
Thread: https://gitlist.dev/t/14073

## Stefan Richter, 2008-06-21 14:08

Subject: "git-pull --no-commit" should imply --no-ff...?
Message-ID: <tkrat.5aa5af8e9968819c@s5r6.in-berlin.de>
URL: https://gitlist.dev/e/tkrat.5aa5af8e9968819c%40s5r6.in-berlin.de

```
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/

```

## Graham Wilson, 2008-06-22 13:36

Subject: Re: "git-pull --no-commit" should imply --no-ff...?
Message-ID: <20080622133606.GA21828@endor.mknod.org>
URL: https://gitlist.dev/e/20080622133606.GA21828%40endor.mknod.org
In-Reply-To: <tkrat.5aa5af8e9968819c@s5r6.in-berlin.de>

```
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

```

## Miklos Vajna, 2008-06-22 13:49

Subject: Re: "git-pull --no-commit" should imply --no-ff...?
Message-ID: <20080622134946.GL29404@genesis.frugalware.org>
URL: https://gitlist.dev/e/20080622134946.GL29404%40genesis.frugalware.org
In-Reply-To: <20080622133606.GA21828@endor.mknod.org>

```
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?

```

## Stefan Richter, 2008-06-22 14:01

Subject: Re: "git-pull --no-commit" should imply --no-ff...?
Message-ID: <485E5B57.5000307@s5r6.in-berlin.de>
URL: https://gitlist.dev/e/485E5B57.5000307%40s5r6.in-berlin.de
In-Reply-To: <20080622133606.GA21828@endor.mknod.org>

```
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/

```
