Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
Checking mergeability… Don't worry, you can still create the pull request.
  • 2 commits
  • 2 files changed
  • 0 commit comments
  • 2 contributors
Showing with 12 additions and 6 deletions.
  1. +5 −0 README.md
  2. +7 −6 post-receive
View
5 README.md
@@ -19,6 +19,11 @@ and then `sudo aptitude install git-ftp`.
Usage: `python git-ftp.py`
+Note: If you run git-ftp.py for the first time on an existing project
+you should upload to the hosting server a `git-rev.txt` file containing
+SHA1 of the last commit which is already present there. Otherwise git-ftp.py
+will upload and overwite the whole project which is not necessary.
+
Storing the FTP credentials
---------------------------
View
13 post-receive 100644 → 100755
@@ -1,11 +1,12 @@
#!/bin/bash
# You may install this post-receive hook in your remote git repository
# to have automatic file upload when pushing to the repository.
-read OLD_COMMIT NEW_COMMIT REFNAME
-BRANCH=${REFNAME#refs/heads/}
+while read OLD_COMMIT NEW_COMMIT REFNAME; do
+ BRANCH=${REFNAME#refs/heads/}
-if [[ `grep "^\[$BRANCH\]$" ftpdata` ]]; then
- echo "Uploading $BRANCH..."
- exec $(dirname $(readlink -f "$0"))/git-ftp.py -b "$BRANCH" -c "$NEW_COMMIT"
-fi
+ if [[ `grep "^\[$BRANCH\]$" ftpdata` ]]; then
+ echo "Uploading $BRANCH..."
+ $(dirname $(readlink -f "$0"))/git-ftp.py -b "$BRANCH" -c "$NEW_COMMIT" || exit $?
+ fi
+done
true

No commit comments for this range

Something went wrong with that request. Please try again.