[PATCH 1/5] parse-remote: remove unused GIT_DIR variable

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

 



This variable was last used in code removed way back in
45781adb9a ("get_remote_url(): use the same data source as ls-remote
to get remote urls", 2011-03-01).

Since it's only used in git-submodule.sh it could have been the case
that the code there relied on us setting $GIT_DIR, but that's not the
case. The only use of $GIT_DIR in git-submodule.sh involves a $GIT_DIR
variable that the code there sets by itself.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx>
---
 git-parse-remote.sh | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/git-parse-remote.sh b/git-parse-remote.sh
index d3c39980f3..6b743cda17 100644
--- a/git-parse-remote.sh
+++ b/git-parse-remote.sh
@@ -2,10 +2,6 @@
 # upstream branch that should be pulled by "git pull" from the current
 # branch.
 
-# git-ls-remote could be called from outside a git managed repository;
-# this would fail in that case and would issue an error message.
-GIT_DIR=$(git rev-parse -q --git-dir) || :;
-
 get_default_remote () {
 	curr_branch=$(git symbolic-ref -q HEAD)
 	curr_branch="${curr_branch#refs/heads/}"
-- 
2.29.2.222.g5d2a92d10f8




[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]

  Powered by Linux