summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/pkg3
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/pkg b/bin/pkg
index 6beeda1..9af61de 100755
--- a/bin/pkg
+++ b/bin/pkg
@@ -263,7 +263,8 @@ function vcs_status {
# Set the correct origin
function vcs_fix_origin {
if [[ ! -r .git/remotes/origin && ! -r .git/refs/remotes/origin ]] {
- git remote add origin $PKG_ROOT/$1
+ fgrep '[remote "origin"]' .git/config ||
+ git remote add origin $PKG_ROOT/$1
}
git remote update &> /dev/null
}