mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 19:13:26 +03:00
treewide: Remove usage of isNull
isNull "is deprecated; just write e == null instead" says the Nix manual
This commit is contained in:
parent
5f14e83bd6
commit
786f02f7a4
52 changed files with 89 additions and 95 deletions
|
@ -83,7 +83,7 @@ rec {
|
|||
# Sometimes git stores the commitId directly in the file but
|
||||
# sometimes it stores something like: «ref: refs/heads/branch-name»
|
||||
matchRef = match "^ref: (.*)$" fileContent;
|
||||
in if isNull matchRef
|
||||
in if matchRef == null
|
||||
then fileContent
|
||||
else readCommitFromFile (lib.head matchRef) path
|
||||
# Sometimes, the file isn't there at all and has been packed away in the
|
||||
|
@ -92,7 +92,7 @@ rec {
|
|||
then
|
||||
let fileContent = readFile packedRefsName;
|
||||
matchRef = match (".*\n([^\n ]*) " + file + "\n.*") fileContent;
|
||||
in if isNull matchRef
|
||||
in if matchRef == null
|
||||
then throw ("Could not find " + file + " in " + packedRefsName)
|
||||
else lib.head matchRef
|
||||
else throw ("Not a .git directory: " + path);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue