]> ToastFreeware Gitweb - gregoa/movein.git/blobdiff - movein
Set GIT_WORK_TREE relative to repository.
[gregoa/movein.git] / movein
diff --git a/movein b/movein
index ccdd709f49bce012f1217c0aacb8e8d70584d807..ea98b73caef5ea50511eeccb99ab8d138adc1d74 100755 (executable)
--- a/movein
+++ b/movein
@@ -152,9 +152,10 @@ add() {
        git remote add origin $REPO_URL
        git config branch.master.remote origin
        git config branch.master.merge refs/heads/master
-       git config core.worktree ../../
        git config core.bare false
-       GIT_WORK_TREE="$PWD" git pull
+       git config core.worktree ../../
+       git config status.showUntrackedFiles no
+       GIT_WORK_TREE="$LOCAL_REPO/../../" git pull
        trap - 0
 
        mr -c "$MRCONFIG" config "$LOCAL_REPO" checkout="git_fake_bare_checkout '$REPO_URL' 'REPO_NAME' '../../'"
@@ -194,9 +195,10 @@ new() {
        git remote add origin $REPO_URL
        git config branch.master.remote origin
        git config branch.master.merge refs/heads/master
-       git config core.worktree ../../
        git config core.bare false
-       export GIT_WORK_TREE="$PWD"
+       git config core.worktree ../../
+       git config status.showUntrackedFiles no
+       export GIT_WORK_TREE="$LOCAL_REPO/../../"
        git add "$@"
        git commit -m "initial checkin"
        git push --all