New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improved the 'git-info' command (color, submodule, config) #867
Conversation
auxiliary message distracting from the main message
add ability to customize git-config, git-log commands from .gitconfig file
bin/git-info
Outdated
@@ -1,11 +1,26 @@ | |||
#!/usr/bin/env bash | |||
|
|||
get_config() { | |||
git config --list | |||
cmd_get_config="$(git config --get-all extras.info.config-grep)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now we prefer to use git-extras
as the namespace, like git config --get git-extras.pr.remote
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
bin/git-info
Outdated
NORMAL="$(tput sgr0)" | ||
if [ "$1" = "--color" ] || [ "$2" = "--color" ] || \ | ||
[ "$1" = "-c" ] || [ "$2" = "-c" ] ; then | ||
COLOR_TITLE="$GREEN" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better to mention that -c
only affects the title in the documentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
bin/git-info
Outdated
|
||
if test "$1" != "--no-config"; then | ||
echon "## Configuration (.git/config):" | ||
if [ "$1" != "--no-config" ] && [ "$2" != "--no-config" ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better to move the argument checks together at the top of the script.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
should use 'git-extra' name to configure via git config options.
@yuravg |
Hi,
I see #755, but did something similar in another way
added:
note:
I hope this will be useful