From 17fd93c88e38bce1700c44bdd07bef1b18864a66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torjus=20H=C3=A5kestad?= Date: Tue, 23 Apr 2024 00:48:45 +0200 Subject: [PATCH] Update flakestat --- home/hyprland/waybar/flakestat.sh | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) 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"