Skip to content

Commit

Permalink
refactor: set Git merge verbosity once
Browse files Browse the repository at this point in the history
Signed-off-by: Lucas Larson <[email protected]>
  • Loading branch information
LucasLarson committed May 31, 2024
1 parent a8168b5 commit 63c888a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
3 changes: 3 additions & 0 deletions .zshenv
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ command mkdir -p -- "${TMPDIR:-/tmp}"'/xdg_runtime_dir-'"${LOGNAME:-${USER-}}" &
## $CDPATH
export CDPATH="${CDPATH:+${CDPATH-}:}${HOME%/}"

## Git
export GIT_MERGE_VERBOSITY=4

## GitHub
export GITHUB_ORG="${LOGNAME:-${USER-}}"

Expand Down
10 changes: 3 additions & 7 deletions custom/aliases.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -1069,20 +1069,16 @@ alias glog='command git log --graph --branches --remotes --tags --format=format:
unalias -- 'gm' 2>/dev/null
gm() {
# https://news.ycombinator.com/item?id=5512864
GIT_MERGE_VERBOSITY='4' command git merge --log --overwrite-ignore --progress --rerere-autoupdate --strategy-option patience
command git merge --log --overwrite-ignore --progress --rerere-autoupdate --strategy-option patience
}
alias gma='command git merge --abort'
gmc() {
GIT_MERGE_VERBOSITY='4' command git merge --log --continue
command git merge --log --continue
}

# git merge with default branch
gmm() {
# set Git merge verbosity environment variable
# 4 “shows all paths as they are processed” but
# 5 is “show detailed debugging information”
# https://github.com/progit/progit2/commit/aea93a7
GIT_MERGE_VERBOSITY='4' command git merge --log --verbose --progress --rerere-autoupdate --strategy-option patience "$(git-default-branch)"
command git merge --log --verbose --progress --rerere-autoupdate --strategy-option patience "$(git-default-branch)"
}

# git move
Expand Down

0 comments on commit 63c888a

Please sign in to comment.