All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/7] merge requirement: index matches head
@ 2018-06-03  6:58 Elijah Newren
  2018-06-03  6:58 ` [RFC PATCH 1/7] t6044: verify that merges expected to abort actually abort Elijah Newren
                   ` (7 more replies)
  0 siblings, 8 replies; 30+ messages in thread
From: Elijah Newren @ 2018-06-03  6:58 UTC (permalink / raw)
  To: git; +Cc: jrnieder, Elijah Newren

Between working on some other things, I happened to be reading
Documentation/git-merge.txt and ran across the part that says:

    ...[merge will] abort if there are any changes registered in the
    index relative to the `HEAD` commit.  (One exception is when the
    changed index entries are in the state that would result from the
    merge already.)

I was pretty sure this statement was wrong, but did some digging to
uncover the details and the history.  What I thought would turn into a
simple three-line documentation fix, ballooned into this patch series.

This series might be best read in a different order; I'm not yet sure
the right way to structure it.  But:

  * Patch 5 demonstrates one of the ways that the parenthetical
    sentence is wrong (desirable perhaps, but not what is implemented)

  * Patch 7 explains the history, the trade-offs, the three ways the
    parenthetical sentence is wrong, and the many pitfalls we've run
    into trying to allow for such an exception.  Very small
    documentation fix with a huge commit message.

  * Patch 6 fixes the breakage demonstrated in patch 5, but if I only
    submitted patches 5-7, then the testsuite wouldn't pass because
    this fix uncovered multiple other bugs.  That's where patches 1-4
    came in.  This fix is also kind of opinionated; it takes the stance
    that allowing the exceptions isn't worth it.

Elijah Newren (7):
  t6044: verify that merges expected to abort actually abort
  t6044: add a testcase for index matching head, when head doesn't match HEAD
  merge-recursive: make sure when we say we abort that we actually abort
  merge-recursive: fix assumption that head tree being merged is HEAD
  t6044: add more testcases with staged changes before a merge is invoked
  merge-recursive: enforce rule that index matches head before merging
  merge: fix misleading pre-merge check documentation

 Documentation/git-merge.txt              |   6 +-
 builtin/am.c                             |   6 +-
 cache.h                                  |   8 --
 merge-recursive.c                        |  14 +--
 merge.c                                  |  10 +-
 t/t6044-merge-unrelated-index-changes.sh |  67 +++++++++++--
 t/t7504-commit-msg-hook.sh               |   4 +-
 t/t7611-merge-abort.sh                   | 118 -----------------------
 tree.h                                   |   8 ++
 9 files changed, 87 insertions(+), 154 deletions(-)

-- 
2.18.0.rc0.49.g3c08dc0fef


^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2018-07-11  3:11 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-03  6:58 [RFC PATCH 0/7] merge requirement: index matches head Elijah Newren
2018-06-03  6:58 ` [RFC PATCH 1/7] t6044: verify that merges expected to abort actually abort Elijah Newren
2018-06-03  6:58 ` [RFC PATCH 2/7] t6044: add a testcase for index matching head, when head doesn't match HEAD Elijah Newren
2018-06-03  6:58 ` [RFC PATCH 3/7] merge-recursive: make sure when we say we abort that we actually abort Elijah Newren
2018-06-03  6:58 ` [RFC PATCH 4/7] merge-recursive: fix assumption that head tree being merged is HEAD Elijah Newren
2018-06-03 13:52   ` Ramsay Jones
2018-06-03 23:37     ` brian m. carlson
2018-06-04  2:26       ` Ramsay Jones
2018-06-04  3:19   ` Junio C Hamano
2018-06-05  7:14     ` Elijah Newren
2018-06-11 16:15       ` Elijah Newren
2018-06-03  6:58 ` [RFC PATCH 5/7] t6044: add more testcases with staged changes before a merge is invoked Elijah Newren
2018-06-03  6:58 ` [RFC PATCH 6/7] merge-recursive: enforce rule that index matches head before merging Elijah Newren
2018-06-03  6:58 ` [RFC PATCH 7/7] merge: fix misleading pre-merge check documentation Elijah Newren
2018-06-07  5:27   ` Elijah Newren
2018-07-01  1:24 ` [PATCH v2 0/9] Fix merge issues with index not matching HEAD Elijah Newren
2018-07-01  1:24   ` [PATCH v2 1/9] read-cache.c: move index_has_changes() from merge.c Elijah Newren
2018-07-01  1:24   ` [PATCH v2 2/9] index_has_changes(): avoid assuming operating on the_index Elijah Newren
2018-07-03 19:44     ` Junio C Hamano
2018-07-01  1:24   ` [PATCH v2 3/9] t6044: verify that merges expected to abort actually abort Elijah Newren
2018-07-01  1:24   ` [PATCH v2 4/9] t6044: add a testcase for index matching head, when head doesn't match HEAD Elijah Newren
2018-07-10 20:39     ` SZEDER Gábor
2018-07-11  3:09       ` [RFC PATCH 2/7] " Elijah Newren
2018-07-01  1:24   ` [PATCH v2 5/9] merge-recursive: make sure when we say we abort that we actually abort Elijah Newren
2018-07-01  1:25   ` [PATCH v2 6/9] merge-recursive: fix assumption that head tree being merged is HEAD Elijah Newren
2018-07-03 19:57     ` Junio C Hamano
2018-07-01  1:25   ` [PATCH v2 7/9] t6044: add more testcases with staged changes before a merge is invoked Elijah Newren
2018-07-01  1:25   ` [PATCH v2 8/9] merge-recursive: enforce rule that index matches head before merging Elijah Newren
2018-07-03 20:05     ` Junio C Hamano
2018-07-01  1:25   ` [PATCH v2 9/9] merge: fix misleading pre-merge check documentation Elijah Newren

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.