Skip to content

nix-prefetch-git: Fix inconsistency with fetchgit regarding deepClone - #177575

Merged
Ma27 merged 1 commit into
NixOS:masterfrom
seppeljordan:nix-prefetch-git-fix
Jun 28, 2022
Merged

Ma27 merged 1 commit into
NixOS:masterfrom
seppeljordan:nix-prefetch-git-fix

Conversation

@seppeljordan

@seppeljordan seppeljordan commented Jun 13, 2022 •

Copy link
Copy Markdown
Contributor
Description of changes

The fetchgit function in nixpkgs sets the leaveDotGit argument to true
if deepClone is set to true. nix-prefetch-git did behave differently. It
would not assume --leave-dotGit if --deepClone is specified. With this
change the inconsistency is addressed by assuming --leave-dotGit if
--deepClone is specified.

This fixes #168147. This can be validated via the provided shell script in #168147.

I am not sure if this qualifies as a breaking change since nix-prefetch-git --deepClone would produce invalid sha hashes without this change in some situations.

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 22.11 Release Notes (or backporting 22.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@github-actions github-actions Bot added the 6.topic: fetch Fetchers (e.g. fetchgit, fetchsvn, ...) label Jun 13, 2022
The fetchgit function in nixpkgs sets the leaveDotGit argument to true
if deepClone is set to true. nix-prefetch-git did behave differently. It
would not assume --leave-dotGit if --deepClone is specified. With this
change the inconsistency is addressed by assuming --leave-dotGit if
--deepClone is specified.
@seppeljordan
seppeljordan force-pushed the nix-prefetch-git-fix branch from c14b9c3 to 1dfaad7 Compare June 13, 2022 22:23
@seppeljordan seppeljordan changed the title nix-prefetch-git: Fix inconsitency with fetchgit regarding deepClone nix-prefetch-git: Fix inconsistency with fetchgit regarding deepClone Jun 13, 2022
@ofborg ofborg Bot added 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. labels Jun 13, 2022
@seppeljordan

Copy link
Copy Markdown
Contributor Author

Hi @mkg20001 @azuwis ,

I saw your accounts in the commit history of the fetchgit directory. I did not know who the official maintainer of this code is. This is why I mentioned you in this comment.

@seppeljordan

Copy link
Copy Markdown
Contributor Author

bump

@Ma27
Ma27 merged commit e4bf881 into NixOS:master Jun 28, 2022
@seppeljordan
seppeljordan deleted the nix-prefetch-git-fix branch June 29, 2022 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: fetch Fetchers (e.g. fetchgit, fetchsvn, ...) 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

nix-prefetch-git is (slightly) broken

2 participants