Skip to content

Commit

Permalink
git-info: use printf instead of echo
Browse files Browse the repository at this point in the history
echo command cannot deal with escape-sequences in PortableGit(msysgit).
  • Loading branch information
southly committed Jan 24, 2013
1 parent 96cb71d commit 91175d7
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions bin/git-info
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,19 @@ remote_urls() {

# Show info similar to svn

echo
echo "## Remote URLs:\n"
echo "$(remote_urls)\n"
printf "\n"
printf "## Remote URLs:\n\n"
printf "%s\n\n" "$(remote_urls)"

echo "## Remote Branches:\n"
echo "$(remote_branches)\n"
printf "## Remote Branches:\n\n"
printf "%s\n\n" "$(remote_branches)"

echo "## Local Branches:\n"
echo "$(local_branches)\n"
printf "## Local Branches:\n\n"
printf "%s\n\n" "$(local_branches)"

echo "## Most Recent Commit:\n"
echo "$(most_recent_commit)\n"
echo "Type 'git log' for more commits, or 'git show <commit id>' for full commit details.\n"
printf "## Most Recent Commit:\n\n"
printf "%s\n\n" "$(most_recent_commit)"
printf "Type 'git log' for more commits, or 'git show <commit id>' for full commit details.\n\n"

echo "## Configuration (.git/config):\n"
echo "$(get_config)\n"
printf "## Configuration (.git/config):\n\n"
printf "%s\n\n" "$(get_config)"

0 comments on commit 91175d7

Please sign in to comment.