summaryrefslogtreecommitdiff
path: root/src/stash.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #1802 from libgit2/cmn/reflog-backendBen Straub2013-10-281-5/+6
|\ | | | | Make reflog part of refdb
| * reflog: move the reflog implementation into refdb_fsCarlos Martín Nieto2013-10-021-5/+6
| | | | | | | | | | | | | | | | | | | | 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.
* | Diff API cleanupRussell Belfer2013-10-151-79/+54
| | | | | | | | | | | | | | | | This lays groundwork for separating formatting options from diff creation options. This groups the formatting flags separately from the diff list creation flags and reorders the options. This also tweaks some APIs to further separate code that uses patches from code that just looks at git_diffs.
* | Rename diff objects and split patch.hRussell Belfer2013-10-111-5/+5
|/ | | | | | This makes no functional change to diff but renames a couple of the objects and splits the new git_patch (formerly git_diff_patch) into a new header file.
* Never consider submodules for stashingJustin Spahr-Summers2013-09-271-2/+6
|
* No such thing as an orphan branchCarlos Martín Nieto2013-09-171-1/+1
| | | | | | | | | | | Unfortunately git-core uses the term "unborn branch" and "orphan branch" interchangeably. However, "orphan" is only really there for the checkout command, which has the `--orphan` option so it doesn't actually create the branch. Branches never have parents, so the distinction of a branch with no parents is odd to begin with. Crucially, the error messages deal with unborn branches, so let's use that.
* Make the git_signature const in the stash API.Etienne Samson2013-07-091-5/+5
|
* Reorganize diff and add basic diff driverRussell Belfer2013-06-101-0/+1
| | | | | | | | | | | | | | | | | | This is a significant reorganization of the diff code to break it into a set of more clearly distinct files and to document the new organization. Hopefully this will make the diff code easier to understand and to extend. This adds a new `git_diff_driver` object that looks of diff driver information from the attributes and the config so that things like function content in diff headers can be provided. The full driver spec is not implemented in the commit - this is focused on the reorganization of the code and putting the driver hooks in place. This also removes a few #includes from src/repository.h that were overbroad, but as a result required extra #includes in a variety of places since including src/repository.h no longer results in pulling in the whole world.
* Clear error msg when we eat error silentlyRussell Belfer2013-05-011-2/+4
|
* immutable references and a pluggable ref databaseEdward Thomson2013-03-071-2/+4
|
* stash: Update the reference when dropping the topmost stashnulltoken2013-02-221-0/+6
|
* Vector improvements and their falloutPhilip Kelley2013-01-271-1/+1
|
* add an index_remove_bypath that removes conflicts, renamed add_from_workdir ↵Edward Thomson2013-01-121-1/+1
| | | | to match
* update copyrightsEdward Thomson2013-01-081-1/+1
|
* Fix use of uninitialized variableRussell Belfer2013-01-041-3/+3
|
* Improve error propagation in stashRussell Belfer2013-01-041-109/+107
| | | | | | | | | | | | Stash was sometimes obscuring the actual error code, replacing it with a -1 when there was more descriptive value. This updates stash to preserve the original error code more reliably along with a variety of other error handling tweaks. I believe this is an improvement, but arguably, preserving the underlying error code may result in values that are harder to interpret by the caller who does not understand the internals. Discussion is welcome!
* Rework checkout internals (again)Russell Belfer2013-01-041-2/+1
| | | | | | | | | | | | | | | | I've tried to map out the detailed behaviors of checkout and make sure that we're handling the various cases correctly, along with providing options to allow us to emulate "git checkout" and "git checkout-index" with the various flags. I've thrown away flags in the checkout API that seemed like clutter and added some new ones. Also, I've converted the conflict callback to a general notification callback so we can emulate "git checkout" output and display "dirty" files. As of this commit, the new behavior is not working 100% but some of that is probably baked into tests that are not testing the right thing. This is a decent snapshot point, I think, along the way to getting the update done.
* Fix diff constructor name order confusionRussell Belfer2012-12-171-3/+3
| | | | | | | | | | | | The diff constructor functions had some confusing names, where the "old" side of the diff was coming after the "new" side. This reverses the order in the function name to make it less confusing. Specifically... * git_diff_index_to_tree becomes git_diff_tree_to_index * git_diff_workdir_to_index becomes git_diff_index_to_workdir * git_diff_workdir_to_tree becomes git_diff_tree_to_workdir
* Remove GIT_SIGNATURE_VERSION and friendsBen Straub2012-12-031-2/+0
|
* Deploy GITERR_CHECK_VERSIONBen Straub2012-11-301-2/+1
|
* Deploy GIT_SIGNATURE_INITBen Straub2012-11-301-0/+4
|
* Deploy GIT_STATUS_OPTIONS_INITBen Straub2012-11-301-2/+1
|
* Deploy GIT_DIFF_OPTIONS_INITBen Straub2012-11-301-2/+2
|
* Deploy GIT_CHECKOUT_OPTS_INITBen Straub2012-11-301-3/+1
|
* API updates for stash.hBen Straub2012-11-271-1/+1
|
* Fix warnings on Win64 buildRussell Belfer2012-11-271-1/+1
|
* Update diff callback param orderRussell Belfer2012-11-271-5/+5
| | | | | | | | This makes the diff functions that take callbacks both take the payload parameter after the callback function pointers and pass the payload as the last argument to the callback function instead of the first. This should make them consistent with other callbacks across the API.
* Rename ref and reflog apis for consistencyBen Straub2012-11-271-4/+4
|
* reflog: make entry_byindex() and drop() git compliantnulltoken2012-11-171-2/+2
| | | | | Passing 0 as the index now retrieves the most recent entry instead of the oldest one.
* Add explicit git_index ptr to diff and checkoutRussell Belfer2012-11-141-2/+2
| | | | | | | | A number of diff APIs and the `git_checkout_index` API take a `git_repository` object an operate on the index. This updates them to take a `git_index` pointer explicitly and only fall back on the `git_repository` index if the index input is NULL. This makes it easier to operate on a temporary index.
* Fix diff API to better parameter orderRussell Belfer2012-11-141-3/+4
| | | | | The diff API is not in the parameter order one would expect from other libgit2 APIs. This fixes that.
* Rework checkout with new strategy optionsRussell Belfer2012-11-091-2/+2
| | | | | | | | | | | | | | | | | | This is a major reworking of checkout strategy options. The checkout code is now sensitive to the contents of the HEAD tree and the new options allow you to update the working tree so that it will match the index content only when it previously matched the contents of the HEAD. This allows you to, for example, to distinguish between removing files that are in the HEAD but not in the index, vs just removing all untracked files. Because of various corner cases that arise, etc., this required some additional capabilities in rmdir and other utility functions. This includes the beginnings of an implementation of code to read a partial tree into the index based on a pathspec, but that is not enabled because of the possibility of creating conflicting index entries.
* index: Fix testsVicent Marti2012-11-011-1/+1
|
* index refactoringEdward Thomson2012-10-291-4/+4
|
* stash: add git_stash_drop()nulltoken2012-10-261-0/+40
|
* stash: add git_stash_foreach()nulltoken2012-10-261-0/+42
|
* stash: add git_stash_save()nulltoken2012-10-261-0/+577