summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* | signature: straighten the creation of a signaturenulltoken2011-07-051-35/+75
| | | | | | | | | | - Fails on empty name and/or email - Trims leading and trailing spaces of name and email
* | signature: enhance relaxed parsing of bogus signaturesnulltoken2011-07-051-41/+93
| | | | | | | | Final fix for issue #278
* | git_signature__parse: make parsing less strictschu2011-07-051-24/+24
| | | | | | | | | | | | | | | | | | | | 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>
* | repository: Cleanup initializationVicent Marti2011-07-051-56/+14
| |
* | fileutils: Finish dropping the old `prettify_path`Vicent Marti2011-07-053-206/+12
| |
* | fileops: Fix stat() on directories for W32Vicent Marti2011-07-054-28/+26
| | | | | | | | | | | | | | | | 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.
* | fileops: Drop `git_fileops_prettify_path`Vicent Marti2011-07-058-125/+154
| | | | | | | | | | | | | | | | | | | | 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.
* | fileops: CleanupVicent Marti2011-07-0527-928/+997
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | build: Move OS-specific compat to their own foldersVicent Marti2011-07-034-2/+2
| |
* | cleanup: remove trailing spacesKirill A. Shutemov2011-07-0119-91/+91
| | | | | | | | Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
* | build: Simplify build structureVicent Marti2011-07-014-4/+5
| | | | | | | | This will make libgit2 more suitable for embedding.
* | common: Force 64 bit fileops at compile timeVicent Marti2011-06-301-4/+0
| |
* | refs: Remove bogus assertionVicent Marti2011-06-301-4/+2
| | | | | | | | | | | | 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.
* | filebuf: fix endless loop on writing buf > WRITE_BUFFER_SIZEKirill A. Shutemov2011-06-301-0/+1
| | | | | | | | Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
* | Hide ".git" directory on Windows upon creation of a non bare repositorynulltoken2011-06-293-0/+22
| | | | | | | | Directory which name starts with a dot are hidden on Linux platforms. This patch makes libgit2 behaves similarly on Windows.
* | config: `foreach` now returns variable values tooVicent Marti2011-06-292-3/+3
| |
* | refs: Remove duplicate rename methodVicent Marti2011-06-291-142/+132
| | | | | | | | `git_reference_rename` now takes a `force` flag
* | sig: allow empty namesCarlos Martín Nieto2011-06-281-2/+0
| | | | | | | | Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* | repo: Fix git_repository_is_emptyVicent Marti2011-06-281-3/+7
| |
* | test: Properly show error messagesVicent Marti2011-06-282-4/+10
| |
* | repo: Rename HEAD-related methodsVicent Marti2011-06-281-2/+2
| |
* | commit: Allow spaces inside email addressesVicent Marti2011-06-281-1/+1
| | | | | | | | | | | | | | | | 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.
* | Merge pull request #279 from carlosmn/detached-orphanVicent Martí2011-06-281-0/+41
|\ \ | | | | | | Add detached and orphan convenience functions
| * | Add git_repository_is_detached, git_repository_is_orphanCarlos Martín Nieto2011-06-281-0/+41
| |/ | | | | | | Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
* | refs: Remove unused declarationsVicent Marti2011-06-281-2/+0
| |
* | Merge pull request #277 from schu/sign-compareVicent Martí2011-06-281-16/+5
|\ \ | | | | | | Fix warning: signed and unsigned type in cond expr
| * | git_blob_create_fromfile: remove old codeschu2011-06-271-16/+5
| |/ | | | | | | | | | | | | 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>
* | Remove redundant methods from the APIVicent Marti2011-06-285-334/+204
|/ | | | | | | | | | | | | | | 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.
* revwalk: Do not set error string on revwalk overVicent Marti2011-06-241-4/+7
|
* refs: Do not overflow when normalizing refnamesVicent Marti2011-06-233-25/+31
|
* Merge pull request #269 from schu/infinite-appendVicent Martí2011-06-211-4/+2
|\ | | | | gitfo_read: fix read-loop
| * gitfo_read: fix read-loopschu2011-06-201-4/+2
| | | | | | | | Signed-off-by: schu <schu-github@schulog.org>
* | Stat files with full pathnamesCarlos Martín Nieto2011-06-201-4/+8
| | | | | | | | | | | | | | | | 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>
* | Allocate enough memory for the terminator in commit parsingCarlos Martín Nieto2011-06-201-1/+2
|/ | | | | | | | | 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>
* odb: Add GIT_EPASSTHROUGHVicent Marti2011-06-191-17/+25
| | | | | Allows a custom user backend to passthrough one of the callbacks. Used for e.g. caching backends.
* mingw: Fix compilationVicent Marti2011-06-182-1/+6
|
* config: Fix sorting of repository config filesVicent Marti2011-06-181-2/+2
|
* config: Bring back `git_config_open_global`Vicent Marti2011-06-181-0/+33
| | | | Scott commands, I obey.
* config: Fix compilation in MSVCVicent Marti2011-06-181-5/+5
|
* config: TyporrrrlVicent Marti2011-06-181-1/+5
|
* Merge pull request #267 from Jopie64/developmentVicent Martí2011-06-171-1/+1
|\ | | | | Fix compilation error in MSVC when compiling for c++
| * Fix compilation error in MSVC when compiling for c++Johan 't Hart2011-06-171-1/+1
| |
* | config: Cleanup external APIVicent Marti2011-06-182-75/+61
| | | | | | | | | | Do not mess with environment variables anymore. The new external API has more helper methods, and everything is explicit.
* | Add fall-back support to the configurationCarlos Martín Nieto2011-06-171-3/+9
| | | | | | | | | | | | | | 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>
* | Parse the repo's configuration when we load itCarlos Martín Nieto2011-06-171-0/+6
| | | | | | | | | | | | | | 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>
* | Add git_repository_config APICarlos Martín Nieto2011-06-172-1/+38
| | | | | | | | | | | | | | 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>
* | Remove double-spaceCarlos Martín Nieto2011-06-171-1/+1
|/ | | | | | Noticed by txdv Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
* config: Fix unitialized variable warningVicent Marti2011-06-171-4/+3
|
* Merge pull request #266 from carlosmn/valgrindVicent Martí2011-06-171-1/+11
|\ | | | | Plug memory leaks
| * Plug two leaks in config writingCarlos Martín Nieto2011-06-161-1/+11
| | | | | | | | Signed-off-by: Carlos Martín Nieto <cmn@elego.de>