Skip to content

Add the -a param to the docs#126001

Merged
ryantm merged 1 commit intoNixOS:masterfrom
est31:master
Jul 28, 2021
Merged

Add the -a param to the docs#126001
ryantm merged 1 commit intoNixOS:masterfrom
est31:master

Conversation

@est31
Copy link
Contributor

@est31 est31 commented Jun 6, 2021

The patch utility does not understand git formatted patches.
For text files, there is no problem, but binary files use a format patch doesn't understand.

The -a param makes git diff put binary files into the patch in
raw format that can be understood by the patch tool.

@github-actions github-actions bot added the 8.has: documentation This PR adds or changes documentation label Jun 6, 2021
The patch utility does not understand git formatted patches.
For text files, there is no problem, but binary files use the
git format.

The -a param makes git diff put binary files into the patch in
raw format that can be understood by the patch tool.
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Jun 6, 2021
@SuperSandro2000 SuperSandro2000 requested a review from ryantm June 8, 2021 16:08
@est31
Copy link
Contributor Author

est31 commented Jul 28, 2021

@ryantm friendly ping

@ryantm
Copy link
Member

ryantm commented Jul 28, 2021

I don't feel particularly qualified to review this. Is it really the case that we want to have patches of binary files in nixpkgs? It seems like it would be really hard to review that the patch is doing the right thing. Why not build from source and use a source patch?

@est31
Copy link
Contributor Author

est31 commented Jul 28, 2021

shared-mime-info contains binary files as part of the test suite. Before updating it altogether in #126050 I first tried backporting the PR I wanted. That PR also altered the test suite so it added binary files. I wondered for hours how I could get the patch file into a format that nix would accept, as it didn't like git formatted patches until I discovered the -a option. git supports this out of the box so I feel that the recommended command from the docs supporting binary files out of the box would be good as well.

@ryantm
Copy link
Member

ryantm commented Jul 28, 2021

Okay, I don't think this will actually actively encourage people to actually merge binary patches to nixpkgs, and it sounds like it might have saved some time in your case, so sure, let's merge it.

@ryantm ryantm merged commit 9e55528 into NixOS:master Jul 28, 2021
@Janik-Haag Janik-Haag added the 12.first-time contribution This PR is the author's first one; please be gentle! label Jun 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

8.has: documentation This PR adds or changes documentation 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. 12.first-time contribution This PR is the author's first one; please be gentle!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants