8000 Hook support by tiennou · Pull Request #3824 · libgit2/libgit2 · GitHub
[go: up one dir, main page]

Skip to content

Hook support #3824

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

Closed
wants to merge 44 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
417511e
Sketch hook support
tiennou Jun 15, 2016
3a1386a
Remove hook loading/saving support
tiennou Jun 28, 2016
13c3256
Separate checking a hook from building its path
tiennou Jun 28, 2016
6986a91
Update the list of hooks from the manpage
tiennou Jun 28, 2016
8045994
Really test hook enumeration
tiennou Jun 28, 2016
79a0548
First pass at hook execution
tiennou Jun 28, 2016
a7ad000
Cosmetics
tiennou Jul 4, 2016
caea13c
Cleanup the path-wrangling routine
tiennou Jul 4, 2016
83d3328
Fix memory leaks
tiennou Jul 5, 2016
2e4bf0d
Mark private function as static
tiennou Jul 5, 2016
a85ec07
Add a mechanism to provide the executor with IO data
tiennou Jul 5, 2016
99c79bc
Rename test
tiennou Jul 5, 2016
b234b7d
Add a test for the io variant
tiennou Jul 5, 2016
3d99d1e
Extract the hook directory discovery for config customization
tiennou Jul 5, 2016
5d3b0da
Add test to check behavior of core.hooksPath
tiennou Jul 5, 2016
51633cc
Style
tiennou Jul 7, 2016
239a7f2
Windows has no concept of executable files
tiennou Jul 7, 2016
c47fdc4
Add a destructor for the payload
tiennou Jul 7, 2016
9bdd960
Unset our payload-memory-management if needed
tiennou Jul 7, 2016
050aaf3
Documentation
tiennou Jul 7, 2016
dc4799c
Plug memory leaks
tiennou Jul 8, 2016
745dcc4
Don't use asprintf, as it's not available on Windows
tiennou Jul 8, 2016
993dc02
Merge branch 'master' into hooks
tiennou Oct 31, 2016
593bfbf
Pointerify the hook environment
tiennou Oct 31, 2016
b3751f9
Extraneous va_end
tiennou Oct 31, 2016
856edf9
Missing error checking
tiennou Oct 31, 2016
9f5570e
Explicit NULL comparison
tiennou Oct 31, 2016
ae132a7
Documentation fix
tiennou Oct 31, 2016
f546820
Use vectors for comparing list of hooks
tiennou Oct 31, 2016
aedf1de
Clarify hook test function names
tiennou Oct 31, 2016
1bf0bb6
Return the hook directory as a char * instead of a git_buf
tiennou Oct 31, 2016
b5e0cf6
Indentation fix
tiennou Oct 31, 2016
6b9ab1f
Fix easy part of MSVC
tiennou Nov 1, 2016
a510f32
Cleanup test
tiennou Nov 1, 2016
14b2ca4
hook: always call the destructor, not just when there's a payload
tiennou Nov 1, 2016
364d21c
hook: mismatched return type
tiennou Nov 7, 2016
2a2e2cb
hook: clear errors when looking up core.hooksPath
tiennou Nov 7, 2016
cd4eb85
hook: ignore missing hooks on execution
tiennou Nov 7, 2016
33193d2
hook: uninitialized variable
tiennou Nov 7, 2016
470a8ce
hook: provide a default error message if the executor failed to do so
tiennou Nov 7, 2016
cf3daec
hook: wire up pre-rebase
tiennou Nov 7, 2016
2119536
rebase: dangling comma
tiennou Nov 7, 2016
d181f05
tests: fix memory leak
tiennou Nov 7, 2016
2e6c89e
MSVC please ?
tiennou Nov 7, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
hook: clear errors when looking up core.hooksPath
  • Loading branch information
tiennou committed Nov 7, 2016
commit 2a2e2cbbfd96de84b1a08e6df41de6fc2b05bb6d
1 change: 1 addition & 0 deletions src/hook.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ static int hook_dir(git_buf *out_dir, git_repository *repo)

err = git_config_get_path(&cfg_path, cfg, "core.hooksPath");
if (err == GIT_ENOTFOUND) {
giterr_clear();
git_buf_puts(&tmp_path, repo->path_repository);
git_buf_joinpath(&tmp_path, tmp_path.ptr, GIT_HOOKS_DIR);
} else if (err == GIT_OK) {
Expand Down
0