From: Stephen Haberman Date: Mon, 23 Jun 2008 20:37:41 +0000 (-0500) Subject: Handline new lines correctly. X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=25a96af6fbe6cf479b0154a4a8e6a220592f36dc;p=git-central.git Handline new lines correctly. --- diff --git a/cbas/post-receive b/cbas/post-receive index 0511475..19824c1 100755 --- a/cbas/post-receive +++ b/cbas/post-receive @@ -3,11 +3,12 @@ # Delegates to post-receive-email and post-receive-trac # +nl=$'\n' input="" -while read line ; do - input="$input$line" +while read newref oldref refname ; do + input="$input$newref $oldref $refname$nl" done -echo $input | sh /srv/git/hooks/server/post-receive-email -echo $input | sh /srv/git/hooks/server/post-receive-trac +echo -n "$input" | sh /srv/git/hooks/server/post-receive-email +echo -n "$input" | sh /srv/git/hooks/server/post-receive-trac diff --git a/cbas/pre-receive b/cbas/pre-receive index b9503f8..fa7e124 100755 --- a/cbas/pre-receive +++ b/cbas/pre-receive @@ -1,12 +1,13 @@ #!/bin/sh +nl=$'\n' input="" -while read line ; do - input="$input$line" +while read newref oldref refname ; do + input="$input$newref $oldref $refname$nl" done -echo $input | sh /srv/git/hooks/server/pre-receive-only-one && -echo $input | sh /srv/git/hooks/server/pre-receive-prefer-rebase && -echo $input | sh /srv/git/hooks/server/pre-receive-stable && -echo $input | sh /srv/git/hooks/server/pre-receive-trac +echo -n "$input" | sh /srv/git/hooks/server/pre-receive-only-one && +echo -n "$input" | sh /srv/git/hooks/server/pre-receive-prefer-rebase && +echo -n "$input" | sh /srv/git/hooks/server/pre-receive-stable && +echo -n "$input" | sh /srv/git/hooks/server/pre-receive-trac