When post-receive hook contains more than 1 echo bash command, only the LAST echo is displayed in dialog
By vid... on January 05, 2012 21:30 (imported from Google Code)
What steps will reproduce the problem?
- Define the following post-receive hook (machine with master repo):
#!/bin/bash
echo "line 1"
# in real usage, some git pull or git push should be here
echo "line 2"
- Do 'push' from local repo to master.
What is the expected output? What do you see instead?
Git Command Progress window, text result
I expect (in sample result the important lines are highlighted by following comment):
git.exe push --progress "origin" master:master
Counting objects: 7, done.
Compressing objects: 100% (4/4)
Writing objects: 100% (4/4)
Writing objects: 100% (4/4), 1.35 KiB, done.
remote: line 1 -- this is the first "echo" from post-receive hook file
remote: line 2 -- this is the second "echo" from post-receive hook file
To ssh://user@localhost:port/~/master.git
rev1..rev2 master -> master
Success
Result:
git.exe push --progress "origin" master:master
Counting objects: 7, done.
Compressing objects: 100% (4/4)
Writing objects: 100% (4/4)
Writing objects: 100% (4/4), 1.15 KiB, done.
remote: line 2 -- this is THE ONLY (LAST) "echo" from post-receive hook file
To ssh://user@machine:port/~/master.git
rev1..rev2 master -> master
Success
In other words, ONLY THE LAST ECHO OUTPUT IS DISPLAYED in the text result.
What version of the product are you using? On what operating system?
Windows XP SP3
TortoiseGit 1.7.6.0
git version 1.7.4
post-receive hook defined on master repo (linux-debian, git version 1.7.6.4)
Please provide any additional information below.