diff --git a/home/hyprland/waybar/flakestat.sh b/home/hyprland/waybar/flakestat.sh index bf35c8f..4538521 100644 --- a/home/hyprland/waybar/flakestat.sh +++ b/home/hyprland/waybar/flakestat.sh @@ -14,12 +14,8 @@ unstable_rev=$(echo "$flake_metadata" | jq -r ".locks.nodes.$unstable_input.lock unstable_branch=$(echo "$flake_metadata" | jq -r ".locks.nodes.$unstable_input.original.ref") cd "$NIXPKGS_DIR" || exit 1 -git fetch -q -git switch -q "$stable_branch" -git pull -q -stable_commit_count=$(git rev-list "$stable_rev..HEAD"|wc -l) -git switch -q "$unstable_branch" -git pull -q -unstable_commit_count=$(git rev-list "$unstable_rev..HEAD"|wc -l) +git fetch -q --all +stable_commit_count=$(git rev-list --count "$stable_rev..origin/$stable_branch") +unstable_commit_count=$(git rev-list --count "$unstable_rev..origin/$unstable_branch") echo "$stable_commit_count|$unstable_commit_count"