summaryrefslogtreecommitdiff
path: root/src/rebase.c
Commit message (Collapse)AuthorAgeFilesLines
* rebase: correctly finish rebasing detached headsethomson/rebase_detachedEdward Thomson2016-04-211-24/+35
| | | | | When rebasing with IDs, we do not return to the `branch`, we remain in a detached HEAD state.
* rebase: handle detached HEADs in `init`Edward Thomson2016-04-211-3/+11
| | | | | | When `init`ing a rebase from a detached HEAD, be sure to remember that we were in a detached HEAD state so that we can correctly `abort` the object that we just created.
* rebase: plug memory leak in `rebase_alloc`Patrick Steinhardt2016-02-231-10/+12
| | | | | | | Convert `rebase_alloc` to use our usual error propagation patterns, that is accept an out-parameter and return an error code that is to be checked by the caller. This allows us to use the GITERR_CHECK_ALLOC macro, which helps static analysis.
* rebase: persist a single in-memory indexEdward Thomson2016-02-151-12/+23
| | | | | | When performing an in-memory rebase, keep a single index for the duration, so that callers have the expected index lifecycle and do not hold on to an index that is free'd out from under them.
* rebase: allow custom merge_optionsEdward Thomson2016-02-111-2/+2
| | | | | | Allow callers of rebase to specify custom merge options. This may allow custom conflict resolution, or failing fast when conflicts are detected.
* rebase: introduce inmemory rebasingEdward Thomson2016-02-111-117/+250
| | | | | | | | | | Introduce the ability to rebase in-memory or in a bare repository. When `rebase_options.inmemory` is specified, the resultant `git_rebase` session will not be persisted to disk. Callers may still analyze the rebase operations, resolve any conflicts against the in-memory index and create the commits. Neither `HEAD` nor the working directory will be updated during this process.
* Fix #3094 - improve use of portable size_t/ssize_t format specifiers.Matthew Plough2015-07-121-2/+2
| | | | The header src/cc-compat.h defines portable format specifiers PRIuZ, PRIdZ, and PRIxZ. The original report highlighted the need to use these specifiers in examples/network/fetch.c. For this commit, I checked all C source and header files not in deps/ and transitioned to the appropriate format specifier where appropriate.
* Initialize a few variablesCarlos Martín Nieto2015-06-091-1/+1
| | | | | | Coverity complains about the git_rawobj ones because we use a loop in which we keep remembering the old version, and we end up copying our object as the base, so we want to have the data pointer be NULL.
* rebase: include checkout opts within rebase optsEdward Thomson2015-04-201-14/+6
|
* rebase: init and open take a rebase_optionsEdward Thomson2015-04-201-114/+118
| | | | | | `git_rebase_init` and `git_rebase_open` should take a `git_rebase_options` and use it for future rebase operations on that `rebase` object.
* rebase: take `checkout_options` where appropriateEdward Thomson2015-04-201-15/+29
|
* rebase: block rebase_commit with unstaged changesEdward Thomson2015-04-201-20/+30
|
* rebase: identify a rebase that has not startedEdward Thomson2015-04-201-1/+1
| | | | | | In `git_rebase_operation_current()`, indicate when a rebase has not started (with `GIT_REBASE_NO_OPERATION`) rather than conflating that with the first operation being in-progress.
* Plug a few leaksCarlos Martín Nieto2015-03-041-2/+2
|
* reset: remove reflog message overrideCarlos Martín Nieto2015-03-031-1/+1
| | | | | 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-11/+12
| | | | | | | | | | 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.
* rebase: check alloc resultEdward Thomson2015-02-271-0/+1
|
* Merge pull request #2831 from ethomson/merge_lockCarlos Martín Nieto2015-02-151-6/+9
|\ | | | | merge: lock index during the merge (not just checkout)
| * indexwriter: an indexwriter for repo operationsEdward Thomson2015-02-141-22/+8
| | | | | | | | | | Provide git_indexwriter_init_for_operation for the common locking pattern in merge, rebase, revert and cherry-pick.
| * merge-like operations: lock index while workingEdward Thomson2015-02-141-3/+20
| |
* | rebase: `CHECKOUT_SAFE` instead of `FORCE`Edward Thomson2015-02-131-8/+12
| | | | | | | | | | Switch to a standard branch-switching pattern of a `SAFE` checkout, then updating `HEAD`.
* | rebase: allow `NULL` branch to indicate `HEAD`Edward Thomson2015-02-131-2/+16
| | | | | | | | | | Don't require the branch to rebase, if given `NULL`, simply look up `HEAD`.
* | rebase: provide NULL `exec` on non-EXEC operationsEdward Thomson2015-02-131-9/+28
|/ | | | | Users may want to try to pay attention to the `exec` field on all rebase operations.
* Check rebase options version on public entry pointsjamill/rebase_opt_ver_checkJameson Miller2015-02-121-1/+3
|
* Check the result of git_buf_joinpathJacques Germishuys2014-12-301-1/+2
|
* Plug some leaksJacques Germishuys2014-12-291-1/+2
|
* notes: move the notes name argumentCarlos Martín Nieto2014-12-061-2/+2
| | | | | Make it consistent between git_note_create() and git_note_remote() by putting it after the repository.
* rebase: updates based on PR commentsEdward Thomson2014-10-261-17/+31
|
* s/git_merge_head/git_annotated_commitEdward Thomson2014-10-261-19/+21
| | | | | Rename git_merge_head to git_annotated_commit, as it becomes used in more operations than just merge.
* rebase: clean up some warnings and memory leaksEdward Thomson2014-10-261-26/+14
|
* rebase: oid member of operation should be constEdward Thomson2014-10-261-2/+2
|
* git_rebase: iterators for operationsEdward Thomson2014-10-261-0/+21
|
* rebase: preload all operationsEdward Thomson2014-10-261-111/+151
|
* rebase: init/open a git_rebase objectEdward Thomson2014-10-261-234/+276
|
* git_rebase_next: provide info about the operationEdward Thomson2014-10-261-2/+9
|
* git_rebase_finish: rewrite notes when finishing rebaseEdward Thomson2014-10-261-16/+150
|
* git_rebase_commit: write HEAD's reflog appropriatelyEdward Thomson2014-10-261-3/+9
|
* Introduce git_rebase_finish to complete a rebaseEdward Thomson2014-10-261-1/+62
|
* git_rebase_commit: drop already-picked commitsEdward Thomson2014-10-261-4/+15
| | | | | | Already cherry-picked commits should not be re-included. If all changes included in a commit exist in the upstream, then we should error with GIT_EAPPLIED.
* Introduce git_rebase_commitEdward Thomson2014-10-261-11/+110
| | | | Commit the current patch of a rebase process.
* git_rebase_next: write conflicts nicely during rebaseEdward Thomson2014-10-261-18/+102
|
* Introduce git_rebase_nextEdward Thomson2014-10-261-0/+156
| | | | | | `git_rebase_next` will apply the next patch (or cherry-pick) operation, leaving the results checked out in the index / working directory so that consumers can resolve any conflicts, as appropriate.
* Introduce git_rebase_abortEdward Thomson2014-10-261-0/+128
| | | | | Abort an in-progress rebase and move the working directory and repository back to the ORIG_HEAD state.
* Introduce git_rebase to set up a rebase sessionEdward Thomson2014-10-261-0/+332
Introduce `git_rebase` to set up a rebase session that can then be continued. Immediately, only merge-type rebase is supported.