author | Junio C Hamano <gitster@pobox.com> | |
Fri, 22 Jul 2011 21:24:35 +0000 (14:24 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 22 Jul 2011 21:24:35 +0000 (14:24 -0700) |
* jl/submodule-add-relurl-wo-upstream:
submodule add: clean up duplicated code
submodule add: allow relative repository path even when no url is set
submodule add: test failure when url is not configured in superproject
Conflicts:
git-submodule.sh
submodule add: clean up duplicated code
submodule add: allow relative repository path even when no url is set
submodule add: test failure when url is not configured in superproject
Conflicts:
git-submodule.sh
1 | 2 | |||
---|---|---|---|---|
Documentation/git-submodule.txt | patch | | diff1 | | diff2 | | blob | history |
git-submodule.sh | patch | | diff1 | | diff2 | | blob | history |
t/t7400-submodule-basic.sh | patch | | diff1 | | diff2 | | blob | history |
diff --cc Documentation/git-submodule.txt
Simple merge
diff --cc git-submodule.sh
index 3daa0c834cad1ed402376adf535c73e1c06172e4,32cb05443a851e7bd77d86b3bb3b2f7962c4d53b..bc1d3fa663a5eb39dd96f6ad2ca17437073ceb0a
--- 1/git-submodule.sh
--- 2/git-submodule.sh
+++ b/git-submodule.sh
then
if test -d "$path"/.git -o -f "$path"/.git
then
- echo "Adding existing repo at '$path' to the index"
+ eval_gettext "Adding existing repo at '\$path' to the index"; echo
else
- die "'$path' already exists and is not a valid git repo"
+ die "$(eval_gettext "'\$path' already exists and is not a valid git repo")"
fi
- case "$repo" in
- ./*|../*)
- url=$(resolve_relative_url "$repo") || exit
- ;;
- *)
- url="$repo"
- ;;
- esac
- git config submodule."$path".url "$realrepo"
else
module_clone "$path" "$realrepo" "$reference" || exit
'') git checkout -f -q ;;
?*) git checkout -f -q -B "$branch" "origin/$branch" ;;
esac
- ) || die "Unable to checkout submodule '$path'"
+ ) || die "$(eval_gettext "Unable to checkout submodule '\$path'")"
fi
- git config submodule."$path".url "$url"
++ git config submodule."$path".url "$realrepo"
git add $force "$path" ||
- die "Failed to add submodule '$path'"
+ die "$(eval_gettext "Failed to add submodule '\$path'")"
git config -f .gitmodules submodule."$path".path "$path" &&
git config -f .gitmodules submodule."$path".url "$repo" &&
diff --cc t/t7400-submodule-basic.sh
Simple merge