From: Alireza <rezaxm@gmail.com>
To: git@vger.kernel.org
Subject: Considering merge --dry-run to foresee conflicts ahead of time
Date: Wed, 17 Feb 2021 20:51:45 +0330 [thread overview]
Message-ID: <CAD9n_qiN+qXqR79z_4d+_8_mxa9eTFB42sTUT8CTF8=oQArQaA@mail.gmail.com> (raw)
I have a half baked alias for this and it proved to be extremely
useful even in this state.
```
check = "!f() { BRANCH=${1:-HEAD}; BASE=${2:-origin/master}; git
merge-tree $(git merge-base $BRANCH $BASE) $BRANCH $BASE | sed -n
\"/+<<<<<<< .our/,/+>>>>>>> .their/p\"; }; f"
```
Of course with large conflicts it gets less useful. Getting only file
names from the patch isn't straightforward either.
So my question is what are the downsides to introducing a `merge
--dry-run` option and what would it look like?
next reply other threads:[~2021-02-17 17:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-17 17:21 Alireza [this message]
2021-02-17 18:39 ` Considering merge --dry-run to foresee conflicts ahead of time Konstantin Tokarev
2021-02-19 22:26 ` brian m. carlson
2021-02-19 23:59 ` Elijah Newren
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAD9n_qiN+qXqR79z_4d+_8_mxa9eTFB42sTUT8CTF8=oQArQaA@mail.gmail.com' \
--to=rezaxm@gmail.com \
--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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).