libnetwork: clone the entire git repository when the option '--preserve-dot-git' is selected by user

Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
This commit is contained in:
Davide Madrisan 2012-10-13 19:23:40 +02:00
parent 4c24d74501
commit dde8cdd235
2 changed files with 10 additions and 1 deletions

View File

@ -20,6 +20,11 @@ Changes in version 1.12.6
Do not use the operator '|&'. Use instead '2>&1 |' which is compatible at
least with bash 3.2.
+ update
* lib/libnetwork.lib - Davide Madrisan:
Clone the entire git repository when the option '--preserve-dot-git' is
selected by user.
-------------------------------------------------------------------------------
Changes in version 1.12.5

View File

@ -924,7 +924,11 @@ function git.create_tarball() {
notify.note \
"${NOTE}"$"cloning git repository""\
<$git_repository> ${git_branch:+($git_branch)}${NORM}""..."
git clone --depth=1 ${git_branch:+-b $git_branch} "$git_repository"
if [ "$preserve_dot_git" = "0" ]; then
git clone --depth=1 ${git_branch:+-b $git_branch} "$git_repository"
else
git clone ${git_branch:+-b $git_branch} "$git_repository"
fi
[ $? -eq 0 ] ||
{ popd &>/dev/null
rm -fr $tmpgitdir