From: Richard Hansen Date: Sun, 08 Sep 2013 20:05:30 GMT Subject: Re: [PATCH 0/3] Reject non-ff pulls by default Message-ID: <522CD88A.3060708@bbn.com> In-Reply-To: On 2013-09-08 14:10, Junio C Hamano wrote: > Richard Hansen writes: >> What about something like: >> >> pull.mergeoptions (defaults to --ff-only) >> pull.rebaseoptions (defaults to empty? --preserve-merges?) >> branch..pull.mergeoptions (defaults to pull.mergeoptions) >> branch..pull.rebaseoptions (defaults to pull.rebaseoptions) > [snip] > But it does not help Philip's case, if I understand correctly, where > running "git pull" on some branches is always a mistake and the user > wants it to stop at "fetch the history and objects needed to > complete the history from the other side" phase without proceeding > to the "then integrate the history from the other side and the > history of your branch into one" step, which may be done with either > merge or rebase. How about: branch..pull.defaultIntegrationMode = merge | rebase | none If 'merge', pull acts like 'git pull --merge' by default, merging the other commits into this branch. If 'rebase', pull acts like 'git pull --rebase' by default, rebasing this branch onto the other commits. If 'none', pull acts like 'git fetch' by default. Default: whatever pull.defaultIntegrationMode is set to. branch..pull.mergeoptions Arguments to pass to 'git merge' during the merge phase of 'git pull --merge'. Default: whatever pull.mergeoptions is set to. branch..pull.rebaseoptions Arguments to pass to 'git rebase' during the rebase phase of 'git pull --rebase'. Default: whatever pull.rebaseoptions is set to. pull.defaultIntegrationMode = rebase | merge | none See branch..pull.defaultIntegrationMode. Default: merge pull.mergeoptions See branch..pull.mergeoptions. Default: empty, but warn that a future version will change this to --ff-only. pull.rebaseoptions See branch..pull.rebaseoptions. Default: empty, but warn that a future version will change this to --preserve-merges? There's probably a better alternative to the term 'defaultIntegrationMode'. We could even add a defaultIntegrationMode = merge-there that reverses the parent order (the other commits become the first parent, the current branch becomes the second parent). -Richard