You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
git is the right choise for appliing patches as it is available more than every other solution at the most dev/prod systems, espetially non-linux ones like Windows, where the patch alternative is not often installed (or at least it is not available from the PATH).
git
is the right choise for appliing patches as it is available more than every other solution at the most dev/prod systems, espetially non-linux ones like Windows, where thepatch
alternative is not often installed (or at least it is not available from thePATH
).I have analysed the issue related with issue #148 ( https://stackoverflow.com/questions/24821431/git-apply-patch-fails-silently-no-errors-but-nothing-happens/#27283285 ):
Problem:
patch is not applied via
git apply
if outside.git
directory, in this caseSkipped patch '<file path>'.
verbose warning is show.Analysis:
state->prefix
(.git directory root path) https://github.com/git/git/blob/b02fd2accad4d48078671adf38fe5b5976d77304/apply.c#L2077state->prefix
is set solely here https://github.com/git/git/blob/b02fd2accad4d48078671adf38fe5b5976d77304/apply.c#L93setup_git_directory_gently()
https://github.com/git/git/blob/99c33bed562b41de6ce9bd3fd561303d39645048/git.c#L416 line as thegit apply
command is marked withRUN_SETUP_GENTLY
optionsetup_git_directory_gently()
function tries to find.git
directory and then it tests it withis_git_directory
https://github.com/git/git/blob/bc12974a897308fd3254cf0cc90319078fe45eea/setup.c#L311 , this function tests the presence of these files:.git/objects/
.git/refs/
.git/HEAD
These files needs to be presented in order to make
git patch
working.PR submitted.
The text was updated successfully, but these errors were encountered: