git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Stefan Beller <sbeller@google.com>
To: gitster@pobox.com
Cc: git@vger.kernel.org, David.Turner@twosigma.com,
	bmwill@google.com, sandals@crustytoothpaste.net,
	Stefan Beller <sbeller@google.com>
Subject: [PATCHv2 0/5] git-rm absorbs submodule git directory before deletion
Date: Tue, 13 Dec 2016 12:56:17 -0800	[thread overview]
Message-ID: <20161213205622.841-1-sbeller@google.com> (raw)

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
  submodule: add flags to ok_to_remove_submodule
  ok_to_remove_submodule: absorb the submodule git dir
  rm: add absorb a submodules git dir before deletion

 builtin/rm.c  | 33 ++++++++-----------------
 cache.h       |  2 ++
 entry.c       |  5 ++++
 submodule.c   | 77 +++++++++++++++++++++++++++++++++++++++++++++++++----------
 submodule.h   | 64 ++++++++++++++++++++++++++++++-------------------
 t/t3600-rm.sh | 39 ++++++++++++------------------
 6 files changed, 135 insertions(+), 85 deletions(-)

-- 
2.11.0.rc2.35.g26e18c9


             reply	other threads:[~2016-12-13 20:56 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-13 20:56 Stefan Beller [this message]
2016-12-13 20:56 ` [PATCHv2 1/5] submodule.h: add extern keyword to functions Stefan Beller
2016-12-13 20:56 ` [PATCHv2 2/5] submodule: modernize ok_to_remove_submodule to use argv_array Stefan Beller
2016-12-14 18:39   ` Junio C Hamano
2016-12-13 20:56 ` [PATCHv2 3/5] submodule: add flags to ok_to_remove_submodule Stefan Beller
2016-12-13 20:56 ` [PATCHv2 4/5] ok_to_remove_submodule: absorb the submodule git dir Stefan Beller
2016-12-14 18:46   ` Junio C Hamano
2016-12-14 18:52     ` Stefan Beller
2016-12-13 20:56 ` [PATCHv2 5/5] rm: add absorb a submodules git dir before deletion Stefan Beller
2016-12-14 18:55   ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161213205622.841-1-sbeller@google.com \
    --to=sbeller@google.com \
    --cc=David.Turner@twosigma.com \
    --cc=bmwill@google.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=sandals@crustytoothpaste.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).