summaryrefslogtreecommitdiff
path: root/src/reset.c
Commit message (Collapse)AuthorAgeFilesLines
* diff/status: introduce conflictsEdward Thomson2015-05-281-0/+1
| | | | | | | | | | | When diffing against an index, return a new `GIT_DELTA_CONFLICTED` delta type for items that are conflicted. For a single file path, only one delta will be produced (despite the fact that there are multiple entries in the index). Index iterators now have the (optional) ability to return conflicts in the index. Prior to this change, they would be omitted, and callers (like diff) would omit conflicted index entries entirely.
* reset: `git_checkout_options` is `const`Edward Thomson2015-04-201-3/+3
|
* Add annotated commit versions of reflog-modifying functionsCarlos Martín Nieto2015-03-161-2/+22
| | | | | | | We do not always want to put the id directly into the reflog, but we want to speicfy what a user typed. For this use-case we provide annotated version of a few functions which let the caller specify what user-friendly name was used when asking for the operation.
* Removed unnecessary GIT_CHECKOUT_SKIP_UNMERGED for GIT_RESET_HARDPierre-Olivier Latour2015-03-081-1/+1
|
* reset: remove reflog message overrideCarlos Martín Nieto2015-03-031-8/+5
| | | | | This function is meant to simulate what git does in the reset command, so we should include the reflog message in that.
* Remove the signature from ref-modifying functionsCarlos Martín Nieto2015-03-031-2/+1
| | | | | | | | | | The signature for the reflog is not something which changes dynamically. Almost all uses will be NULL, since we want for the repository's default identity to be used, making it noise. In order to allow for changing the identity, we instead provide git_repository_set_ident() and git_repository_ident() which allow a user to override the choice of signature.
* git_reset: const the git_signature argEdward Thomson2014-10-261-1/+1
|
* Allow to propagate checkout callbacks to git HARD resetSven Strickroth2014-08-031-0/+4
| | | | Signed-off-by: Sven Strickroth <email@cs-ware.de>
* Fix reset for staged deletesRussell Belfer2014-04-211-3/+8
|
* Merge pull request #2028 from libgit2/options-namesVicent Marti2014-03-071-1/+1
|\ | | | | Rename options structures
| * git_checkout_opts -> git_checkout_optionsBen Straub2014-03-061-1/+1
| |
* | Plug a few leaks in the testsCarlos Martín Nieto2014-03-071-0/+1
|/
* Add reflog parameters to git_resetBen Straub2014-02-031-2/+10
|
* diff: rename the file's 'oid' to 'id'Carlos Martín Nieto2014-01-251-1/+1
| | | | In the same vein as the previous commits in this series.
* index: rename an entry's id to 'id'Carlos Martín Nieto2014-01-251-1/+1
| | | | This was not converted when we converted the rest, so do it now.
* refs: remove the _with_log differentiationCarlos Martín Nieto2014-01-151-1/+1
| | | | | | Any well-behaved program should write a descriptive message to the reflog whenever it updates a reference. Let's make this more prominent by removing the version without the reflog parameters.
* clean up state metadata more consistentlyEdward Thomson2013-12-021-1/+1
|
* Merge pull request #1897 from libgit2/split-patch-from-diffVicent Martí2013-10-221-5/+6
|\ | | | | RFC: Proposed reworking of diff APIs
| * Diff API cleanupRussell Belfer2013-10-151-3/+4
| | | | | | | | | | | | | | | | 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-2/+2
| | | | | | | | | | | | 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.
* | checkout (from index) can write conflictsEdward Thomson2013-10-161-1/+1
|/
* Fix trailing whitespacesnulltoken2013-05-151-1/+1
|
* immutable references and a pluggable ref databaseEdward Thomson2013-03-071-40/+3
|
* reset: Introduce git_reset_default()nulltoken2013-02-051-0/+74
|
* update copyrightsEdward Thomson2013-01-081-1/+1
|
* reset: Fix a memory leaknulltoken2013-01-061-2/+1
|
* Reorder operations in git resetRussell Belfer2013-01-041-39/+30
| | | | | | | | | | | | | | | | This corrects the order of operations in git reset so that the checkout to reset the working directory content is done before the HEAD is moved. This allows us to use the HEAD and the index content to know what files can / should safely be reset. Unfortunately, there are still some cases where the behavior of this revision differs from core git. Notable, a file which has been added to the index but is not present in the HEAD is considered to be tracked by core git (and thus removable by a reset command) whereas since this loads the target state into the index prior to resetting, it will consider such a file to be untracked and won't touch it. That is a larger fix that I'll defer to a future commit.
* reset: Cannot soft reset with a conflicted indexnulltoken2013-01-041-42/+24
|
* expose merge metadata cleanupEdward Thomson2013-01-031-1/+1
|
* Deploy GIT_CHECKOUT_OPTS_INITBen Straub2012-11-301-2/+1
|
* Updates to reset.hRussell Belfer2012-11-271-1/+1
|
* Rename ref and reflog apis for consistencyBen Straub2012-11-271-3/+3
|
* Add explicit git_index ptr to diff and checkoutRussell Belfer2012-11-141-1/+1
| | | | | | | | 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.
* Rework checkout with new strategy optionsRussell Belfer2012-11-091-4/+1
| | | | | | | | | | | | | | | | | | 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.
* Merge pull request #990 from ben/clone-callbacksVicent Martí2012-10-251-2/+2
|\ | | | | Progress callbacks
| * index: remove read_tree() progress indicatornulltoken2012-10-191-1/+1
| | | | | | | | | | | | | | | | git_index_read_tree() was exposing a parameter to provide the user with a progress indicator. Unfortunately, due to the recursive nature of the tree walk, the maximum number of items to process was unknown. Thus, the indicator was only counting processed entries, without providing any information how the number of remaining items.
| * Convert checkout_index to use progress callbackBen Straub2012-10-191-1/+1
| |
* | GIT_EUNMERGEDEdward Thomson2012-10-241-0/+1
| |
* | reset changes for mergeEdward Thomson2012-10-241-0/+12
| |
* | reset: make git_reset() cope with an orphaned HEADnulltoken2012-10-221-6/+40
|/
* reset: prevent hard reset in a bare repositorynulltoken2012-10-151-3/+5
|
* reset: make reset rely on git_repository_head()nulltoken2012-10-071-1/+6
|
* checkout: segregate checkout strategiesnulltoken2012-09-171-1/+8
|
* reset: add support for GIT_RESET_HARD modenulltoken2012-09-171-1/+14
|
* errors: deploy GIT_EBAREREPO usagenulltoken2012-09-061-2/+3
|
* Make git_object_peel a bit smarterRussell Belfer2012-08-271-25/+5
| | | | | | | | | | | This expands the types of peeling that `git_object_peel` knows how to do to include TAG -> BLOB peeling, and makes the errors slightly more consistent depending on the situation. It also adds a new special behavior where peeling to ANY will peel until the object type changes (e.g. chases TAGs to a non-TAG). Using this expanded peeling, this replaces peeling code that was embedded in `git_tag_peel` and `git_reset`.
* Enable stats on git_index_read_tree.Ben Straub2012-07-301-1/+1
| | | | | Replace with the contents of git_index_read_tree_with_stats() and improve documentation comments.
* Add git_reset()nulltoken2012-06-071-0/+103
Currently supports Soft and Mixed modes.