|
26c1cb91
|
2013-12-09T09:44:03
|
|
One more rename/cleanup for callback err functions
|
|
f10d7a36
|
2013-12-06T15:53:26
|
|
Further callback error check style fixes
Okay, I've decided I like the readability of this style much
better so I used it everywhere.
|
|
60058018
|
2013-12-06T15:20:41
|
|
Fix C99 __func__ for MSVC
|
|
c7b3e1b3
|
2013-12-06T15:42:20
|
|
Some callback error check style cleanups
I find this easier to read...
|
|
96869a4e
|
2013-12-03T16:45:39
|
|
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.
|
|
9f77b3f6
|
2013-11-25T14:21:34
|
|
Add config read fns with controlled error behavior
This adds `git_config__lookup_entry` which will look up a key in
a config and return either the entry or NULL if the key was not
present. Optionally, it can either suppress all errors or can
return them (although not finding the key is not an error for this
function). Unlike other accessors, this does not normalize the
config key string, so it must only be used when the key is known
to be in normalized form (i.e. all lower-case before the first dot
and after the last dot, with no invalid characters).
This also adds three high-level helper functions to look up config
values with no errors and a fallback value. The three functions
are for string, bool, and int values, and will resort to the
fallback value for any error that arises. They are:
* `git_config__get_string_force`
* `git_config__get_bool_force`
* `git_config__get_int_force`
None of them normalize the config `key` either, so they can only
be used for internal cases where the key is known to be in normal
format.
|
|
25e0b157
|
2013-12-06T15:07:57
|
|
Remove converting user error to GIT_EUSER
This changes the behavior of callbacks so that the callback error
code is not converted into GIT_EUSER and instead we propagate the
return value through to the caller. Instead of using the
giterr_capture and giterr_restore functions, we now rely on all
functions to pass back the return value from a callback.
To avoid having a return value with no error message, the user
can call the public giterr_set_str or some such function to set
an error message. There is a new helper 'giterr_set_callback'
that functions can invoke after making a callback which ensures
that some error message was set in case the callback did not set
one.
In places where the sign of the callback return value is
meaningful (e.g. positive to skip, negative to abort), only the
negative values are returned back to the caller, obviously, since
the other values allow for continuing the loop.
The hardest parts of this were in the checkout code where positive
return values were overloaded as meaningful values for checkout.
I fixed this by adding an output parameter to many of the internal
checkout functions and removing the overload. This added some
code, but it is probably a better implementation.
There is some funkiness in the network code where user provided
callbacks could be returning a positive or a negative value and
we want to rely on that to cancel the loop. There are still a
couple places where an user error might get turned into GIT_EUSER
there, I think, though none exercised by the tests.
|
|
fcd324c6
|
2013-12-06T15:04:31
|
|
Add git_vector_free_all
There are a lot of places that we call git__free on each item in
a vector and then call git_vector_free on the vector itself. This
just wraps that up into one convenient helper function.
|
|
dab89f9b
|
2013-12-04T21:22:57
|
|
Further EUSER and error propagation fixes
This continues auditing all the places where GIT_EUSER is being
returned and making sure to clear any existing error using the
new giterr_user_cancel helper. As a result, places that relied
on intercepting GIT_EUSER but having the old error preserved also
needed to be cleaned up to correctly stash and then retrieve the
actual error.
Additionally, as I encountered places where error codes were not
being propagated correctly, I tried to fix them up. A number of
those fixes are included in the this commit as well.
|
|
0eedacb0
|
2013-12-11T10:39:36
|
|
Merge pull request #1985 from libgit2/diff-rename-config
Rename detection using diff.renames
|
|
5a52d6be
|
2013-12-11T06:43:17
|
|
Check version earlier
|
|
5588f073
|
2013-12-09T10:25:36
|
|
Clean up warnings
|
|
07c5dc84
|
2013-12-08T12:36:48
|
|
Merge pull request #1994 from palistov/commit-cleanup
commit: Fix potential segfault
|
|
be0a1a79
|
2013-12-08T02:03:05
|
|
commit: Fix potential segfault in git_commit_message
Dereferencing commit pointer before asserting
|
|
307a3d67
|
2013-12-08T01:50:10
|
|
Fixed left shift size of int.
Simply switched the ordering of the checks in the for loop where this left
shift was being made.
|
|
7fb4147f
|
2013-12-06T13:38:59
|
|
Don't clobber whitespace settings
|
|
8f460f2c
|
2013-12-05T20:41:12
|
|
blame.c: Remove unnecessary error-check and goto
In private function 'load_blob'.
|
|
628e92cd
|
2013-12-05T14:47:04
|
|
Don't use weird return codes
|
|
c56c6d69
|
2013-12-05T14:13:46
|
|
Implement GIT_DIFF_FIND_BY_CONFIG
|
|
ed5b77b0
|
2013-12-05T11:13:58
|
|
Fixed compilation on Windows when using libssh2.
|
|
eac938d9
|
2013-12-02T14:10:04
|
|
Bare naked merge and rebase
|
|
a149a189
|
2013-12-03T02:14:28
|
|
Merge pull request #1981 from jamill/download_cancel_tweaks
Updates to cancellation logic during download and indexing of packfile.
|
|
db0a7e39
|
2013-12-03T02:11:55
|
|
Merge pull request #1977 from ethomson/revert
Revert support for a single commit
|
|
db4cbfe5
|
2013-12-02T14:09:12
|
|
Updates to cancellation logic during download and indexing of packfile.
|
|
bab0b9f2
|
2013-11-22T18:02:12
|
|
clean up state metadata more consistently
|
|
300d192f
|
2013-12-02T11:15:27
|
|
Introduce git_revert to revert a single commit
|
|
f62c174d
|
2013-12-02T13:49:58
|
|
GIT_DIFF_FIND_REMOVE_UNMODIFIED sounds better
|
|
97ad85b8
|
2013-12-02T13:30:05
|
|
Add GIT_DIFF_FIND_DELETE_UNMODIFIED flag
When doing copy detection, it is often necessary to include
UNMODIFIED records in the git_diff so they are available as source
records for GIT_DIFF_FIND_COPIES_FROM_UNMODIFIED. Yet in the final
diff, often you will not want to have these UNMODIFIED records.
This adds a flag which marks these UNMODIFIED records for deletion
from the diff list so they will be removed after the rename detect
phase is over.
|
|
2123a17f
|
2013-12-02T13:27:06
|
|
Fix bug making split deltas a COPIED targets
When FIND_COPIES is used in combination with BREAK_REWRITES for
rename detection, there was a bug where the split MODIFIED delta
was only used as a target for RENAME records and not for COPIED
records. This fixes that, converting the split into a pair of
DELETED and COPIED deltas when that circumstance arises.
|
|
758f2f10
|
2013-11-27T14:17:40
|
|
posix: Solaris doesn't have strnlen either
|
|
ee7040fd
|
2013-11-20T14:11:44
|
|
ssh: add support for ssh-agent authentication
|
|
e479628a
|
2013-11-19T11:36:02
|
|
Merge pull request #1966 from nickh/patch_content_offsets
Add content offset to git_diff_line
|
|
963edd9b
|
2013-11-19T17:58:58
|
|
util: NetBSD doesn't have qsort_r either
|
|
e544a5b8
|
2013-11-19T04:54:31
|
|
Merge pull request #1968 from libgit2/ntk/fix/bad_index
Corrupted index is bad for your health
|
|
bd15b513
|
2013-11-19T13:24:10
|
|
index: Free the index on git_index_open() failure
|
|
a5d73188
|
2013-11-19T13:16:09
|
|
tree-cache: Fix error message typo
|
|
3d523345
|
2013-11-19T13:15:47
|
|
tree-cache: Don't segfault upon corruption
|
|
82e6a42c
|
2013-11-19T13:13:51
|
|
tree-cache: Zero out the allocated tree children array
|
|
7b69289f
|
2013-11-19T12:54:57
|
|
tree-cache: Free the tree upon the detection of a corrupted child
|
|
7135e77a
|
2013-11-19T03:13:23
|
|
Merge pull request #1967 from victorgp/cleaning-code-minor-change
Cleaning code, removing unused variables
|
|
10b6678f
|
2013-11-19T11:57:32
|
|
cleaning code, removing unused variables
|
|
d8e7ffc2
|
2013-11-18T14:03:25
|
|
Add content offset to git_diff_line
For additions and deletions, external consumers like subversion
can make use of the content offset to generate diffs in their
proprietary formats.
|
|
e1ce5249
|
2013-11-18T21:40:19
|
|
netops: fix leak
|
|
8f2a3d62
|
2013-11-18T12:14:50
|
|
Fix warnings
|
|
84efffc3
|
2013-11-13T16:57:51
|
|
Introduce git_cred_default for NTLM/SPNEGO auth
|
|
80fc7d6b
|
2013-11-13T16:46:45
|
|
Propagate auth error codes as GIT_EUSER in winhttp
|
|
7b947bf5
|
2013-11-14T07:21:47
|
|
Merge pull request #1951 from victorgp/create-remote-plus-fetch
Allowing create remotes with custom fetch spec
|
|
98eaf39a
|
2013-11-13T11:12:31
|
|
Fix warnings
|
|
b20c40a8
|
2013-11-12T19:02:28
|
|
Don't leak memory when duplicating a NULL signature
|
|
9db56cc4
|
2013-11-12T18:57:16
|
|
Fix buffer blame with new lines at end of file
|
|
089297b2
|
2013-11-12T15:24:59
|
|
Duplicate all fields of a blame hunk
|
|
fb190bbb
|
2013-11-12T19:44:13
|
|
Fix warnings
|
|
6414fd33
|
2013-11-11T06:47:15
|
|
Merge pull request #1956 from libgit2/cmn/fetch-default-head
Remote revamp (director's cut)
|
|
a6192d7c
|
2013-11-11T15:32:13
|
|
remote: update head list on push
A previous commit forgot to update the head list after push as well,
leading to wrong output of git_remote_ls().
|
|
877cde76
|
2013-11-02T01:10:21
|
|
remote: let's at least pretend to have some memory safety
Copy the pointers into temporary vectors instead of assigning them tot
he same array so we don't mess up with someone else's memory by
accident (e.g. by sorting).
|
|
1c967df3
|
2013-11-02T00:51:57
|
|
remote: fix a couple of leaks
|
|
359dce72
|
2013-11-02T00:05:32
|
|
remote: make _ls return the list directly
The callback-based method of listing remote references dates back to the
beginning of the network code's lifetime, when we didn't know any
better.
We need to keep the list around for update_tips() after disconnect() so
let's make use of this to simply give the user a pointer to the array so
they can write straightforward code instead of having to go through a
callback.
|
|
266af6d8
|
2013-10-30T13:44:22
|
|
remote: don't allow such direct access to the refspecs
Removing arbitrary refspecs makes things more complex to reason
about. Instead, let the user set the fetch and push refspec list to
whatever they want it to be.
|
|
a1d35ede
|
2013-11-10T16:41:41
|
|
config_file: style
|
|
b9cb72c2
|
2013-11-10T07:33:11
|
|
Merge pull request #1950 from csware/quote-config-values
Correctly quote config values while saving
|
|
0df96f2b
|
2013-11-10T07:31:21
|
|
Merge pull request #1936 from libgit2/better-url-parsing
Streamline url-parsing logic.
|
|
40b99d05
|
2013-11-08T12:14:31
|
|
splitting funcionality in two methods to avoid ambiguity with NULL
|
|
1e60e5f4
|
2013-11-07T12:03:44
|
|
Allow callers to set mode on packfile creation
|
|
590c5efb
|
2013-11-07T17:51:43
|
|
Rename method
Signed-off-by: Sven Strickroth <email@cs-ware.de>
|
|
cc2447da
|
2013-11-06T18:41:08
|
|
Add git_packbuilder_hash to query pack filename
|
|
0fe522d1
|
2013-11-07T14:16:20
|
|
allowing create remote with custom fetch spec
|
|
fde93250
|
2013-11-07T13:17:36
|
|
Correctly quote config values while saving
If the value contains a command (; or #) char or starts or ends with space it needs to be quoted.
Signed-off-by: Sven Strickroth <email@cs-ware.de>
|
|
7616b8d3
|
2013-11-05T17:34:45
|
|
don't double free pkt
|
|
a8baf4b1
|
2013-11-05T12:26:41
|
|
Merge pull request #1946 from arthurschreiber/change-branch-iterator-definition
Change the git_branch_iterator_new definition to use git_branch_t
|
|
a667ca82
|
2013-11-05T20:51:07
|
|
Change the git_branch_iterator_new and git_branch_next definitions to use git_branch_t.
|
|
8adea28a
|
2013-11-05T11:42:42
|
|
Blame: change signature to be more binding-friendly
|
|
79c44342
|
2013-11-05T11:35:57
|
|
Make url decoding more bulletproof
|
|
aad5403f
|
2013-11-05T10:55:54
|
|
Fix MSVC 64-bit warnings
|
|
d6eb3f9c
|
2013-11-05T10:54:44
|
|
Remove unnecessary check
|
|
fe294b95
|
2013-11-05T10:37:50
|
|
Incorporate feedback
|
|
39b1ad7f
|
2013-11-05T16:14:20
|
|
Plug configuration file search paths leaks
|
|
8d22773f
|
2013-11-05T16:44:10
|
|
Plug git_merge() related leaks
|
|
039db728
|
2013-07-03T01:00:45
|
|
merge branch into current, updating workdir
|
|
ae26c4b8
|
2013-11-05T06:55:29
|
|
Merge pull request #1943 from libgit2/ntk/fix/leaks
Fix leaks
|
|
c82f7f8e
|
2013-11-05T06:55:16
|
|
Merge pull request #1938 from libgit2/cmn/branch-iterator
branch: move from foreach to an iterator
|
|
61080a95
|
2013-11-05T15:10:02
|
|
Fix leaks
|
|
ffd04053
|
2013-11-05T06:05:32
|
|
Merge pull request #1941 from libgit2/rb/preserve-iterator-error
Preserve error messages during file system iterator cleanup
|
|
8ec889a4
|
2013-11-02T14:07:02
|
|
branch: move from foreach to an iterator
Create a git_branch_iterator type which is equivalent to the foreach but
lets us write loops instead of callbacks.
Since the introduction of git_reference_shorthand(), the added value of
passing the name is reduced.
|
|
1eab9f0e
|
2013-11-05T14:56:10
|
|
error: Simplify giterr_detach
|
|
e8162fd0
|
2013-11-05T12:01:14
|
|
Propagate ELOCKED error when updating the config
|
|
1d3a8aeb
|
2013-11-04T18:28:57
|
|
move mode_t to filebuf_open instead of _commit
|
|
f966acd1
|
2013-11-04T15:46:32
|
|
Take umask into account in filebuf_commit
|
|
ac72051a
|
2013-11-04T19:09:30
|
|
Fix ssh.c compile
|
|
3b259cbd
|
2013-11-04T15:47:35
|
|
Preserve file error in iterator
When the filesystem iterator encounters an error with a file, it
returns the error but because of the cleanup code, it was in some
cases erasing the error message. This uses the giterr_detach API
to make sure that the actual error message is restored after the
cleanup code has been run.
|
|
d6c60169
|
2013-11-04T15:45:31
|
|
Add giterr_detach API to get and clear error
There are a number of cases where it is convenient to be able to
fetch and "claim" the current error string, clearing the error.
This is helpful when you need to call some code that may alter
the error and you want to restore it later on and/or report it via
some other mechanism.
|
|
0e1115d2
|
2013-11-04T12:16:14
|
|
Merge pull request #1939 from ethomson/readwrite_odb
Allow backend consumers to specify file mode
|
|
16bffd1c
|
2013-11-04T12:04:17
|
|
Unescape url-encoded usernames and passwords
|
|
dd64c71c
|
2013-11-04T14:50:25
|
|
Allow backend consumers to specify file mode
|
|
c227c173
|
2013-11-04T11:42:14
|
|
Use http_parser_parse_url to parse urls
|
|
fb6b0e01
|
2013-11-04T10:44:59
|
|
Merge pull request #1317 from libgit2/blame
Blame Canada
|
|
44acdd1f
|
2013-11-04T08:09:58
|
|
Merge pull request #1937 from scunz/checkout_assert
Don't assert in git_checkout_tree
|
|
5a0b8803
|
2013-11-04T08:05:55
|
|
Merge pull request #1929 from libgit2/rb/misc-diff-fixes
Fix some observed problems with incorrect diffs
|
|
a7a64d2c
|
2013-11-02T18:36:34
|
|
remote: don't write too much when dealing with multivars
We used to move `data_start` forward, which is wrong as that needs to
point to the beginning of the buffer in order to perform size
calculations.
Introduce a `write_start` variable which indicates where we should start
writing from, which is what the `data_start` was being wrongly reused to
be.
|
|
7b3959b2
|
2013-11-02T03:45:32
|
|
Checkout: git_checkout_head is git_checkout_tree without a treeish
The last commit taught git_checkout_tree to actually do something
meaningfull, when treeish was NULL. This lets us rewrite
git_checkout_head to simply call git_checkout_tree without giving it a
treeish.
|
|
35221441
|
2013-11-02T03:43:34
|
|
Checkout: Don't assert if treeish is NULL
In git_checkout_tree, the first check tests if either repo or treeish is
NULL and says that eithor of them has to have a valid value. But there
is no code to handle the treeish == NULL case.
So, do something meaningful in that case: use HEAD instead.
|