Skip to content

Commit b4fca4f

Browse files
committed
mirror-nixos-branch: fix git fatal: bad object error
When I wrote 30efa0a, I had the assumption that the GIT_DIR in /home/hydra-mirror/nixpkgs-channels is always up-to-date, but it isn't. The actual local GIT_DIR only gets updated far further down (line 346). This commit fixes the issue of git not yet knowing the $rev by fetching only that $rev early, instead of moving the much more expensive git remote update that would update all branches of nixpkgs, all the time.
1 parent 40fd591 commit b4fca4f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

mirror-nixos-branch.pl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ sub fetch {
108108
my $rev = $evalInfo->{jobsetevalinputs}->{nixpkgs}->{revision} or die;
109109

110110
# Get commit date of $rev as unixtime and formatted string
111+
run("git fetch origin $rev >&2") or die;
111112
my $revUnix = `git show --no-patch --format='%ct' $rev` or die;
112113
my $revDate = strftime("%F %T %Z", localtime($revUnix));
113114

0 commit comments

Comments
 (0)