From: Paul Eggert <eggert@cs.ucla.edu>
To: Noam Postavsky <npostavs@users.sourceforge.net>,
Yuri Khan <yuri.v.khan@gmail.com>
Cc: martin rudalics <rudalics@gmx.at>,
emacs-devel <emacs-devel@gnu.org>,
Andreas Schwab <schwab@suse.de>
Subject: Re: git pre-commit hook for merges (WAS: master has switched from Automake to GNU Make)
Date: Wed, 12 Apr 2017 11:26:22 -0700 [thread overview]
Message-ID: <955c464e-5833-10fd-9c02-d7edda70e488@cs.ucla.edu> (raw)
In-Reply-To: <CAM-tV--YVPgqtcR5fcUCkPdoQFNDjJ1dfqC7HuP54WJWEUVxog@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1036 bytes --]
On 04/11/2017 09:25 AM, Noam Postavsky wrote:
> Perhaps we should change the hook so that it doesn't complain about
> problems from merges?
Something like that might make sense, yes, for people in Alan's
situation. When I do a merge, though, I'd rather see problems from the
other side (so that I can fix them). How about an environment variable
that captures the user's preference?
> +# If we're merging, don't flag problems that came from the other side
> +# of the merge.
> +head=HEAD
> +if [ -f "$GIT_DIR"/MERGE_HEAD ] ; then
> + head=$(cat "$GIT_DIR"/MERGE_HEAD)
> +fi
This won't work if MERGE_HEAD file contains more than one entry, which
can happen when doing a 3- or more-way merge. How about the attached
(untested) patch instead? It behaves the way that you suggested, when
doing a 2-way merge and when the GIT_MERGE_BLINDLY environment variable
is set to 'true'. Offhand I don't see a way of supporting 3- or more-way
merges easily, so this patch punts and ignores GIT_MERGE_BLINDLY when
doing fancier merges.
[-- Attachment #2: 0001-Allow-bypassing-of-some-checks-when-merging.patch --]
[-- Type: application/x-patch, Size: 1803 bytes --]
next prev parent reply other threads:[~2017-04-12 18:26 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-11 16:25 git pre-commit hook for merges (WAS: master has switched from Automake to GNU Make) Noam Postavsky
2017-04-12 9:30 ` martin rudalics
2017-04-12 18:26 ` Paul Eggert [this message]
2017-04-13 0:13 ` Noam Postavsky
2017-04-13 1:49 ` Paul Eggert
2017-04-13 2:05 ` Noam Postavsky
2017-04-13 6:11 ` Paul Eggert
2017-04-13 20:04 ` Noam Postavsky
2017-04-29 18:00 ` Noam Postavsky
2017-04-29 18:44 ` Paul Eggert
2017-04-29 19:15 ` Eli Zaretskii
2017-04-29 19:54 ` Noam Postavsky
2017-04-29 20:04 ` Eli Zaretskii
2017-04-29 23:25 ` Noam Postavsky
2017-04-30 2:34 ` Eli Zaretskii
2017-04-30 19:35 ` Noam Postavsky
2017-04-30 19:40 ` Eli Zaretskii
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=955c464e-5833-10fd-9c02-d7edda70e488@cs.ucla.edu \
--to=eggert@cs.ucla.edu \
--cc=emacs-devel@gnu.org \
--cc=npostavs@users.sourceforge.net \
--cc=rudalics@gmx.at \
--cc=schwab@suse.de \
--cc=yuri.v.khan@gmail.com \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.