Skip to content

Commit d7fb449

Browse files
icodebusterJobin Kurian
andauthored
I have made two improvements to the git-bulk: (tj#1054)
* I have made two improvements to the git-bulk: 1. Previously, if the "repository.txt" file did not end with a blank line, only three out of four repositories were cloned. This limitation has been fixed. 2. Now, there is support for cloning repositories into custom folder names when using the "repository.txt" file. * Corrected the code indentation. * removed the extra condition to check is the line was empty or not. * Updated the comment for the new changes in the code. --------- Co-authored-by: Jobin Kurian <[email protected]>
1 parent 5e543cb commit d7fb449

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

bin/git-bulk

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,12 @@ function addworkspace {
3636
source=$(realpath "$source" 2>/dev/null)
3737
if [ -f "$source" ]; then
3838
pushd "$wsdir" > /dev/null
39-
while read -r line; do git clone "$line"; done < "$source";
39+
while IFS= read -r line; do
40+
if [ -n "$line" ]; then
41+
# the git clone command to take the complete line in the repository.txt as separate argument. This facilitated the cloning of the repository with a custom folder name.
42+
git clone $line;
43+
fi
44+
done < "$source"
4045
popd > /dev/null
4146
else
4247
echo 1>&2 "format of URL or file unknown"

0 commit comments

Comments
 (0)