Skip to content

Commit

Permalink
Use custom fullpath() fn to avoid confusion with realpath vs alternative
Browse files Browse the repository at this point in the history
* Define and use simple `pwd`-based fullpath() function
* Remove misleading comment

Confirmed to work on OSX.
  • Loading branch information
jmurty committed May 26, 2014
1 parent 8735938 commit 3accd13
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions test-retroactive.sh
@@ -1,9 +1,6 @@
#!/bin/sh -ex

# Use Python's abspath as substitute if realpath isn't available (e.g. on OSX)
command -v realpath >/dev/null 2>&1 || realpath() {
echo "`pwd`/$1"
}
fullpath() { echo "`pwd`/$1"; }

git init retro
cd retro
Expand Down Expand Up @@ -31,7 +28,7 @@ git commit -am'Import big files into git-fat'
git log --stat

git fat find 10000 | awk '{print $1}' > fat-files
git filter-branch --index-filter "git fat index-filter $(realpath fat-files) --manage-gitattributes" --tag-name-filter cat -- --all
git filter-branch --index-filter "git fat index-filter $(fullpath fat-files) --manage-gitattributes" --tag-name-filter cat -- --all

git log --stat
git checkout HEAD^
Expand All @@ -43,14 +40,14 @@ ls -al
git checkout master
cat > .gitfat <<EOF
[rsync]
remote = $(realpath ../retro-store)
remote = $(fullpath ../retro-store)
EOF
git add .gitfat
git commit -m'Add .gitfat for local push'
git fat push

cd ..
git clone file:///$(realpath retro) retro-clone
git clone file:///$(fullpath retro) retro-clone
cd retro-clone
git fat init
git fat pull

0 comments on commit 3accd13

Please sign in to comment.