This is the series I sought feedback for some time ago in gmane/$245048. It
took longer than I expected to finish this series because I had to diagnose
the test failures I saw with some of the ten commands I added since then.
They boiled down to four different inconsistencies in Git's handling of new
or removed submodules. Sometimes no empty directory is created for a new
submodule. stash and cherry-pick seem to use wrong submodule ignore settings
("all" instead of "dirty"), so they overlook submodule changes. And merge
behaves strange when a submodule is removed, as it tries to merge new tracked
files with those remaining from the submodule. This series only documents
these issues (which most probably didn't cause any real world problems until
now because adding and removing submodules wasn't well supported anyway).

The first patch adds a simple helper function to the test lib which makes
it easier to test for an empty submodule directory.

The second patch contains the heavy lifting, it adds the test framework for
switching submodules. Currently only transitions without merge conflicts are
tested for, I intend to add others producing merge conflicts in a follow-up

The other twelve patches use the framework to test all relevant work tree
manipulating commands. In addition to the two general problems documented
in the second patch some patches add known failures for problems of some
commands/actions to be fixed in later patches.

The only work tree changing command I didn't cover here is checkout-index, as
that updates the work tree to the content of the index but doesn't remove any
formerly tracked files, which means it doesn't do a full transition from one
commit to another. If I overlooked another command, please speak up so I can
include it too.

Jens Lehmann (14):
  test-lib: add test_dir_is_empty()
  submodules: Add the test library
  checkout: call the new submodule update test framework
  apply: add t4137 for submodule updates
  read-tree: add t1013 for submodule updates
  reset: add t7112 for submodule updates
  bisect: add t6041 for submodule updates
  merge: add t7613 for submodule updates
  rebase: add t3426 for submodule updates
  pull: add t5572 for submodule updates
  cherry-pick: add t3512 for submodule updates
  am: add t4255 for submodule updates
  stash: add t3906 for submodule updates
  revert: add t3513 for submodule updates

 t/        | 670 +++++++++++++++++++++++++++++++++++++++
 t/   |  12 +
 t/    |   5 +
 t/      |  46 +++
 t/ |  13 +
 t/      |  32 ++
 t/       |  24 ++
 t/       |  20 ++
 t/          |  21 ++
 t/        |  74 +++++
 t/      |  32 ++
 t/       |  14 +
 t/       |  19 ++
 t/          |  11 +
 14 files changed, 993 insertions(+)
 create mode 100755 t/
 create mode 100755 t/
 create mode 100755 t/
 create mode 100755 t/
 create mode 100755 t/
 create mode 100755 t/
 create mode 100755 t/
 create mode 100755 t/
 create mode 100755 t/
 create mode 100755 t/
 create mode 100755 t/
 create mode 100755 t/


To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to
More majordomo info at

Reply via email to