From fb14b3a85ff9918886c793c26c81175a8de0e75e Mon Sep 17 00:00:00 2001 From: Robert Kubiak Date: Tue, 12 Jan 2016 14:13:56 +0100 Subject: [PATCH] Add '||:' to end of mv command,so that it also works with commity without any file. See http://stackoverflow.com/questions/614229/can-i-move-the-git-directory-for-a-repo-to-its-parent-directory/614254#comment15773648_614254 --- git-join-repos | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-join-repos b/git-join-repos index 971ecfa..a92be31 100755 --- a/git-join-repos +++ b/git-join-repos @@ -44,7 +44,7 @@ function repo_master_to_subdir { git filter-branch -f --index-filter \ "git ls-files -s | ${sed} \"s|\t\\\"*|&${repo_name}/|\" | GIT_INDEX_FILE=\$GIT_INDEX_FILE.new git update-index --index-info && - mv \"\$GIT_INDEX_FILE.new\" \"\$GIT_INDEX_FILE\"" HEAD + mv \"\$GIT_INDEX_FILE.new\" \"\$GIT_INDEX_FILE\" ||:" HEAD git filter-branch -f --msg-filter "/bin/echo -n \"${repo_name}: \" && cat"