mirror of
https://github.com/tj/git-extras.git
synced 2026-09-10 07:26:17 -04:00
git-info: extend configuration and commit information
add ability to customize git-config, git-log commands from .gitconfig file
This commit is contained in:
parent
e7270b3667
commit
af06d49c33
14
bin/git-info
14
bin/git-info
|
|
@ -1,11 +1,21 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
get_config() {
|
||||
git config --list
|
||||
cmd_get_config="$(git config --get-all extras.info.config-grep)"
|
||||
if [ -z "$cmd_get_config" ]; then
|
||||
git config --list
|
||||
else
|
||||
eval "$cmd_get_config"
|
||||
fi
|
||||
}
|
||||
|
||||
most_recent_commit() {
|
||||
git log --max-count=1 --pretty=short
|
||||
cmd_get_log="$(git config --get-all extras.info.log)"
|
||||
if [ -z "$cmd_get_log" ]; then
|
||||
git log --max-count=1 --pretty=short
|
||||
else
|
||||
eval "$cmd_get_log"
|
||||
fi
|
||||
}
|
||||
|
||||
submodules() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue