summaryrefslogtreecommitdiff
path: root/src/rebase.c
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@microsoft.com>2015-03-17 10:04:08 -0400
committerEdward Thomson <ethomson@microsoft.com>2015-04-20 16:22:27 -0400
commit30640aa9ad574761a3a69244c6194eb626e69d40 (patch)
tree02201b32fe3b2e3f8dbceaa83b018c0cb0ed48a2 /src/rebase.c
parent08c45213b164fdb456c1b19b98039365c8f0cf98 (diff)
downloadlibgit2-30640aa9ad574761a3a69244c6194eb626e69d40.tar.gz
rebase: identify a rebase that has not started
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.
Diffstat (limited to 'src/rebase.c')
-rw-r--r--src/rebase.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rebase.c b/src/rebase.c
index eb25d4c3a..3bc10f4af 100644
--- a/src/rebase.c
+++ b/src/rebase.c
@@ -1148,7 +1148,7 @@ size_t git_rebase_operation_current(git_rebase *rebase)
{
assert(rebase);
- return rebase->current;
+ return rebase->started ? rebase->current : GIT_REBASE_NO_OPERATION;
}
git_rebase_operation *git_rebase_operation_byindex(git_rebase *rebase, size_t idx)