summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* filebuf: Fix printf buffer overflowsVicent Marti2011-06-061-1/+6
| | | | | | | The filebuf was not being properly written after a flush. This should cut it now. Fixes #228
* refs: Improve error messagesVicent Marti2011-06-061-2/+7
|
* repository: Export all internal pathsVicent Marti2011-06-041-7/+17
|
* Merge pull request #227 from Romain-Geissler/discovery-path-v2Vicent Martí2011-06-035-49/+350
|\ | | | | Discovery path v2
| * Repository: Added the git_repository_discover function that finds by itself ↵Romain Geissler2011-06-041-5/+129
| | | | | | | | the git directory that manage a given directory path.
| * Repository: Splitted the repository destructor into a helper part (only free ↵Romain Geissler2011-06-041-5/+13
| | | | | | | | directories path) and the complete public destructor.
| * Repository: Added read_gitfile that allows you to read a .git file and ↵Romain Geissler2011-06-041-0/+39
| | | | | | | | extract the git directory path.
| * Repository: Added some util functions that we'll need to discover repository ↵Romain Geissler2011-06-043-3/+80
| | | | | | | | | | | | | | | | path. retrieve_device returns the file device for a given path (so that we can detect device change while walking through parent directories). abspath returns a canonicalized path, symbolic link free. retrieive_ceiling_directories_offset returns the biggest path offset that path match in the ceiling directory list (so that we can stop at ceiling directories).
| * Filebuf: Fixed a TODO in filebuf (real lock in lock_file)Romain Geissler2011-06-033-4/+18
| | | | | | | | Added gitfo_creat_locked and gitfo_creat_locked_force
| * Fileops: Added gitfo_isfile.Romain Geissler2011-06-032-1/+21
| | | | | | | | | | | | Conflicts: src/fileops.c
| * Fileops: Added a fourth argument to the path prettifying functions to use an ↵unknown2011-06-033-15/+25
| | | | | | | | | | | | alternate basepath. Fixed a Windows TO-DO in the prettifying functions.
| * Sha1Lookup: Fixed two MSVC compilation warnings.unknown2011-06-032-5/+5
| |
| * Fileops:retrieve_path_root_offset is now named ↵Romain Geissler2011-06-032-16/+25
| | | | | | | | gitfo_retrieve_path_root_offset (like other public functions). Added platform specific directory separator definition.
* | index: Add `git_index_entry_stage` methodVicent Marti2011-06-031-0/+5
| | | | | | | | As suggested by Romain-Geissler
* | odb: Fix loading ODB alternatesVicent Marti2011-06-033-22/+35
|/ | | | | Fixed an issue with the `strtokz implementation and added support for comments and relative paths in the alternates file.
* Merge pull request #144 from nordsturm/fix_fakewstreamVicent Martí2011-06-022-2/+5
|\ | | | | Fix fake wstream write
| * Add error processing in git_blob_create_frombuffer()Sergey Nikishin2011-04-241-1/+4
| |
| * Fix whole buffer writing in fake wstreamSergey Nikishin2011-04-241-1/+1
| |
* | odb-pack: More variable declarationsVicent Marti2011-06-021-4/+5
| |
* | odb-pack: Do not declare variables mid-functionVicent Marti2011-06-021-2/+2
| |
* | signature: Fix compilationVicent Marti2011-06-011-1/+1
| |
* | short-oid: CleanupVicent Marti2011-06-016-41/+56
| |
* | Implemented read_unique_short_oid method for loose backend.Marc Pegon2011-06-011-2/+115
| |
* | Fixed some error messages related to searching objects from a short oid. ↵Marc Pegon2011-06-012-17/+39
| | | | | | | | Fixed forgot to check that prefix length is greater than minimum prefix length in read_unique_short_oid method from pack backend.
* | Deleted unused method git_cached_object_match, since we do not explore the ↵Marc Pegon2011-06-011-5/+0
| | | | | | | | cache when searching objects from a short oid.
* | Changed return value of git_oid_match to be consistent with the other ↵Marc Pegon2011-06-012-4/+19
| | | | | | | | compare methods (0 means oids match). Added method to compare prefixes of hex formatted oids.
* | Added a GIT_OID_MINPREFIXLEN constant to define the minimum length allowed ↵Marc Pegon2011-06-012-2/+6
| | | | | | | | for oid prefixes (set to 4, like in git). Consequently updated some object lookup methods and their documentation.
* | Added git.git sha1 lookup method to replace simple binary search in pack ↵Marc Pegon2011-06-015-60/+455
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | backend. Implemented find_unique_short_oid for pack backend, based on git sha1 lookup method; finding an object given its full oid is just a particular case of searching the unique object matching an oid prefix (short oid). Added git_odb_read_unique_short_oid, which iterates over all the backends to find and read the unique object matching the given oid prefix. Added a git_object_lookup_short_oid method to find the unique object in the repository matching a given oid prefix : it generalizes git_object_lookup which now does nothing but calls git_object_lookup_short_oid.
* | Added error for ambiguous oid prefixes. Added methods to compare the first ↵Marc Pegon2011-06-014-0/+33
| | | | | | | | nth hexadecimal characters (i.e. packets of 4 bits) of OIDs.
* | Added a read_unique_short_oid method to backends, to make it possible to ↵Marc Pegon2011-06-014-0/+62
| | | | | | | | find objects from sha1 prefixes in the future. Default implementations throw GIT_ENOTIMPLEMENTED for strict prefixes (i.e. length < GIT_OID_HEXSZ).
* | Merge pull request #224 from glesserd/tagparsingVicent Martí2011-06-012-6/+23
|\ \ | | | | | | Fix tag and signature parsing
| * | Fix tag and signature parsingDavid Glesser2011-05-312-6/+23
| | | | | | | | | | | | | | | | | | Before this commit, malformed tag and signature were considered as valid by the parser. See the test t3800-mktag.sh of git to see example of malformed tag and signature.
* | | Merge pull request #215 from schu/typosVicent Martí2011-06-011-1/+1
|\ \ \ | | | | | | | | Fix typos
| * | | gitfo_isdir: fix error messageschu2011-05-291-1/+1
| |/ / | | | | | | | | | Signed-off-by: schu <schu-github@schulog.org>
* | | Merge pull request #223 from carlosmn/valgrindVicent Martí2011-06-011-0/+9
|\ \ \ | | | | | | | | Plug a leak in the index unmerged entries vector
| * | | Plug a leak in the index unmerged entries vectorCarlos Martín Nieto2011-05-311-0/+9
| | | | | | | | | | | | | | | | Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
* | | | Merge pull request #222 from carlosmn/config-bugfixVicent Martí2011-06-011-36/+22
|\ \ \ \ | | | | | | | | | | Config bugfix
| * | | | Don't try to parse an empty config fileCarlos Martín Nieto2011-05-311-0/+4
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
| * | | | Config parse header ext: don't allow text after closing quoteCarlos Martín Nieto2011-05-311-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Nothing is allowed betwen the closing quotation mark and the ] so return an error if there is. Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
| * | | | Parse section header ext: don't leak on errorCarlos Martín Nieto2011-05-311-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also free the subsection if we find too many quotes Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
| * | | | Guard against double-freeing the current sectionCarlos Martín Nieto2011-05-311-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If parse_section_header{,_ext} return an error, current_section doesn't get allocated. Set it to NULL after freeing so we don't try to free it again. This fixes part 2-2 of Issue #210. Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
| * | | | cfg_readline: really ignore empty linesCarlos Martín Nieto2011-05-311-31/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Simplify cfg_readline and at the same time fix it so that it does really ignore empty lines. This fixes point 2-1 of Issue #210 Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
| * | | | Config file open: don't free memory that doesn't belong to usCarlos Martín Nieto2011-05-311-1/+0
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On error, it would free the configuration object even though it didn't own that memory, which would cause a double-free. This fixes the first part of Issue #210 Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
* | | | Merge pull request #206 from nulltoken/topic/is-bareVicent Martí2011-06-011-0/+6
|\ \ \ \ | | | | | | | | | | Add git_repository_is_bare() accessor
| * | | | Add git_repository_is_bare() accessornulltoken2011-05-241-0/+6
| |/ / /
* | | | index: Cleanup tree parsingVicent Marti2011-06-011-23/+25
| | | |
* | | | index: correctly parse invalidated TREE extensionsCarlos Martín Nieto2011-06-011-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A TREE extension with an entry count of -1 means that it was invalidated and we should ignore it. Do so instead of returning an error. This fixes issue #202 Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
* | | | Allow read_tree_internal to return an error codeCarlos Martín Nieto2011-06-011-28/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are two reasons why read_tree_internal might return a NULL tree. The first one is a corrupt index, but the second one is an invalidated TREE extension. Up to now, its only way to communicate with its caller was through the return value being NULL or not. Allow read_tree_internal to report its exit status independently from the tree pointer. Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
* | | | index: Change the memory management for repo indexesVicent Marti2011-06-013-27/+9
|/ / / | | | | | | | | | | | | The `git_repository_index` call now returns a brand new index that must be manually free'd.
* | | Fix compilation warnings in MSVCnulltoken2011-05-242-3/+3
|/ / | | | | | | This allows to successfully build libgit2 with waf on Windows.