Issue 2281 fix 2#6
Open
naseschwarz wants to merge 6 commits into
Open
Conversation
* push: respect `branch.*.merge` when push default is upstream
cb3b5d2 to
0380f70
Compare
added 2 commits
March 19, 2025 12:11
This is a function that's solely used in testing and has no dependencies into git2_hooks and panics on common errors. It's a much better fit for git2-testing.
git2_hooks::create_hook is a function used in tests, which panics on common errors. It can't really be moved into git2-testing, as it depends on git2_hooks::hookspath::HookPaths. In order to avoid accidental use, move the function into git2_hooks::test_utils[_priv] and only publish it as git2_hooks::test_utils if feature = "test-utils" is enabled.
d7d1a2d to
29df53e
Compare
git supports relative values in core.hooksPath. `man git-config`: > A relative path is taken as relative to the directory where the hooks are > run (see the "DESCRIPTION" section of githooks[5]). `man githooks`: > Before Git invokes a hook, it changes its working directory to either > $GIT_DIR in a bare repository or the root of the working tree in a > > non-bare repository. I.e. relative paths in core.hooksPath in non-bare repositories are always relative to GIT_WORK_TREE. There is a further exception; I believe this is not considered for path resolution: > An exception are hooks triggered during a push (pre-receive, update, > post-receive, post-update, push-to-checkout) which are always executed > in $GIT_DIR.
fdf65a8 to
cda17c7
Compare
This file contains hidden or 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
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.
This Pull Request fixes/closes #{issue_num}.
It changes the following:
I followed the checklist:
make checkwithout errors