| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
| |
| |
| |
| | |
- Fails on empty name and/or email
- Trims leading and trailing spaces of name and email
|
| |
| |
| |
| | |
Final fix for issue #278
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
git_signature__parse used to be very strict about what's a well-formed
signature. Since git_signature__parse is used only when reading already
existing signatures, we should not care about if it's a valid signature
too much but rather show what we got.
Reported-by: nulltoken <emeric.fermas@gmail.com>
Signed-off-by: schu <schu-github@schulog.org>
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
The `stat` methods were having issues when called with a trailing slash
in Windows platforms.
We now use GetFileAttributes() where possible, which doesn't have this
restriction.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The old `git_fileops_prettify_path` has been replaced with
`git_path_prettify`. This is a much simpler method that uses the OS's
`realpath` call to obtain the full path for directories and resolve
symlinks.
The `realpath` syscall is the original POSIX call in Unix system and
an emulated version under Windows using the Windows API.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Cleaned up the structure of the whole OS-abstraction layer.
fileops.c now contains a set of utility methods for file management used
by the library. These are abstractions on top of the original POSIX
calls.
There's a new file called `posix.c` that contains
emulations/reimplementations of all the POSIX calls the library uses.
These are prefixed with `p_`. There's a specific posix file for each
platform (win32 and unix).
All the path-related methods have been moved from `utils.c` to `path.c`
and have their own prefix.
|
| | |
|
| |
| |
| |
| | |
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
|
| |
| |
| |
| | |
This will make libgit2 more suitable for embedding.
|
| | |
|
| |
| |
| |
| |
| |
| | |
The assertion in line 360 was there to check that only loose refs were
being written as loose, but there are times when we need to re-write a
packed reference as loose.
|
| |
| |
| |
| | |
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
|
| |
| |
| |
| | |
Directory which name starts with a dot are hidden on Linux platforms. This patch makes libgit2 behaves similarly on Windows.
|
| | |
|
| |
| |
| |
| | |
`git_reference_rename` now takes a `force` flag
|
| |
| |
| |
| | |
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Core Git doesn't care when people use spaces in the email address, even
though this kind of foolery receives the capital punishment in several
states of the USA.
We must obey.
|
|\ \
| | |
| | | |
Add detached and orphan convenience functions
|
| |/
| |
| |
| | |
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
|
| | |
|
|\ \
| | |
| | | |
Fix warning: signed and unsigned type in cond expr
|
| |/
| |
| |
| |
| |
| |
| | |
Remove call of gitfo_size, since we call gitfo_lstat anyway; remove some
old workaround code for gitfo_read, which is obsolete now.
Signed-off-by: schu <schu-github@schulog.org>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A bunch of redundant methods have been removed from the external API.
- All the reference/tag creation methods with `_f` are gone. The force
flag is now passed as an argument to the normal create methods.
- All the different commit creation methods are gone; commit creation
now always requires a `git_commit` pointer for parents and a `git_tree`
pointer for tree, to ensure that corrupted commits cannot be generated.
- All the different tag creation methods are gone; tag creation now
always requires a `git_object` pointer to ensure that tags are not
created to inexisting objects.
|
| |
|
| |
|
|\
| |
| | |
gitfo_read: fix read-loop
|
| |
| |
| |
| | |
Signed-off-by: schu <schu-github@schulog.org>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Call gitfo_lstat with the full pathname instead of the relative one,
which fails in case the current working directory is different from
the workdir.
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
|
|/
|
|
|
|
|
|
|
| |
Also allow space for the null-terminator when allocating the buffer in
packfile_unpack_compressed. Up to now, the last newline had served as
a terminator, but 858ef372 searches for a double-newline and exposes
the problem.
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
|
|
|
|
|
| |
Allows a custom user backend to passthrough one of the callbacks. Used
for e.g. caching backends.
|
| |
|
| |
|
|
|
|
| |
Scott commands, I obey.
|
| |
|
| |
|
|\
| |
| | |
Fix compilation error in MSVC when compiling for c++
|
| | |
|
| |
| |
| |
| |
| | |
Do not mess with environment variables anymore. The new external API has
more helper methods, and everything is explicit.
|
| |
| |
| |
| |
| |
| |
| | |
If a config has several files, we need to check all of them before we
can say that a variable doesn't exist.
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
|
| |
| |
| |
| |
| |
| |
| | |
It's not enough to load the config, we also need to explicitely parse
it after we create it.
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
|
| |
| |
| |
| |
| |
| |
| | |
This function puts the global and repository configurations in one
git_config object and gives it to the user.
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
|
|/
|
|
|
|
| |
Noticed by txdv
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
|
| |
|
|\
| |
| | |
Plug memory leaks
|
| |
| |
| |
| | |
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
|