You are not logged in.

#1 2020-11-28 19:03:40

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,919

[solved] How to convert a single git commit into a patch-file ?

Usecase :

bullet3 3.07 was recently released[1]
Unfortunately the version in the release tarball is still 3.05

https://github.com/bulletphysics/bullet … d091d987fa updates everything related to the version .

I could use git to download the sourcecode from that specific commit, but would prefer using the released file plus a patch .
Using git send-email one can send patches, but there doesn't seem to be a counterpart that allows to retrieve commits as patches.

Does anyone know a way to achieve this ?

[1]
https://github.com/bulletphysics/bullet3/releases


Edit:

The methods in the replies all work.

Last edited by Lone_Wolf (2020-11-28 23:30:55)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#2 2020-11-28 19:18:02

ayekat
Member
Registered: 2011-01-17
Posts: 1,589

Re: [solved] How to convert a single git commit into a patch-file ?

I'm not 100% sure if I understood the problem correctly, but you can append `.diff` to that URL there to get the raw diff file, or `.patch` to also get the commit information (date, author, commit message, …).


pkgshackscfgblag

Offline

#3 2020-11-28 19:18:16

Alad
Wiki Admin/IRC Op
From: Bagelstan
Registered: 2014-05-04
Posts: 2,412
Website

Re: [solved] How to convert a single git commit into a patch-file ?

https://git-scm.com/docs/git-format-patch

git format-patch -1 e32fc59c88a3908876949c6f2665e8d091d987fa

Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby

Offline

#4 2020-11-28 22:10:37

progandy
Member
Registered: 2012-05-17
Posts: 5,192

Re: [solved] How to convert a single git commit into a patch-file ?

To get the patch from github without downloading the repository append .patch to the URL:

https://github.com/bulletphysics/bullet … 87fa.patch


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#5 2020-11-28 23:28:45

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,919

Re: [solved] How to convert a single git commit into a patch-file ?

Thank you all, patch retrieved and aur package is updated .


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

Board footer

Powered by FluxBB