gitbash 1.8.0 → 1.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/commands/stale.sh +3 -3
- package/commands/switch.sh +1 -1
- package/package.json +1 -1
package/commands/stale.sh
CHANGED
|
@@ -177,7 +177,7 @@ EOF
|
|
|
177
177
|
local all_branch_list
|
|
178
178
|
all_branch_list=$(git for-each-ref --sort=committerdate --format='%(refname:short)|%(committerdate:relative)|%(authorname)|%(committerdate:unix)' refs/remotes/origin | \
|
|
179
179
|
grep -v 'origin/HEAD' | \
|
|
180
|
-
grep -v '^origin
|
|
180
|
+
grep -v '^origin|' | \
|
|
181
181
|
while IFS='|' read -r branch date author timestamp; do
|
|
182
182
|
# Remove origin/ prefix for display
|
|
183
183
|
local full_branch="${branch#origin/}"
|
|
@@ -194,7 +194,7 @@ EOF
|
|
|
194
194
|
local stale_branch_list
|
|
195
195
|
stale_branch_list=$(git for-each-ref --sort=committerdate --format='%(refname:short)|%(committerdate:relative)|%(authorname)|%(committerdate:unix)' refs/remotes/origin | \
|
|
196
196
|
grep -v 'origin/HEAD' | \
|
|
197
|
-
grep -v '^origin
|
|
197
|
+
grep -v '^origin|' | \
|
|
198
198
|
while IFS='|' read -r branch date author timestamp; do
|
|
199
199
|
# Only include if older than 3 months
|
|
200
200
|
if [[ "$timestamp" -lt "$threshold_ago" ]]; then
|
|
@@ -262,7 +262,7 @@ EOF
|
|
|
262
262
|
|
|
263
263
|
json_output+="{\"last_change_timestamp\":$timestamp,\"author_email\":\"$author_email\",\"author_name\":\"$author_name\",\"name\":\"$name\",\"last_change_relative\":\"$rel_date\"}"
|
|
264
264
|
fi
|
|
265
|
-
done < <(git for-each-ref --sort=committerdate --format='%(refname:short)|%(committerdate:relative)|%(authorname)|%(authoremail)|%(committerdate:unix)' refs/remotes/origin 2>/dev/null | grep -v 'origin/HEAD' | grep -v '^origin
|
|
265
|
+
done < <(git for-each-ref --sort=committerdate --format='%(refname:short)|%(committerdate:relative)|%(authorname)|%(authoremail)|%(committerdate:unix)' refs/remotes/origin 2>/dev/null | grep -v 'origin/HEAD' | grep -v '^origin|' || true)
|
|
266
266
|
} &>/dev/null
|
|
267
267
|
json_output+="]"
|
|
268
268
|
echo "$json_output"
|
package/commands/switch.sh
CHANGED
|
@@ -114,7 +114,7 @@ EOF
|
|
|
114
114
|
# Ensure match_count is numeric
|
|
115
115
|
[[ -z "$match_count" ]] && match_count=0
|
|
116
116
|
|
|
117
|
-
if [[ "$match_count"
|
|
117
|
+
if [[ "$match_count" == "1" ]]; then
|
|
118
118
|
# Single match - skip fzf
|
|
119
119
|
selected_branch="$matching_branches"
|
|
120
120
|
print_info "Single match found, switching directly..."
|