Re: [PATCH 0/3] Reject non-ff pulls by default

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2013-09-08 14:10, Junio C Hamano wrote:
> Richard Hansen <rhansen@xxxxxxx> writes:
>> What about something like:
>>
>>     pull.mergeoptions (defaults to --ff-only)
>>     pull.rebaseoptions (defaults to empty?  --preserve-merges?)
>>     branch.<name>.pull.mergeoptions (defaults to pull.mergeoptions)
>>     branch.<name>.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.<name>.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.<name>.pull.mergeoptions
        Arguments to pass to 'git merge' during the merge phase of
        'git pull --merge'.
        Default: whatever pull.mergeoptions is set to.

    branch.<name>.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.<name>.pull.defaultIntegrationMode.
        Default: merge

    pull.mergeoptions
        See branch.<name>.pull.mergeoptions.
        Default: empty, but warn that a future version will change
        this to --ff-only.

    pull.rebaseoptions
        See branch.<name>.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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]