]> git.proxmox.com Git - libgit2.git/commit - src/odb_loose.c
Improve GIT_EUSER handling
authorRussell Belfer <rb@github.com>
Wed, 4 Dec 2013 00:45:39 +0000 (16:45 -0800)
committerRussell Belfer <rb@github.com>
Wed, 11 Dec 2013 18:57:49 +0000 (10:57 -0800)
commit96869a4edb2872934e0e167a726ab240f4270fea
tree2d770414acef2d1d45a609e004c0aa6fa56d06d7
parent9f77b3f6f5ce6944ec49dfc666ef6b8df0af0c6b
Improve GIT_EUSER handling

This adds giterr_user_cancel to return GIT_EUSER and clear any
error message that is sitting around.  As a result of using that
in places, we need to be more thorough with capturing errors that
happen inside a callback when used internally.  To help with that,
this also adds giterr_capture and giterr_restore so that when we
internally use a foreach-type function that clears errors and
converts them to GIT_EUSER, it is easier to restore not just the
return value, but the actual error message text.
28 files changed:
include/git2/errors.h
src/attr.c
src/blame.c
src/blame.h
src/branch.c
src/checkout.c
src/common.h
src/config.c
src/diff.c
src/diff_patch.c
src/diff_print.c
src/diff_xdiff.c
src/errors.c
src/fileops.c
src/iterator.c
src/odb_loose.c
src/odb_pack.c
src/path.c
src/pool.c
src/refdb_fs.c
src/refs.c
src/remote.c
src/status.c
src/submodule.c
tests/config/rename.c [new file with mode: 0644]
tests/config/validkeyname.c
tests/config/write.c
tests/refs/branches/move.c