summaryrefslogtreecommitdiff
path: root/src/reflog.c
Commit message (Collapse)AuthorAgeFilesLines
* Align git_signature_dup.Arthur Schreiber2014-01-141-1/+1
| | | | | | This changes git_signature_dup to actually honor oom conditions raised by the call to git__strdup. It also aligns it with the error code return pattern used everywhere else.
* reflog: remove git_reflog_append_to()Carlos Martín Nieto2013-11-231-19/+0
| | | | | | This was a convenience method for the refs front-end to do the reflog writing. This is now done in the backend and it has no more reason for being.
* reflog: bring _append and _drop back to the frontendCarlos Martín Nieto2013-10-021-14/+86
| | | | These functions act purely on the reflog data structure.
* reflog: add a convenience append functionCarlos Martín Nieto2013-10-021-0/+19
| | | | | Provide a function that reads a reflog, performs an append and writes back to the backend in one call.
* reflog: move the reflog implementation into refdb_fsCarlos Martín Nieto2013-10-021-400/+37
| | | | | | | | | | References and their logs are logically coupled, let's make it so in the code by moving the fs-based reflog implementation to live next to the fs-based refs one. As part of the change, make the function take names rather than references, as only the names are relevant when looking up and handling reflogs.
* errors: Fix format of some error messagesnulltoken2013-09-111-1/+1
|
* Error messages for a couple other boundary conditionsRussell Belfer2013-05-011-1/+3
|
* Several warnings detected by static code analyzer fixedArkadiy Shapkin2013-03-181-1/+1
| | | | | | | Implicit type conversion argument of function to size_t type Suspicious sequence of types castings: size_t -> int -> size_t Consider reviewing the expression of the 'A = B == C' kind. The expression is calculated as following: 'A = (B == C)' Unsigned type is never < 0
* update copyrightsEdward Thomson2013-01-081-1/+1
|
* reflog: Actual error handlingVicent Marti2012-12-191-5/+13
|
* reflog: Rename error handlingVicent Marti2012-12-191-14/+15
|
* Make goto cleanup more consistentRick Bradley2012-12-181-3/+3
| | | | | There may be some question about whether this is likely to be needed at all, but that's above my head at the moment.
* don't deref before we've assertedRick Bradley2012-12-181-2/+2
| | | | just sayin'.
* reflog: Deploy EINVALIDSPEC usagenulltoken2012-12-011-3/+12
|
* Fix warnings on Win64 buildRussell Belfer2012-11-271-10/+13
|
* Rename ref and reflog apis for consistencyBen Straub2012-11-271-9/+9
|
* reflog: make entry_byindex() and drop() git compliantnulltoken2012-11-171-18/+23
| | | | | Passing 0 as the index now retrieves the most recent entry instead of the oldest one.
* Extensions to rmdir and mkdir utilitiesRussell Belfer2012-11-091-1/+1
| | | | | | | | | | | * 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
* stash: add git_stash_drop()nulltoken2012-10-261-1/+1
|
* reflog: fix bogus removal of reflog entriesnulltoken2012-10-261-6/+6
|
* reflog: create reflog and its directory structurenulltoken2012-10-261-1/+4
|
* reflog: Make git_reflog_free() accept null paramnulltoken2012-10-261-0/+3
|
* Add complex checkout test and then fix checkoutRussell Belfer2012-10-091-1/+1
| | | | | | | | | | | | | | | | 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.
* Merge remote-tracking branch 'nulltoken/topic/amd64-compat' into developmentVicent Marti2012-08-021-2/+2
|\ | | | | | | | | | | | | Conflicts: src/netops.c src/netops.h src/oid.c
| * portability: Improve x86/amd64 compatibilitynulltoken2012-07-241-2/+2
| |
* | Fix -Wuninitialized warningMichael Schubert2012-07-281-1/+1
| |
* | branch: Add `repository` argument to `create`Vicent Marti2012-07-271-1/+1
| | | | | | | | | | Yes, we can get the repository from the owner of the object, but having it marked explicitly makes the API more consistent.
* | reflog: Rename `entry_drop` to `drop`Vicent Marti2012-07-271-1/+1
| |
* | reflog: keep the reflog name in sync with the reference namenulltoken2012-07-251-0/+22
| |
* | reflog: prevent git_reflog_append() from persisting the reflog back to disknulltoken2012-07-251-81/+59
| |
* | reflog: prevent git_reflog_read() from chocking when no log exists yetnulltoken2012-07-251-9/+16
| |
* | reflog: introduce git_reflog_write()nulltoken2012-07-251-57/+113
| |
* | reflog: rename git_reflog_write() to git_reflog_append()nulltoken2012-07-251-1/+1
| |
* | reflog: introduce git_reflog_entry_drop()nulltoken2012-07-251-4/+58
| |
* | reflog: add GIT_OID_HEX_ZERO constantnulltoken2012-07-251-1/+1
|/
* refs: fix moving of the reflog when renaming a refnulltoken2012-07-071-8/+40
|
* Merge branch 'new-error-handling' into developmentVicent Martí2012-05-021-92/+85
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .travis.yml include/git2/diff.h src/config_file.c src/diff.c src/diff_output.c src/mwindow.c src/path.c tests-clar/clar_helpers.c tests-clar/object/tree/frompath.c tests/t00-core.c tests/t03-objwrite.c tests/t08-tag.c tests/t10-refs.c tests/t12-repo.c tests/t18-status.c tests/test_helpers.c tests/test_main.c
| * Convert reflog to new errorsRussell Belfer2012-03-201-89/+82
| | | | | | | | Cleaned up some other issues.
| * error-handling: RepositoryVicent Martí2012-03-071-2/+2
| | | | | | | | | | | | | | | | This also includes droping `git_buf_lasterror` because it makes no sense in the new system. Note that in most of the places were it has been dropped, the code needs cleanup. I.e. GIT_ENOMEM is going away, so instead it should return a generic `-1` and obviously not throw anything.
| * error-handling: ReferencesVicent Martí2012-03-061-3/+3
| | | | | | | | | | Yes, this is error handling solely for `refs.c`, but some of the abstractions leak all ofer the code base.
* | Rename git_oid_to_string to git_oid_tostrAuthmillenon2012-03-061-2/+2
|/ | | | | To conform the naming scheme of git_oid_fromstr we should change the name of git_oid_to_string to git_oid_tostr.
* buffer: Unify `git_fbuffer` and `git_buf`Vicent Martí2012-02-271-3/+3
| | | | | | | | | | | | | | This makes so much sense that I can't believe it hasn't been done before. Kill the old `git_fbuffer` and read files straight into `git_buf` objects. Also: In order to fully support 4GB files in 32-bit systems, the `git_buf` implementation has been changed from using `ssize_t` for storage and storing negative values on allocation failure, to using `size_t` and changing the buffer pointer to a magical pointer on allocation failure. Hopefully this won't break anything.
* Update Copyright headerschu2012-02-131-1/+1
| | | | Signed-off-by: schu <schu-github@schulog.org>
* Move path related functions from fileops to pathRussell Belfer2012-01-171-3/+3
| | | | | | | | | | | This takes all of the functions that look up simple data about paths (such as `git_futils_isdir`) and moves them over to path.h (becoming `git_path_isdir`). This leaves fileops.h just with functions that actually manipulate the filesystem or look at the file contents in some way. As part of this, the dir.h header which is really just for win32 support was moved into win32 (with some minor changes).
* reflog_write: don't access free()'d memoryJeff King2012-01-051-2/+2
| | | | | | We get the oid of a reference, free the reference, then convert the oid to a string. We need to convert the oid before freeing the memory.
* Use git_buf for path storage instead of stack-based buffersRussell Belfer2011-12-071-45/+74
| | | | | | | | | | | | | | | | | | | | This converts virtually all of the places that allocate GIT_PATH_MAX buffers on the stack for manipulating paths to use git_buf objects instead. The patch is pretty careful not to touch the public API for libgit2, so there are a few places that still use GIT_PATH_MAX. This extends and changes some details of the git_buf implementation to add a couple of extra functions and to make error handling easier. This includes serious alterations to all the path.c functions, and several of the fileops.c ones, too. Also, there are a number of new functions that parallel existing ones except that use a git_buf instead of a stack-based buffer (such as git_config_find_global_r that exists alongsize git_config_find_global). This also modifies the win32 version of p_realpath to allocate whatever buffer size is needed to accommodate the realpath instead of hardcoding a GIT_PATH_MAX limit, but that change needs to be tested still.
* Merge pull request #491 from schu/refs-cleanupVicent Martí2011-11-251-0/+26
|\ | | | | reference_rename() cleanup
| * Add git_reflog_rename() and git_reflog_delete()schu2011-11-211-0/+26
| | | | | | | | Signed-off-by: schu <schu-github@schulog.org>
* | filebuf: add GIT_FILEBUF_INIT and protect multiple opens and cleanupsRussell Belfer2011-11-221-1/+1
|/ | | | | | | | Update all stack allocations of git_filebuf to use GIT_FILEBUF_INIT and make git_filebuf_open and git_filebuf_cleanup safe to be called multiple times on the same buffer. Signed-off-by: Vicent Marti <tanoku@gmail.com>
* reflog: Do not free references before timenew-referencesVicent Marti2011-11-061-10/+20
|