From 8bdaa461a51249ea78cc957d2def9d72598f5c7c Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Thu, 5 Mar 2009 19:17:49 +0100 Subject: vcs_fix_origin: Also check for origin in .git/config --- bin/pkg | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 } -- cgit v1.2.3