-
-
Notifications
You must be signed in to change notification settings - Fork 10k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
formula: don't include DATA patches in initial Git repo #19310
Merged
MikeMcQuaid
merged 1 commit into
Homebrew:master
from
gromgit:formula/patch-data-outside-git
Feb 18, 2025
Merged
formula: don't include DATA patches in initial Git repo #19310
MikeMcQuaid
merged 1 commit into
Homebrew:master
from
gromgit:formula/patch-data-outside-git
Feb 18, 2025
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MikeMcQuaid
reviewed
Feb 18, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @gromgit, the approach makes sense, just will riff a little on the exact code.
27864a2
to
8368ff7
Compare
Currently, existing DATA patches are subsumed into the initial Git repo created by `brew install --git`, which makes creating a new DATA patch after more fixes a tedious and error-prone process. This PR delays DATA patch processing till after the Git repo is created, so a `git diff` at the end creates a correct and consolidated DATA patch block ready for insertion/replacement, or even migration to a proper remote patch URL. The difference is clearly seen in `gromgit/fuse/dislocker-mac`, which has both remote and DATA patches. Before: ``` % brew install -sig dislocker-mac ==> Fetching gromgit/fuse/dislocker-mac ==> Downloading /~https://github.com/Aorimn/dislocker/commit/2cfbba2c8cc07e529622ba134d0a6982815d2b30.patch?full_index=1 Already downloaded: /Volumes/aho/Library/Caches/Homebrew/downloads/37276859cbebc1711941278db00cd8b25b98d69e15e31e33915a98d01a13febc--2cfbba2c8cc07e529622ba134d0a6982815d2b30.patch ==> Downloading /~https://github.com/Aorimn/dislocker/archive/refs/tags/v0.7.3.tar.gz Already downloaded: /Volumes/aho/Library/Caches/Homebrew/downloads/b1ba1098c95535574936051eca45cc472955a5a024b81cc72e1c3b006e1950b3--dislocker-0.7.3.tar.gz ==> Installing dislocker-mac from gromgit/fuse ==> Patching ==> Applying 2cfbba2c8cc07e529622ba134d0a6982815d2b30.patch Initialized empty Git repository in /private/tmp/dislocker-mac-20250215-35534-8qlxtp/dislocker-0.7.3/.git/ ==> Entering interactive mode... Type `exit` to return and finalize the installation. Install to this prefix: /opt/homebrew/Cellar/dislocker-mac/0.7.3_2 This directory is now a Git repository. Make your changes and then use: git diff | pbcopy to copy the diff to the clipboard. % git diff ``` After: ``` % brew install -sig dislocker-mac ==> Fetching gromgit/fuse/dislocker-mac ==> Downloading /~https://github.com/Aorimn/dislocker/commit/2cfbba2c8cc07e529622ba134d0a6982815d2b30.patch?full_index=1 Already downloaded: /Volumes/aho/Library/Caches/Homebrew/downloads/37276859cbebc1711941278db00cd8b25b98d69e15e31e33915a98d01a13febc--2cfbba2c8cc07e529622ba134d0a6982815d2b30.patch ==> Downloading /~https://github.com/Aorimn/dislocker/archive/refs/tags/v0.7.3.tar.gz Already downloaded: /Volumes/aho/Library/Caches/Homebrew/downloads/b1ba1098c95535574936051eca45cc472955a5a024b81cc72e1c3b006e1950b3--dislocker-0.7.3.tar.gz ==> Installing dislocker-mac from gromgit/fuse ==> Applying non-DATA patches ==> Applying 2cfbba2c8cc07e529622ba134d0a6982815d2b30.patch Initialized empty Git repository in /private/tmp/dislocker-mac-20250215-32462-zh1akh/dislocker-0.7.3/.git/ ==> Applying DATA patches ==> Entering interactive mode... Type `exit` to return and finalize the installation. Install to this prefix: /opt/homebrew/Cellar/dislocker-mac/0.7.3_2 This directory is now a Git repository. Make your changes and then use: git diff | pbcopy to copy the diff to the clipboard. % git diff diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index bd854d2..9ab137d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -92,7 +92,7 @@ if("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin") # Don't use `-read_only_relocs' here as it seems to only work for 32 bits # binaries set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-bind_at_load") - set (FUSE_LIB osxfuse_i64) + set (FUSE_LIB fuse) else() # Useless warnings when used within Darwin set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wconversion") diff --git a/src/dislocker-fuse.c b/src/dislocker-fuse.c index f93523f..3dd106c 100644 --- a/src/dislocker-fuse.c +++ b/src/dislocker-fuse.c @@ -33,11 +33,7 @@ -#ifdef __DARWIN -# include <osxfuse/fuse.h> -#else -# include <fuse.h> -#endif /* __DARWIN */ +#include <fuse.h> /** NTFS virtual partition's name */ ```
8368ff7
to
2df8440
Compare
MikeMcQuaid
approved these changes
Feb 18, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thanks!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently, existing DATA patches are subsumed into the initial Git repo created by
brew install --git
, which makes creating a new DATA patch after more fixes a tedious and error-prone process.This PR delays DATA patch processing till after the Git repo is created, so a
git diff
at the end creates a correct and consolidated DATA patch block ready for insertion/replacement, or even migration to a proper remote patch URL.The difference is clearly seen in
gromgit/fuse/dislocker-mac
, which has both remote and DATA patches.Before:
After:
brew style
with your changes locally?brew typecheck
with your changes locally?brew tests
with your changes locally?