From fe2e75da6365f0d4f47fdf3ee6551116c1f548aa Mon Sep 17 00:00:00 2001 From: Aaron Bieber Date: Tue, 6 Jun 2023 18:46:06 -0600 Subject: [PATCH] force checkout and fetch --- flake.nix | 2 +- pr-status.pl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.nix b/flake.nix index 3614b16..589f48d 100644 --- a/flake.nix +++ b/flake.nix @@ -20,7 +20,7 @@ in { pr-status = pkgs.perlPackages.buildPerlPackage { pname = "pr-status"; - version = "v0.0.2"; + version = "v0.0.3"; src = ./.; buildInputs = with pkgs; [ makeWrapper ]; propagatedBuildInputs = with pkgs.perlPackages; [ diff --git a/pr-status.pl b/pr-status.pl index e8c9156..54939db 100755 --- a/pr-status.pl +++ b/pr-status.pl @@ -47,8 +47,8 @@ Mojo::IOLoop->recurring( sub get_commit { my $pr = shift; - $repo->command( 'fetch', 'origin', "pull/${pr}/head:pr-status-${pr}" ); - $repo->command( 'checkout', "pr-status-$pr" ); + $repo->command( 'fetch', '-f', 'origin', "pull/${pr}/head:pr-status-${pr}" ); + $repo->command( 'checkout', '-f', "pr-status-$pr" ); my $commit = $repo->command( 'rev-parse', 'HEAD' ); my $log = $repo->command( 'log', '-n', '1', '--pretty=format:%s' ); $repo->command( 'checkout', 'master' );