From ccf029dabe8ace20eca725c7d7d838b318230a92 Mon Sep 17 00:00:00 2001 From: Sasha Khamkov Date: Mon, 6 Oct 2014 21:59:53 +0300 Subject: [PATCH] FIX: representation of git-info - fix representation of `git-info` output $ git info --no-config Before: ## Remote URLs:\n origin https://github.com/sanusart/git-extras.git (fetch) origin https://github.com/sanusart/git-extras.git (push) upstream https://github.com/visionmedia/git-extras.git (fetch) upstream https://github.com/visionmedia/git-extras.git (push)\n ## Remote Branches:\n origin/HEAD -> origin/master origin/fix_feature_refactor_bug origin/gh-pages origin/issue234 origin/master origin/patch-1 upstream/gh-pages upstream/master\n ## Local Branches:\n * master\n ## Most Recent Commit:\n commit ac18bd16b4f41cbb5185c42d3d10e0cc39b37e27 Merge: 68455cf a1b7120 Author: hemanth.hm Merge pull request #260 from brandondrew/patch-1\n Type 'git log' for more commits, or 'git show ' for full commit details.\n After: git info --no-config ## Remote URLs: origin https://github.com/sanusart/git-extras.git (fetch) origin https://github.com/sanusart/git-extras.git (push) upstream https://github.com/visionmedia/git-extras.git (fetch) upstream https://github.com/visionmedia/git-extras.git (push) ## Remote Branches: origin/HEAD -> origin/master origin/fix_feature_refactor_bug origin/gh-pages origin/issue234 origin/master origin/patch-1 upstream/gh-pages upstream/master ## Local Branches: * master ## Most Recent Commit: commit ac18bd16b4f41cbb5185c42d3d10e0cc39b37e27 Merge: 68455cf a1b7120 Author: hemanth.hm Merge pull request #260 from brandondrew/patch-1 Type 'git log' for more commits, or 'git show ' for full commit details. --- bin/git-info | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/bin/git-info b/bin/git-info index f831399..e9f8625 100755 --- a/bin/git-info +++ b/bin/git-info @@ -23,20 +23,20 @@ remote_urls() { # Show info similar to svn echo -echo "## Remote URLs:\n" -echo "$(remote_urls)\n" +echo -e "## Remote URLs:\n" +echo -e "$(remote_urls)\n" -echo "## Remote Branches:\n" -echo "$(remote_branches)\n" +echo -e "## Remote Branches:\n" +echo -e "$(remote_branches)\n" -echo "## Local Branches:\n" -echo "$(local_branches)\n" +echo -e "## Local Branches:\n" +echo -e "$(local_branches)\n" -echo "## Most Recent Commit:\n" -echo "$(most_recent_commit)\n" -echo "Type 'git log' for more commits, or 'git show ' for full commit details.\n" +echo -e "## Most Recent Commit:\n" +echo -e "$(most_recent_commit)\n" +echo -e "Type 'git log' for more commits, or 'git show ' for full commit details.\n" if test "$1" != "--no-config"; then - echo "## Configuration (.git/config):\n" - echo "$(get_config)\n" -fi \ No newline at end of file + echo -e "## Configuration (.git/config):\n" + echo -e "$(get_config)\n" +fi