1
0
Fork 0
mirror of synced 2024-11-29 18:55:34 -05:00

[git] Commit messages with 50 characters in glG

truncating at character 60. First 10 chars are used for `*`, commit
hash and spaces.

The 50 char limit is based on
http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html

Also changed aliases to use the `--long-option` format when available,
so aliases are clearer for those unfamiliar with the options.

Closes #196
This commit is contained in:
Eric Nielsen 2017-07-24 17:10:10 -05:00
parent 460090beb9
commit 8669a4f369

View file

@ -9,7 +9,7 @@
# Log # Log
_git_log_medium_format='%C(bold)Commit:%C(reset) %C(green)%H%C(red)%d%n%C(bold)Author:%C(reset) %C(cyan)%an <%ae>%n%C(bold)Date:%C(reset) %C(blue)%ai (%ar)%C(reset)%n%+B' _git_log_medium_format='%C(bold)Commit:%C(reset) %C(green)%H%C(red)%d%n%C(bold)Author:%C(reset) %C(cyan)%an <%ae>%n%C(bold)Date:%C(reset) %C(blue)%ai (%ar)%C(reset)%n%+B'
_git_log_oneline_format='%C(green)%h%C(reset) %s%C(red)%d%C(reset)%n' _git_log_oneline_format='%C(green)%h%C(reset) %s%C(red)%d%C(reset)%n'
_git_log_fullgraph_format='%C(green)%h%C(reset) %<|(50,trunc)%s %C(bold blue)<%an>%C(reset) %C(yellow)(%cd)%C(reset)%C(auto)%d%C(reset)%n' _git_log_fullgraph_format='%C(green)%h%C(reset) %<|(60,trunc)%s %C(bold blue)<%an>%C(reset) %C(yellow)(%cd)%C(reset)%C(auto)%d%C(reset)%n'
_git_log_brief_format='%C(green)%h%C(reset) %s%n%C(blue)(%ar by %an)%C(red)%d%C(reset)%n' _git_log_brief_format='%C(green)%h%C(reset) %s%n%C(blue)(%ar by %an)%C(red)%d%C(reset)%n'
# #
@ -22,14 +22,14 @@ alias g='git'
# Branch (b) # Branch (b)
alias gb='git branch' alias gb='git branch'
alias gbc='git checkout -b' alias gbc='git checkout -b'
alias gbl='git branch -v' alias gbl='git branch --verbose'
alias gbL='git branch -av' alias gbL='git branch --all --verbose'
alias gbx='git branch -d' alias gbm='git branch --move'
alias gbX='git branch -D' alias gbM='git branch --move --force'
alias gbm='git branch -m'
alias gbM='git branch -M'
alias gbs='git show-branch' alias gbs='git show-branch'
alias gbS='git show-branch -a' alias gbS='git show-branch --all'
alias gbx='git branch --delete'
alias gbX='git branch --delete --force'
# Commit (c) # Commit (c)
alias gc='git commit --verbose' alias gc='git commit --verbose'
@ -71,7 +71,7 @@ alias gf='git fetch'
alias gfc='git clone' alias gfc='git clone'
alias gfm='git pull' alias gfm='git pull'
alias gfr='git pull --rebase' alias gfr='git pull --rebase'
alias gfu='git remote update -p; git merge --ff-only @\{u\}' alias gfu='git remote update --prune; git merge --ff-only @\{u\}'
# Grep (g) # Grep (g)
alias gg='git grep' alias gg='git grep'
@ -90,7 +90,7 @@ alias giD='git diff --no-ext-diff --cached --word-diff'
alias gir='git reset' alias gir='git reset'
alias giR='git reset --patch' alias giR='git reset --patch'
alias gix='git rm -r --cached' alias gix='git rm -r --cached'
alias giX='git rm -rf --cached' alias giX='git rm -r --cached --force'
# Log (l) # Log (l)
alias gl='git log --topo-order --pretty=format:"${_git_log_medium_format}"' alias gl='git log --topo-order --pretty=format:"${_git_log_medium_format}"'
@ -150,7 +150,7 @@ alias gsr='git-stash-recover'
alias gss='git stash save --include-untracked' alias gss='git stash save --include-untracked'
alias gsS='git stash save --patch --no-keep-index' alias gsS='git stash save --patch --no-keep-index'
alias gsw='git stash save --include-untracked --keep-index' alias gsw='git stash save --include-untracked --keep-index'
alias gsu='git stash show -p | git apply -R' alias gsu='git stash show --patch | git apply --reverse'
# Submodule (S) # Submodule (S)
alias gS='git submodule' alias gS='git submodule'
@ -165,7 +165,7 @@ alias gSu='git submodule foreach git pull origin master'
alias gSx='git-submodule-remove' alias gSx='git-submodule-remove'
# Tag (t) # Tag (t)
alias gts='git tag -s' alias gts='git tag --sign'
alias gtv='git verify-tag' alias gtv='git verify-tag'
# Working Copy (w) # Working Copy (w)
@ -175,10 +175,10 @@ alias gwd='git diff --no-ext-diff'
alias gwD='git diff --no-ext-diff --word-diff' alias gwD='git diff --no-ext-diff --word-diff'
alias gwr='git reset --soft' alias gwr='git reset --soft'
alias gwR='git reset --hard' alias gwR='git reset --hard'
alias gwc='git clean -n' alias gwc='git clean --dry-run'
alias gwC='git clean -df' alias gwC='git clean -d --force'
alias gwx='git rm -r' alias gwx='git rm -r'
alias gwX='git rm -rf' alias gwX='git rm -r --force'
# Misc # Misc
alias g..='cd $(git-root || print .)' alias g..='cd $(git-root || print .)'