Skip to content

Commit

Permalink
git-do-extensions: BUG: Drop the {mine,team,by,...} from the synthesi…
Browse files Browse the repository at this point in the history
…zed commands

For {mine,team} this just adds the same --author=... filter again, which is harmless. But for by, the iterating command again queries for the author (as the trailing AUTHOR argument has already been consumed by the overtimeCommand and converted into an --author=... parameter), which now hangs / aborts when piped.

System-info: Ubuntu 20.04.6 LTS, x86_64
Platform-info: git version 2.47.1, hub version 2.14.2, gh version 2.55.0 (2024-08-20), git-lfs/3.6.0 (GitHub; linux amd64; go 1.23.1)
  • Loading branch information
inkarkat committed Jan 12, 2025
1 parent 3b22eb7 commit d2e2c5b
Showing 1 changed file with 8 additions and 14 deletions.
22 changes: 8 additions & 14 deletions lib/git-do-extensions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -608,10 +608,8 @@ parseCommand()
byEachCommandExtension GIT_BRLIFETIMESBYEACH git-brlifetimesbyeach br-lifetimes "$@"
;;
br-lifetimes*over*)
brLifetimesCommand="git br${1#br-}"
brLifetimesSynthesizedCommand="${1%over*}"
shift
overtimeCommandExtension GIT_BRLIFETIMESOVERTIME "$brLifetimesCommand" "$brLifetimesSynthesizedCommand" "$@"
brLifetimesCommand="git br${1#br-}"; shift
overtimeCommandExtension GIT_BRLIFETIMESOVERTIME "$brLifetimesCommand" br-lifetimes "$@"
;;
br-lifetimes*)
brLifetimesCommand="git brlifetimes${1#br-lifetimes}"; shift
Expand All @@ -622,10 +620,8 @@ parseCommand()
byEachCommandExtension GIT_LOGMSGSTATBYEACH git-logmsgstatbyeach logs-msgstat "$@"
;;
logs-msgstat*over*)
logMsgStatCommand="git log${1#logs-}"
logMsgStatSynthesizedCommand="${1%over*}"
shift
overtimeCommandExtension GIT_LOGMSGSTATOVERTIME "$logMsgStatCommand" "$logMsgStatSynthesizedCommand" "$@"
logMsgStatCommand="git log${1#logs-}"; shift
overtimeCommandExtension GIT_LOGMSGSTATOVERTIME "$logMsgStatCommand" logs-msgstat "$@"
;;
logs-msgstat*)
logsMsgStatCommand="git logmsgstat${1#logs-msgstat}"; shift
Expand All @@ -637,10 +633,8 @@ parseCommand()
byEachCommandExtension HUB_PRREVIEWDURATIONBYEACH hub-prreviewdurationbyeach prs-reviewduration "$@"
;;
prs-reviewduration*over*)
prReviewDurationCommand="hub pr${1#prs-}"
prReviewDurationSynthesizedCommand="${1%over*}"
shift
overtimeCommandExtension HUB_PRREVIEWDURATIONOVERTIME "$prReviewDurationCommand" "$prReviewDurationSynthesizedCommand" "$@"
prReviewDurationCommand="hub pr${1#prs-}"; shift
overtimeCommandExtension HUB_PRREVIEWDURATIONOVERTIME "$prReviewDurationCommand" prs-reviewduration "$@"
;;
prs-reviewduration*)
wcdoArgs+=(--predicate-command 'git-existsremote')
Expand Down Expand Up @@ -679,7 +673,7 @@ parseCommand()
;;
br-lifetimes*over*)
brLifetimesCommand="git br${2#br-}"
brLifetimesSynthesizedCommand="$1 ${2%over*}"
brLifetimesSynthesizedCommand="$1 br-lifetimes"
shift; shift
overtimeCommandExtension GIT_BRLIFETIMESOVERTIME "$brLifetimesCommand" "$brLifetimesSynthesizedCommand" "$@"
;;
Expand All @@ -694,7 +688,7 @@ parseCommand()
;;
logs-msgstat*over*)
logMsgStatCommand="git log${2#logs-}"
logMsgStatSynthesizedCommand="$1 ${2%over*}"
logMsgStatSynthesizedCommand="$1 logs-msgstat"
shift; shift
overtimeCommandExtension GIT_LOGMSGSTATOVERTIME "$logMsgStatCommand" "$logMsgStatSynthesizedCommand" "$@"
;;
Expand Down

0 comments on commit d2e2c5b

Please sign in to comment.