git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Considering merge --dry-run to foresee conflicts ahead of time

From
KTKonstantin Tokarev <annulen@yandex.ru>
Date
Feb 17, 2021, 18:39 UTC
Message-ID
<526751613587054@mail.yandex.ru>
In-Reply-To
<CAD9n_qiN+qXqR79z_4d+_8_mxa9eTFB42sTUT8CTF8=oQArQaA@mail.gmail.com>
17.02.2021, 20:25, "Alireza" <rezaxm@gmail.com>:
Show 14 quoted lines
> 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?

As a git user, I would very much welcome this addition, and similar for cherry-pick, provided they don't modify any files in working copy.

--  Regards, Konstantin

Previous: AlirezaNext: brian m. carlson
Message 2 of 4 in “Considering merge --dry-run to foresee conflicts ahead of time”
  1. AlirezaFeb 17, 2021
  2. Konstantin TokarevFeb 17, 2021
  3. brian m. carlsonFeb 19, 2021
  4. Elijah NewrenFeb 19, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.