# pull --preserve-merges

6 messages from 2008-11-07 to 2008-11-10. Participants: Stephen Haberman, Johannes Schindelin, Francis Galiegue.
Thread: https://gitlist.dev/t/16214

## Stephen Haberman, 2008-11-07 22:01

Subject: pull --preserve-merges
Message-ID: <20081107160138.aa96405c.stephen@exigencecorp.com>
URL: https://gitlist.dev/e/20081107160138.aa96405c.stephen%40exigencecorp.com

```
Hi,

Awhile ago I brought up wanting to have a "rebase with preserve merges"
option for `git pull`:

http://thread.gmane.org/gmane.comp.version-control.git/96513

Andreas had a patch to help by supporting manually typing out `git pull
--rebase --preserve-merges`:

http://thread.gmane.org/gmane.comp.version-control.git/96593

And then I did another small copy/paste patch on top to add a config
setting of `branch.<name>.preservemerges` much like the existing
`branch.<name>.rebase`.

The patches haven't gotten an explicit "no" that I noticed, nor have
they been applied...is there anything I can do to move them along?
Resubmit them or what not?

Thanks,
Stephen

```

## Johannes Schindelin, 2008-11-08 15:08

Subject: Re: pull --preserve-merges
Message-ID: <alpine.DEB.1.00.0811081607300.30769@pacific.mpi-cbg.de>
URL: https://gitlist.dev/e/alpine.DEB.1.00.0811081607300.30769%40pacific.mpi-cbg.de
In-Reply-To: <20081107160138.aa96405c.stephen@exigencecorp.com>

```
Hi,

On Fri, 7 Nov 2008, Stephen Haberman wrote:

> Awhile ago I brought up wanting to have a "rebase with preserve merges"
> option for `git pull`

That might be something you want, but you cannot call it

	git pull --preserve-merges

since everybody used to "pull = fetch && merge" would go "Huh? A merge 
_does_ preserve merges".

If at all, you could call it "--rebase=preserve-merges".

Ciao,
Dscho

```

## Francis Galiegue, 2008-11-08 17:07

Subject: Re: pull --preserve-merges
Message-ID: <200811081807.53199.fg@one2team.net>
URL: https://gitlist.dev/e/200811081807.53199.fg%40one2team.net
In-Reply-To: <alpine.DEB.1.00.0811081607300.30769@pacific.mpi-cbg.de>

```
Le Saturday 08 November 2008 16:08:41 Johannes Schindelin, vous avez écrit :
> Hi,
>
> On Fri, 7 Nov 2008, Stephen Haberman wrote:
> > Awhile ago I brought up wanting to have a "rebase with preserve merges"
> > option for `git pull`
>
> That might be something you want, but you cannot call it
>
> 	git pull --preserve-merges
>
> since everybody used to "pull = fetch && merge" would go "Huh? A merge
> _does_ preserve merges".
>
> If at all, you could call it "--rebase=preserve-merges".
>

Why not --rebase --keep-merges? Personnally, I think it makes things clearer 
since in general options are either standalone or have a value.

-- 
fge

```

## Stephen Haberman, 2008-11-08 17:57

Subject: Re: pull --preserve-merges
Message-ID: <20081108115710.7f501aa9.stephen@exigencecorp.com>
URL: https://gitlist.dev/e/20081108115710.7f501aa9.stephen%40exigencecorp.com
In-Reply-To: <200811081807.53199.fg@one2team.net>

```

Replying to both Johannes and Francis...

> > > Awhile ago I brought up wanting to have a "rebase with preserve merges"
> > > option for `git pull`
> >
> > That might be something you want, but you cannot call it
> >
> > 	git pull --preserve-merges
> >
> > since everybody used to "pull = fetch && merge" would go "Huh? A merge
> > _does_ preserve merges".

Ah, right, sorry, Johannes, I know it only makes sense in the context if
--rebase is also being in use, I was just being too brief.

> > If at all, you could call it "--rebase=preserve-merges".

I'd be fine with that, I had not thought of it.

> Why not --rebase --keep-merges? Personnally, I think it makes things clearer 
> since in general options are either standalone or have a value.

I originally had --rebase --preserve-merges in mind because it matches
the existing -p/--preserve-merges flag that git rebase has that I'd
like git pull to just pass along.

If they were separate flags, passing just --preserve-merges without
--rebase should likely report an error. Probably the same thing if
someone sets `branch.name.preservemerges` but `branch.name.rebase` is
not set.

Unless instead of separate config parameters, `branch.name.rebase` uses
Johannes's suggestion and has separate values...true or false or
preserve-merges. That would probably better parallelize with the
--rebase=preserve-merges style command line argument.

Between one flag/config parameter or two flags/config parameters, I
could go either way and would be willing to patch together either one
to get it in.

Thanks,
Stephen

```

## Stephen Haberman, 2008-11-10 19:05

Subject: Re: pull --preserve-merges
Message-ID: <20081110130518.3eb64ceb.stephen@exigencecorp.com>
URL: https://gitlist.dev/e/20081110130518.3eb64ceb.stephen%40exigencecorp.com
In-Reply-To: <20081107160138.aa96405c.stephen@exigencecorp.com>

```

> Awhile ago I brought up wanting to have a "rebase with preserve merges"
> option for `git pull`:
>
> http://thread.gmane.org/gmane.comp.version-control.git/96513
>
> Andreas had a patch to help by supporting manually typing out `git pull
> --rebase --preserve-merges`:
>
> http://thread.gmane.org/gmane.comp.version-control.git/96593
>
> And then I did another small copy/paste patch on top to add a config
> setting of `branch.<name>.preservemerges` much like the existing
> `branch.<name>.rebase`.

I just noticed the `branch.<name>.mergeoptions` flag in the merge docs.
Instead of having both `branch.<name>.rebase` and `.preservemerges`, and
possibly even more config parameters for whatever other people what to
configure as well, would something like `branch.<name>.pulloptions` be a
better idea?

In our case, we could then set all the `branch.<name>.pulloptions` to
"--rebase --preserve-merges" (likely via a post-checkout hook) and be
happy with `git pull` "just working".

Adding pulloptions would make the patch a little bit trickier, for me
to implement anyway, and I assume the rebase flag would have to stay
for backwards compatibility, but if a pulloptions config parameter
approach would be more acceptable than an explicit preservemerges
config (and hence more likely to get the patches accepted), I'd be
willing to work on that.

Thanks,
Stephen

```

## Johannes Schindelin, 2008-11-10 19:48

Subject: Re: pull --preserve-merges
Message-ID: <alpine.DEB.1.00.0811102047130.30769@pacific.mpi-cbg.de>
URL: https://gitlist.dev/e/alpine.DEB.1.00.0811102047130.30769%40pacific.mpi-cbg.de
In-Reply-To: <20081110130518.3eb64ceb.stephen@exigencecorp.com>

```
Hi,

On Mon, 10 Nov 2008, Stephen Haberman wrote:

> [citing someone, presumably himself]
>
> > Awhile ago I brought up wanting to have a "rebase with preserve 
> > merges" option for `git pull`:
> >
> > http://thread.gmane.org/gmane.comp.version-control.git/96513
> >
> > Andreas had a patch to help by supporting manually typing out `git 
> > pull --rebase --preserve-merges`:
> >
> > http://thread.gmane.org/gmane.comp.version-control.git/96593
> >
> > And then I did another small copy/paste patch on top to add a config 
> > setting of `branch.<name>.preservemerges` much like the existing 
> > `branch.<name>.rebase`.
> 
> I just noticed the `branch.<name>.mergeoptions` flag in the merge docs.
> Instead of having both `branch.<name>.rebase` and `.preservemerges`, and
> possibly even more config parameters for whatever other people what to
> configure as well, would something like `branch.<name>.pulloptions` be a
> better idea?

Or we can stay backwards-compatible and support

	[branch "<name">]
		rebase = preserve-merges

Ciao,
Dscho

```
