From: "Robert P. J. Day" <rpjday@crashcourse.ca>
To: Git Mailing list <git@vger.kernel.org>
Subject: worth mentioning branch "mergeOptions" from "man git-merge"?
Date: Thu, 7 Mar 2019 08:31:43 -0500 (EST) [thread overview]
Message-ID: <alpine.LFD.2.21.1903070825230.8072@localhost.localdomain> (raw)
reading, in various places, people asking how to globally set
options for merging, to which the standard answer is, no, you can't do
that *globally*, but you can do it on a per-branch basis with
branch.<branchname>.mergeOptions
the most common example being to squash into master:
git config branch.master.mergeOptions "--squash"
however, i read in "man git-config":
merge.ff
By default, Git does not create an extra merge commit when
merging a commit that is a descendant of the current
commit. Instead, the tip of the current branch is
fast-forwarded. When set to false, this variable tells Git
to create an extra merge commit in such a case (equivalent
to giving the --no-ff option from the command line). When
set to only, only such fast-forward merges are allowed
(equivalent to giving the --ff-only option from the command
line).
where (based on a quick test i tried and, hopefully, did not screw
up), the per-branch mergeOptions value for fast-forwarding takes
precedence over the global merge.ff value.
this is the only merge option i've noticed that has a global
settings as well as per-branch setting. is it worth putting in an
extra line or two mentioning this in the man page? that is, as long as
i've understood this correctly.
rday
--
========================================================================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca/dokuwiki
Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
========================================================================
reply other threads:[~2019-03-07 13:31 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LFD.2.21.1903070825230.8072@localhost.localdomain \
--to=rpjday@crashcourse.ca \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).