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

[PATCH v2 0/2] Address recovery failures with directory/file conflicts

From
Elijah Newren <newren@gmail.com>
Date
Jul 13, 2018, 16:33 UTC
Message-ID
<20180713163331.22446-1-newren@gmail.com>
In-Reply-To
<20180711051834.28181-1-newren@gmail.com>
This patch series fixes several "recovery" commands that outright fail
or do not fully recover when directory-file conflicts are present.
This includes:
   * git read-tree --reset HEAD
   * git am --skip
   * git am --abort
   * git merge --abort (or git reset --merge)
   * git reset --hard
Changes since v1 (full range-diff below):
  - Make use of test_write_lines, as suggested by Eric.
  - Provide a little more explanation in one of the commit messages, as
    suggested by Junio.
Elijah Newren (2):
  t1015: demonstrate directory/file conflict recovery failures
  read-cache: fix directory/file conflict handling in
    read_index_unmerged()
 read-cache.c                         |  13 +--
 t/t1015-read-index-unmerged.sh       | 123 +++++++++++++++++++++++++++
 t/t6020-merge-df.sh                  |   3 -
 t/t6042-merge-rename-corner-cases.sh |   1 -
 4 files changed, 131 insertions(+), 9 deletions(-)
 create mode 100755 t/t1015-read-index-unmerged.sh
1:  a85e462914 ! 1:  8f53327a8d t1015: demonstrate directory/file conflict recovery failures
    @@ -29,7 +29,7 @@
     +	(
     +		cd df_plus_modify_delete &&
     +
    -+		printf "a\nb\nc\nd\ne\nf\ng\nh\n" >letters &&
    ++		test_write_lines a b c d e f g h >letters &&
     +		git add letters &&
     +		git commit -m initial &&
     +
2:  43d5b0a5ae ! 2:  990a469d44 read-cache: fix directory/file conflict handling in read_index_unmerged()
    @@ -53,7 +53,9 @@
         we can just skip the DFCHECK and allow both the file and directory to
         appear in the index.  The temporary simultaneous appearance of the
         directory and file entries in the index will be removed by the callers
    -    before they attempt to write the index anywhere.
    +    by calling unpack_trees(), which excludes these unmerged entries marked
    +    with CE_CONFLICTED flag from the resulting index, before they attempt to
    +    write the index anywhere.
     
         Signed-off-by: Elijah Newren <newren@gmail.com>
     
-- 
2.18.0.645.g72fe132ec2
Previous: Elijah NewrenNext: Elijah Newren
Message 8 of 14 in “Address recovery failures with directory/file conflicts”
  1. 0/2 Address recovery failures with directory/file conflictsElijah Newren, Jul 11, 2018
  2. 1/2 t1015: demonstrate directory/file conflict recovery failuresElijah Newren, Jul 11, 2018
  3. Eric SunshineJul 11, 2018
  4. Elijah NewrenJul 11, 2018
  5. 2/2 read-cache: fix directory/file conflict handling in read_index_unmerged()Elijah Newren, Jul 11, 2018
  6. Junio C HamanoJul 11, 2018
  7. Elijah NewrenJul 11, 2018
  8. 0/2 Address recovery failures with directory/file conflictsElijah Newren, Jul 13, 2018
  9. 2/2 read-cache: fix directory/file conflict handling in read_index_unmerged()Elijah Newren, Jul 13, 2018
  10. 1/2 t1015: demonstrate directory/file conflict recovery failuresElijah Newren, Jul 13, 2018
  11. Elijah NewrenJul 13, 2018
  12. 0/2 Address recovery failures with directory/file conflictsElijah Newren, Jul 31, 2018
  13. 2/2 read-cache: fix directory/file conflict handling in read_index_unmerged()Elijah Newren, Jul 31, 2018
  14. 1/2 t1015: demonstrate directory/file conflict recovery failuresElijah Newren, Jul 31, 2018

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.