Skip to content

Commit

Permalink
Add explenation of unobvious code
Browse files Browse the repository at this point in the history
  • Loading branch information
Tarrasch committed Jun 10, 2012
1 parent 3d77777 commit 30d08d1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions data/hooks/post-receive.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@
sucessfully. sucessfully.
} }


# In the code below we extract the repo-hash from $PWD like this:
#
# "/tmp/git-repos/6cf/4a4/bd6392293577efe9875b6f13842bba2b9d.git\n"[-47..-6] =>
# "6cf/4a4/bd6392293577efe9875b6f13842bba2b9d"
s = `echo $PWD` s = `echo $PWD`
hashed_path = s[-47..-6] hashed_path = s[-47..-6]


Expand Down

0 comments on commit 30d08d1

Please sign in to comment.