From b26c6524b597030973916a4f0086d641808b25ba Mon Sep 17 00:00:00 2001 From: Jan Krueger Date: Tue, 19 Feb 2013 17:54:28 +0100 Subject: [PATCH] Adding option to omit config in git-info --- Readme.md | 6 ++++++ bin/git-info | 6 ++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Readme.md b/Readme.md index 7675e0f..1b8c603 100644 --- a/Readme.md +++ b/Readme.md @@ -385,6 +385,12 @@ $ git info ``` +If you wish to omit the config section, you may use `--no-config`: + +```bash +$ git info --no-config +``` + ## git-create-branch <name> Create local and remote branch `name`: diff --git a/bin/git-info b/bin/git-info index fc7aedd..f831399 100755 --- a/bin/git-info +++ b/bin/git-info @@ -36,5 +36,7 @@ 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 "## Configuration (.git/config):\n" -echo "$(get_config)\n" \ No newline at end of file +if test "$1" != "--no-config"; then + echo "## Configuration (.git/config):\n" + echo "$(get_config)\n" +fi \ No newline at end of file