Don't read git-extras.standup.implicit-week twice in git standup

This commit is contained in:
Tobias Fendin 2022-05-07 12:31:16 +02:00
parent f334dff09c
commit 0701c9e4d7

View file

@ -159,10 +159,10 @@ GIT_PRETTY_FORMAT="%Cred%h%Creset - %s %Cgreen(%cd) %C(bold blue)<%an>%Creset $G
GIT_DATE_FORMAT=${GIT_DATE_FORMAT:=relative}
# Handle config of implicit week
if [[ -z "$RANGE_SPECIFIED" ]] && [[ -n "$(git config --get git-extras.standup.implicit-week)" ]]; then
week_range=$(git config --get git-extras.standup.implicit-week)
week_start=${week_range%%-*}
week_end=${week_range##*-}
IMPLICIT_WEEK=$(git config --get git-extras.standup.implicit-week)
if [[ -z "$RANGE_SPECIFIED" ]] && [[ -n "${IMPLICIT_WEEK}" ]]; then
week_start=${IMPLICIT_WEEK%%-*}
week_end=${IMPLICIT_WEEK##*-}
shopt -s nocasematch
if [[ "$week_start" == "$(LC_ALL=C date +%a)" ]]; then
SINCE="last $week_end"