From: "brian m. carlson" <sandals@crustytoothpaste.net>
To: git@vger.kernel.org
Cc: judge.packham@gmail.com, gitster@pobox.com
Subject: [PATCH v2] submodule: prevent warning in summary output
Date: Tue, 20 Aug 2013 00:26:37 +0000 [thread overview]
Message-ID: <1376958397-800967-1-git-send-email-sandals@crustytoothpaste.net> (raw)
When git submodule summary is run and there is a deleted submodule, there is an
warning from git rev-parse:
fatal: Not a git repository: '.vim/pathogen/.git'
Silence this warning, since it is fully expected that a deleted submodule will
not be a git repository.
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
---
I hesitated to add the test for $status because it will end up having no effect
since we exclude that case later. However, for correctness, I included it.
git-submodule.sh | 3 +++
1 file changed, 3 insertions(+)
diff --git a/git-submodule.sh b/git-submodule.sh
index 2979197..eec3135 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -1070,7 +1070,10 @@ cmd_summary() {
missing_src=
missing_dst=
+ test $status = D && missing_src=t
+
test $mod_src = 160000 &&
+ test -e "$name/.git" &&
! GIT_DIR="$name/.git" git-rev-parse -q --verify $sha1_src^0 >/dev/null &&
missing_src=t
--
1.8.4.rc3
next reply other threads:[~2013-08-20 0:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-20 0:26 brian m. carlson [this message]
2013-08-26 8:26 ` [PATCH v2] submodule: prevent warning in summary output Chris Packham
2013-08-26 19:59 ` Jens Lehmann
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1376958397-800967-1-git-send-email-sandals@crustytoothpaste.net \
--to=sandals@crustytoothpaste.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=judge.packham@gmail.com \
/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.
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 NNTP newsgroup(s).