All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCHv4 0/5] git-rm absorbs submodule git directory before deletion
@ 2016-12-19 23:28 Stefan Beller
  2016-12-19 23:28 ` [PATCHv4 1/5] submodule.h: add extern keyword to functions Stefan Beller
                   ` (5 more replies)
  0 siblings, 6 replies; 16+ messages in thread
From: Stefan Beller @ 2016-12-19 23:28 UTC (permalink / raw)
  To: gitster; +Cc: git, bmwill, sandals, David.Turner, Stefan Beller

v4:
* reworded commit messages of the last 2 patches
* introduced a new patch introducing {run,start,finish}_command_or_die
* found an existing function in dir.h to use to remove a directory
  which deals gracefully with the cornercases, that Junio pointed out.

v3:
* removed the patch to enhance ok_to_remove_submodule to absorb the submodule
  if needed
* Removed all the error reporting from git-rm that was related to submodule
  git directories not absorbed.
* instead just absorb the git repositories or let the absorb function die
  with an appropriate error message.

v2:
* new base where to apply the patch:
  sb/submodule-embed-gitdir merged with sb/t3600-cleanup.
  I got merge conflicts and resolved them this way:
#@@@ -709,9 -687,10 +687,9 @@@ test_expect_success 'checking out a com
#          git commit -m "submodule removal" submod &&
#          git checkout HEAD^ &&
#          git submodule update &&
#-         git checkout -q HEAD^ 2>actual &&
#+         git checkout -q HEAD^ &&
#          git checkout -q master 2>actual &&
# -        echo "warning: unable to rmdir submod: Directory not empty" >expected &&
# -        test_i18ncmp expected actual &&
# +        test_i18ngrep "^warning: unable to rmdir submod:" actual &&
#          git status -s submod >actual &&
#          echo "?? submod/" >expected &&
#          test_cmp expected actual &&
#

* improved commit message in "ok_to_remove_submodule: absorb the submodule git dir"
  (David Turner offered me some advice on how to write better English off list)
* simplified code in last patch:
  -> dropped wrong comment for fallthrough
  -> moved redundant code out of both bodies of an if-clause.
* Fixed last patchs commit message to have "or_die" instead of or_dir.

v1:
The "checkout --recurse-submodules" series got too large to comfortably send
it out for review, so I had to break it up into smaller series'; this is the
first subseries, but it makes sense on its own.

This series teaches git-rm to absorb the git directory of a submodule instead
of failing and complaining about the git directory preventing deletion.

It applies on origin/sb/submodule-embed-gitdir.

Any feedback welcome!

Thanks,
Stefan

Stefan Beller (5):
  submodule.h: add extern keyword to functions
  submodule: modernize ok_to_remove_submodule to use argv_array
  run-command: add {run,start,finish}_command_or_die
  submodule: add flags to ok_to_remove_submodule
  rm: absorb a submodules git dir before deletion

 builtin/rm.c  | 82 +++++++++++++++--------------------------------------------
 run-command.c | 28 ++++++++++++++++++++
 run-command.h |  4 +++
 submodule.c   | 27 ++++++++++----------
 submodule.h   | 58 ++++++++++++++++++++++++------------------
 t/t3600-rm.sh | 39 +++++++++++-----------------
 6 files changed, 114 insertions(+), 124 deletions(-)

-- 
2.11.0.rc2.53.gb7b3fba.dirty


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

end of thread, other threads:[~2016-12-20 22:08 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-19 23:28 [PATCHv4 0/5] git-rm absorbs submodule git directory before deletion Stefan Beller
2016-12-19 23:28 ` [PATCHv4 1/5] submodule.h: add extern keyword to functions Stefan Beller
2016-12-19 23:28 ` [PATCHv4 2/5] submodule: modernize ok_to_remove_submodule to use argv_array Stefan Beller
2016-12-19 23:28 ` [PATCHv4 3/5] run-command: add {run,start,finish}_command_or_die Stefan Beller
2016-12-19 23:32   ` Brandon Williams
2016-12-19 23:35     ` Stefan Beller
2016-12-20 18:33   ` Johannes Sixt
2016-12-20 18:54     ` Johannes Sixt
2016-12-20 19:23     ` Stefan Beller
2016-12-20 20:12       ` Johannes Sixt
2016-12-20 20:49         ` Stefan Beller
2016-12-20 21:47           ` Johannes Sixt
2016-12-20 22:07             ` Stefan Beller
2016-12-19 23:28 ` [PATCHv4 4/5] submodule: add flags to ok_to_remove_submodule Stefan Beller
2016-12-19 23:28 ` [PATCHv4 5/5] rm: absorb a submodules git dir before deletion Stefan Beller
2016-12-19 23:35 ` [PATCHv4 0/5] git-rm absorbs submodule git directory " David Turner

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.