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' );