| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
This makes the API for commiting or discarding changes the same as for
references.
|
|
|
|
|
|
|
|
|
| |
This lock/unlock pair allows for the cller to lock a configuration file
to avoid concurrent operations.
It also allows for a transactional approach to updating a configuration
file. If multiple updates must be made atomically, they can be done
while the config is locked.
|
|
|
|
|
|
|
| |
When a configuration file is locked, any updates made to it will be done
to the in-memory copy of the file. This allows for multiple updates to
happen while we hold the lock, preventing races during complex
config-file manipulation.
|
|
|
|
|
| |
When an error state is an OOM, make sure that we treat is specially
and do not try to free it.
|
| |
|
| |
|
|\
| |
| | |
filebuf: remove lockfile upon rename errors
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| | |
When we pass the path of a repository to `_bypath()`, we should behave
like git and stage it as a `_COMMIT` regardless of whether it is
registered a a submodule.
|
| | |
|
|\ \
| | |
| | | |
iterator: skip over errors in diriter init
|
| |/
| |
| |
| |
| | |
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.
|
|\ \
| | |
| | | |
Normalize submodule urls before looking at them
|
| | | |
|
|\ \ \
| | | |
| | | | |
Allow adding a submodule through git_index_add_bypath
|
| | | |
| | | |
| | | |
| | | |
| | | | |
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.
|
|\ \ \ \
| |_|_|/
|/| | | |
refdb: delete a ref's reflog upon deletion
|
| |/ /
| | |
| | |
| | |
| | |
| | | |
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.
|
|\ \ \
| |_|/
|/| | |
List a submodule only once when the path matches a submodule in the index
|
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
|\ \ \
| |_|/
|/| | |
|
| | |
| | |
| | |
| | | |
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.
|
| | | |
|
| | | |
|
|\ \ \
| | | |
| | | | |
filters: custom filters with wildcard attributes
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Allow custom filters with wildcard attributes, so that clients
can support some random `filter=foo` in a .gitattributes and look
up the corresponding smudge/clean commands in the configuration file.
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
When invoked with three files that each lack a trailing newline,
the merge result should also lack a trailing newline.
|
|\ \ \ \
| | | | |
| | | | | |
Added git_diff_index_to_index()
|
| | | | | |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
git__getenv: utf-8 aware env reader
|
| | |_|/ /
| |/| | |
| | | | |
| | | | |
| | | | |
| | | | | |
Introduce `git__getenv` which is a UTF-8 aware `getenv` everywhere.
Make `cl_getenv` use this to keep consistent memory handling around
return values (free everywhere, as opposed to only some platforms).
|
|\ \ \ \ \
| |_|_|_|/
|/| | | | |
Stacktraces with CRTDBG memory leaks on Windows
|
| | | | | |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
filter::stream: free the filter sanely
|
| | |/ / /
| |/| | |
| | | | |
| | | | |
| | | | |
| | | | | |
Don't use the filter's free callback to free the actual data structure
holding the filter, as we may not always actually initialize it (the
test may be skipped).
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
When two submodules are fairly similar, we may end up loading the wrong
one.
|
|/ / / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The function was removed, but its declaration and changelog entry about
its removal were forgotten.
The comment in the test doesn't make any sense as the function doesn't
exist anymore, so get rid of it as well.
|
| | | | |
|
| |/ /
|/| | |
|
|\ \ \
| |/ /
|/| | |
Remove some warnings
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
|/ /
| |
| |
| |
| | |
We allow looking up a submodule by path, but we lost the path
normalisation during the recent changes. Bring it back.
|
|\ \
| | |
| | | |
Plug a bunch of leaks
|