Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed bug. git-ftp hangs if there is a file named '-'. Closes #200.

There seems to be a git bug too, at least in version 1.7.9.5. But seem to be fixed in 1.8.1.1.
  • Loading branch information...
commit f1ff33f0a04b4c746f1da87e72dd9d390af02dcc 1 parent e15021e
@resmo authored
Showing with 12 additions and 2 deletions.
  1. +1 −1  git-ftp
  2. +11 −1 tests/git-ftp-test.sh
View
2  git-ftp
@@ -379,7 +379,7 @@ upload_file_buffered() {
if [ -n "$SYNCROOT" ]; then
DEST_FILE=${DEST_FILE/$SYNCROOT/$REPLACE}
fi
- CURL_UPLOADS+=(-T "$SRC_FILE")
+ CURL_UPLOADS+=(-T "./$SRC_FILE")
CURL_UPLOADS+=("$REMOTE_PROTOCOL://$REMOTE_HOST/${REMOTE_PATH}${DEST_FILE}")
}
View
12 tests/git-ftp-test.sh
@@ -29,7 +29,7 @@ setUp() {
sudo rm -rf $FTP_PROJECT_PATH
mkdir -p $GIT_PROJECT_PATH
cd $GIT_PROJECT_PATH
-
+
# make some content
for i in 1 2 3 4 5
do
@@ -262,5 +262,15 @@ test_syncroot() {
assertTrue 'test failed: syncroot.txt not there as expected' "[ -f '$FTP_PROJECT_PATH/syncroot.txt' ]"
}
+test_file_named_dash() {
+ cd $GIT_PROJECT_PATH
+ echo "foobar" > -
+ assertTrue 'test failed: file named - not there as expected' "[ -f '$GIT_PROJECT_PATH/-' ]"
+ git add . > /dev/null 2>&1
+ git commit -a -m "file named - test" > /dev/null 2>&1
+ init=$($GIT_FTP_CMD init -u $GIT_FTP_USER -p $GIT_FTP_PASSWD)
+ rtrn=$?
+ assertEquals 0 $rtrn
+}
# load and run shUnit2
. ./shunit2-2.1.6/src/shunit2
Please sign in to comment.
Something went wrong with that request. Please try again.