Age | Commit message (Collapse) | Author |
|
|
|
Instead of allocating a brand new buffer for each error string we want
to store, we can use a per-thread buffer to store the error string and
re-use the underlying storage. We already use the buffer to format the
string, so this mostly makes that more direct.
|
|
|
|
|
|
|
|
|
|
We don't want the iterator to make us stop whenever we hit an unreadable
dir. We should instead move over to the next item.
|
|
An error here will typically mean that the directory was removed between
the time we iterated the parent and the time we wanted to visit it in
which case we should ignore it.
Other kinds of errors such as permissions (or transient errors) also
better dealt with by pretending we didn't see it.
|
|
When we have an error renaming the lockfile, we need to make sure
that we remove it upon cleanup. For this, we need to keep track of
whether we opened the file and whether the rename succeeded.
If we did create the lockfile but the rename did not succeed, we
remove the lockfile. This won't protect against all errors, but
the most common ones (target file is open) does get handled.
|
|
When we fail to rename, we currently leave the lockfile laying
around. This shows that behaviour.
|
|
Normalize submodule urls before looking at them
|
|
Allow adding a submodule through git_index_add_bypath
|
|
refdb: delete a ref's reflog upon deletion
|
|
filter: make sure to close the stream even on error
|
|
Make libgit2 work on Windows Vista again
|
|
Increment `git__n_inits` before doing `init_once`.
|
|
|
|
Fixes #3318.
|
|
(fixes issue #3316)
Signed-off-by: Sven Strickroth <email@cs-ware.de>
|
|
Document git_fetch_options struct and fix typo.
|
|
git_fetch_options was missing from the API docs because it lacked a
documentation comment above the struct declaration.
I used the git_checkout_options docstring as a template.
Also fixes a typo in git_remote_prune_refs (remote, not reamote).
|
|
Fix macro redefinition warning
|
|
|
|
List a submodule only once when the path matches a submodule in the index
|
|
Extract the backslash-to-slash conversion into a helper function.
|
|
examples: modernise the fetch example
|
|
Our path functions expect to work with slashes, so convert a
path with backslashes into one with slashes at the top of
the function.
|
|
|
|
|
|
The header src/cc-compat.h defines portable format specifiers PRIuZ, PRIdZ, and PRIxZ. The original report highlighted the need to use these specifiers in examples/network/fetch.c. For this commit, I checked all C source and header files not in deps/ and transitioned to the appropriate format specifier where appropriate.
|
|
Under normal conditions, git_remote_fetch() should be the only function
used to perform a fetch. Don't let the example lead people astray.
|
|
Removing a reflog upon ref deletion is something which only some
backends might wish to do. Backends which are database-backed may wish
to archive a reflog, log-based ones may not need to do anything.
|
|
When the stream list init or write fail, we must also make sure to close
the stream, as that's the function contract.
|
|
Similarly to how git itself does it, allow the index update operation to
stage a change in a submodule's HEAD.
|
|
This also affects `git_index_add_bypath()` by providing a better error
message and a specific error code when a directory is passed.
|
|
This is to be returned when the operation which the user asked for is
not possible to do on a directory.
|
|
Increase required version of cmake to 2.8
|
|
If we get the path from the gitmodules file, look up the submodule we're
interested in by path, rather then by name. Otherwise we might get
duplicate results.
|
|
When we rename a submodule, we should be merging two sets of information
based on whether their path is the same. We currently only deduplicate
on equal name, which causes us to double-report.
|
|
|
|
Clean up some warnings
|
|
Fix undefined reference with old versions of openssl
|
|
git_cert: child types use proper base type
|
|
|
|
|
|
|
|
|
|
|
|
filters: custom filters with wildcard attributes
|
|
Don't add unnecessary trailing newline during file merge
|