summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2009-03-05 19:17:49 +0100
committerDaniel Friesel <derf@derf.homelinux.org>2009-03-05 19:17:49 +0100
commit8bdaa461a51249ea78cc957d2def9d72598f5c7c (patch)
tree69c3d523419007a5eda4a4c627de1807d250ab69 /bin
parent1b7c674d7f4f02b3d292a17d93fac883fd457424 (diff)
vcs_fix_origin: Also check for origin in .git/config
Diffstat (limited to 'bin')
-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
}