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

Re: Forcing --no-ff on pull

From
RBR. Tyler Ballance <tyler@slide.com>
Date
Dec 9, 2008, 10:45 UTC
Message-ID
<1228819557.18611.80.camel@starfruit.local>
In-Reply-To
<8c5c35580812090231u28076844nf5a9225349c20801@mail.gmail.com>
On Tue, 2008-12-09 at 11:31 +0100, Lars Hjemli wrote:
Show 17 quoted lines
> On Tue, Dec 9, 2008 at 11:12, R. Tyler Ballance <tyler@slide.com> wrote:
> > On Tue, 2008-12-09 at 10:49 +0100, Lars Hjemli wrote:
> >> On Tue, Dec 9, 2008 at 10:34, R. Tyler Ballance <tyler@slide.com> wrote:
> >> > Is there a header macro I can define or a config option I could define
> >> > to make --no-ff on `git pull` implicit instead of explicit?
> >>
> >> Try this:
> >> $ git config branch.stable.mergeoptions "--no-ff"
> >
> > I recall stumbling across this a while ago looking at the git-config(1)
> > man page, but this isn't /quite/ what we need.
> >
> > I'm talking about forcing for *every* pull, it's a safe assumption to
> > make that we want a merge commit every time somebody fast-forwards a
> > branch.
> 
> $ git config alias.xpull "pull --no-ff" ?

Interesting, I might have to try that out (wasn't aware of `git config alias.<alias>`)

Show 6 quoted lines
> 
> But are you sure you never want a fast-forward on _any_ branch? I use
> --no-ff unconditionally on the master and stable branches as $dayjob,
> to make sure that the merging of feature/bugfix-branches are
> explicitly noted in history, but I almost never use it on other
> branches.

I understand this, it's a funny situation. When we were evaluating Git my team *never* had these issues because we all kept our trees in good condition such that we never accidentally merged down to a stable branch, but we also almost always generated merge commits because of the variety of changes that would be going into stable at any given time.

I agree that I wouldn't want/need to use it on WIP branches or purely local branches for development, so if I were able to restrict --no-ff to only be forced on tracked branches I would be happy enough :)

Really hate to take this much bandwidth up on the mailing list over such a silly problem, but after spending a week trying to /talk/ and educate some folks, I feel drastic measures need to be taken ;)

Cheers 
-- 
-R. Tyler Ballance
Slide, Inc.
Previous: Lars HjemliNext: Lars Hjemli
Message 6 of 15 in “Forcing --no-ff on pull”
  1. R. Tyler BallanceDec 9, 2008
  2. Jakub NarebskiDec 9, 2008
  3. Lars HjemliDec 9, 2008
  4. R. Tyler BallanceDec 9, 2008
  5. Lars HjemliDec 9, 2008
  6. R. Tyler BallanceDec 9, 2008
  7. Lars HjemliDec 9, 2008
  8. Stephen HabermanDec 9, 2008
  9. Johannes SixtDec 9, 2008
  10. Nanako ShiraishiDec 9, 2008
  11. R. Tyler BallanceDec 9, 2008
  12. Jeff KingDec 9, 2008
  13. Boyd Stephen Smith Jr.Dec 9, 2008
  14. Daniel BarkalowDec 9, 2008
  15. Stephen HabermanDec 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.