[PATCH] submodule: prevent warning in summary output

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxxxx>
---
 git-submodule.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/git-submodule.sh b/git-submodule.sh
index 2979197..66ee621 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -1071,7 +1071,7 @@ cmd_summary() {
 		missing_dst=
 
 		test $mod_src = 160000 &&
-		! GIT_DIR="$name/.git" git-rev-parse -q --verify $sha1_src^0 >/dev/null &&
+		! GIT_DIR="$name/.git" git-rev-parse -q --verify $sha1_src^0 >/dev/null 2>&1 &&
 		missing_src=t
 
 		test $mod_dst = 160000 &&
-- 
1.8.4.rc2.564.g10ce5ae

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]