summaryrefslogtreecommitdiff
path: root/src/refs.c
Commit message (Collapse)AuthorAgeFilesLines
...
* Improve comment textRick Bradley2012-12-181-1/+1
| | | | | This looked wrong to me. I *think* this is more appropriate commentary.
* refs: Deploy EINVALIDSPEC usagenulltoken2012-12-011-15/+18
|
* refs: Fix error clearingnulltoken2012-12-011-1/+5
|
* API updates for tag.hRussell Belfer2012-11-271-1/+1
|
* Update callback fn ptr for git_reference_foreachRussell Belfer2012-11-271-1/+1
| | | | As part of API review, use a typedef for the callback fn ptr.
* Rename ref and reflog apis for consistencyBen Straub2012-11-271-23/+23
|
* Extensions to rmdir and mkdir utilitiesRussell Belfer2012-11-091-8/+5
| | | | | | | | | | | * Rework GIT_DIRREMOVAL values to GIT_RMDIR flags, allowing combinations of flags * Add GIT_RMDIR_EMPTY_PARENTS flag to remove parent dirs that are left empty after removal * Add GIT_MKDIR_VERIFY_DIR to give an error if item is a file, not a dir (previously an EEXISTS error was ignored, even for files) and enable this flag for git_futils_mkpath2file call * Improve accuracy of error messages from git_futils_mkdir
* Improve docs, examples, warningsRussell Belfer2012-11-011-2/+2
| | | | | | This improves docs in some of the public header files, cleans up and improves some of the example code, and fixes a couple of pedantic warnings in places.
* Add git_config_refresh() API to reload configRussell Belfer2012-10-301-1/+2
| | | | | | | | | | | | | | | | | | | | This adds a new API that allows users to reload the config if the file has changed on disk. A new config callback function to refresh the config was added. The modified time and file size are used to test if the file needs to be reloaded (and are now stored in the disk backend object). In writing tests, just using mtime was a problem / race, so I wanted to check file size as well. To support that, I extended `git_futils_readbuffer_updated` to optionally check file size in addition to mtime, and I added a new function `git_filebuf_stats` to fetch the mtime and size for an open filebuf (so that the config could be easily refreshed after a write). Lastly, I moved some similar file checking code for attributes into filebuf. It is still only being used for attrs, but it seems potentially reusable, so I thought I'd move it over.
* Merge pull request #968 from arrbee/diff-support-typechangeRussell Belfer2012-10-171-6/+7
|\ | | | | Support TYPECHANGE records in status and adjust checkout accordingly
| * Add complex checkout test and then fix checkoutRussell Belfer2012-10-091-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This started as a complex new test for checkout going through the "typechanges" test repository, but that revealed numerous issues with checkout, including: * complete failure with submodules * failure to create blobs with exec bits * problems when replacing a tree with a blob because the tree "example/" sorts after the blob "example" so the delete was being processed after the single file blob was created This fixes most of those problems and includes a number of other minor changes that made it easier to do that, including improving the TYPECHANGE support in diff/status, etc.
* | Fix leak in the testsCarlos Martín Nieto2012-10-151-2/+1
| | | | | | | | | | Also introduce the slective ref trimming promised but also missed in the previous commit.
* | refs: loosen the OID parsingCarlos Martín Nieto2012-10-151-3/+18
| | | | | | | | | | | | | | | | | | | | | | | | We used to require loose references to contain only an OID (possibly after trimming the string). This is however not enough for letting us lookup FETCH_HEAD, which can have a lot of content after the initial OID. Change the parsing rules so that a loose refernce must e at least 40 bytes long and the 41st (if it's there) must be accepted by isspace(3). This makes the trim unnecessary, so only do it for symrefs. This fixes #977.
* | refs: propagate EEXISTS upon renamingnulltoken2012-10-111-2/+2
|/
* branch: deploy git_branch_is_head()nulltoken2012-10-081-7/+2
|
* refs: deploy git_repository_set_head() usagenulltoken2012-10-071-17/+13
|
* refs: use constants for well-known namesnulltoken2012-10-071-1/+1
|
* Merge pull request #961 from arrbee/win64-cleanupsVicent Martí2012-10-011-6/+6
|\ | | | | Win64 cleanups
| * Fix up more Win64 compile warningsRussell Belfer2012-10-011-6/+6
| |
* | refs: propagate EEXISTSCarlos Martín Nieto2012-09-301-4/+6
|/ | | | | | Indicate whether the error comes from the ref already existing or elsewhere. We always perform the check and this lets the user write more concise code.
* refspec: introduce git_refspec__parse()nulltoken2012-09-251-3/+10
|
* refs: introduce git_reference_is_valid_name()nulltoken2012-09-251-36/+59
|
* refs: make git_reference_normalize_name() accept refspec patternnulltoken2012-09-251-72/+114
|
* refs: prevent locked refs from being enumeratednulltoken2012-09-141-0/+4
| | | | Fix #936
* refs: introduce git_reference_peel()nulltoken2012-09-061-0/+47
| | | | Fix #530
* Diff iteratorsRussell Belfer2012-09-051-1/+0
| | | | | | | | | | | This refactors the diff output code so that an iterator object can be used to traverse and generate the diffs, instead of just the `foreach()` style with callbacks. The code has been rearranged so that the two styles can still share most functions. This also replaces `GIT_REVWALKOVER` with `GIT_ITEROVER` and uses that as a common error code for marking the end of iteration when using a iterator style of object.
* Fix parentheses warningMichael Schubert2012-08-281-1/+2
|
* Merge branch 'branch-delete-ref' into developmentVicent Marti2012-08-271-1/+6
|\ | | | | | | | | Conflicts: include/git2/refs.h
| * branch: Change `git_branch_delete` to take a refbranch-delete-refVicent Marti2012-08-261-1/+6
| |
* | refs: expose git_reference_normalize_name()nulltoken2012-08-271-38/+70
|/
* oid: Explicitly include `oid.h` for the inlined CMPVicent Marti2012-08-091-0/+1
|
* trim whitespace when parsing loose refsRussell Belfer2012-08-091-36/+13
|
* Merge remote-tracking branch 'arrbee/tree-walk-fixes' into developmentVicent Marti2012-08-061-7/+15
|\ | | | | | | | | | | | | | | | | Conflicts: src/notes.c src/transports/git.c src/transports/http.c src/transports/local.c tests-clar/odb/foreach.c
| * Update iterators for consistency across libraryRussell Belfer2012-08-031-7/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This updates all the `foreach()` type functions across the library that take callbacks from the user to have a consistent behavior. The rules are: * A callback terminates the loop by returning any non-zero value * Once the callback returns non-zero, it will not be called again (i.e. the loop stops all iteration regardless of state) * If the callback returns non-zero, the parent fn returns GIT_EUSER * Although the parent returns GIT_EUSER, no error will be set in the library and `giterr_last()` will return NULL if called. This commit makes those changes across the library and adds tests for most of the iteration APIs to make sure that they follow the above rules.
* | refs: drop git_reference_remote_tracking_from_branch()nulltoken2012-07-241-74/+0
| |
* | branch: introduce git_reference_is_branch()nulltoken2012-07-241-0/+7
|/
* refs: fix a memory leaknulltoken2012-07-121-0/+3
|
* refs: introduce git_reference_remote_tracking_from_branch()nulltoken2012-07-121-0/+74
|
* refs: remove seemingly useless giterr_clear() callnulltoken2012-07-071-2/+0
|
* refs: deploy git_reference_has_log()nulltoken2012-07-071-9/+3
|
* refs: add git_reference_has_log()nulltoken2012-07-071-0/+17
|
* refs: fix moving of the reflog when renaming a refnulltoken2012-07-071-0/+1
|
* references: introduce git_reference_foreach_glob()nulltoken2012-06-221-0/+37
|
* Add git_reset()nulltoken2012-06-071-0/+59
| | | | Currently supports Soft and Mixed modes.
* errors: Rename error codesbreaking-changesVicent Martí2012-05-181-4/+4
|
* errors: Rename the generic return codesVicent Martí2012-05-181-4/+4
|
* Properly tag all `enums` with a `_t`Vicent Martí2012-05-181-3/+3
|
* refs: git_reference_listall -> git_reference_listVicent Martí2012-05-181-1/+1
|
* buf: deploy git_buf_len()nulltoken2012-04-301-2/+2
|
* refs: fix unused-but-set warningMichael Schubert2012-04-271-0/+1
|