Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Piping code to directory adds low-level git files/folders #25

Open
audleman opened this issue Jun 1, 2014 · 2 comments
Open

Piping code to directory adds low-level git files/folders #25

audleman opened this issue Jun 1, 2014 · 2 comments

Comments

@audleman
Copy link

audleman commented Jun 1, 2014

When I use the mkdir -p /some/path && cat | tar -x -C /some/path command specified in the documentation I get an unexpected result. My code is in place, but at the root of my project I also get

drwxr-xr-x  2 git git  4096 2014-05-31 20:44 branches
-rw-r--r--  1 git git    66 2014-05-31 20:44 config
-rw-r--r--  1 git git    73 2014-05-31 20:44 description
-rw-r--r--  1 git git    23 2014-05-31 20:44 HEAD
drwxr-xr-x  2 git git  4096 2014-05-31 20:44 hooks
drwxr-xr-x  2 git git  4096 2014-05-31 20:44 info

...and a few more. i.e. some low-level git info that I'm not used to seeing in my repo.

Is this expected behavior or did I do something wrong? I don't see that it'll do any harm, but I'm always a bit spooked by the unexpected while coding.

Thanks, and great project!

@progrium
Copy link
Owner

progrium commented Jun 1, 2014

Is that command the only content of your receiver script?

@audleman
Copy link
Author

audleman commented Jun 2, 2014

Nope, full script below:

#!/bin/bash
mkdir -p /home/git/dice && cat | tar -x -C /home/git/dice
cd /home/git/dice
echo "----> Setting up virtualenv ..."
virtualenv venv
source venv/bin/activate
echo "----> Installing requirements.txt ..."
pip install -r requirements.txt

URL=http://requestb.in/1idyodf1
echo "----> Posting to $URL ..."
curl \
  -X 'POST' \
  -F "repository=$1" \
  -F "revision=$2" \
  -F "username=$3" \
  -F "fingerprint=$4" \
  -F contents=@- \
  --silent $URL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants