git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: pull --preserve-merges

From
Stephen Haberman <stephen@exigencecorp.com>
Date
Nov 8, 2008, 17:57 UTC
Message-ID
<20081108115710.7f501aa9.stephen@exigencecorp.com>
In-Reply-To
<200811081807.53199.fg@one2team.net>
Replying to both Johannes and Francis...
Show 9 quoted lines
> > > 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

Previous: Francis GaliegueNext: Stephen Haberman
Message 4 of 6 in “pull --preserve-merges”
  1. Stephen HabermanNov 7, 2008
  2. Johannes SchindelinNov 8, 2008
  3. Francis GaliegueNov 8, 2008
  4. Stephen HabermanNov 8, 2008
  5. Stephen HabermanNov 10, 2008
  6. Johannes SchindelinNov 10, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.