summaryrefslogtreecommitdiff
path: root/rebase_test.go
diff options
context:
space:
mode:
authorCarlos Martín Nieto <[email protected]>2017-07-08 22:22:54 +0200
committerGitHub <[email protected]>2017-07-08 22:22:54 +0200
commit2cff3f2ef4828c755a545e5abacd3d7b2da3fc6d (patch)
tree61d3a367d55e2b8dce04d803e28b64514e3b6dbf /rebase_test.go
parentce65c2303e9ba1f814ea4001ee437a7ecfcfb7b0 (diff)
parentb98b0e764066066fd9a5224468c15b50f6627fa9 (diff)
Merge pull request #396 from libgit2/cmn/rebase-no-operation
rebase: correct the return values for CurrentOperationIndex
Diffstat (limited to 'rebase_test.go')
-rw-r--r--rebase_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/rebase_test.go b/rebase_test.go
index fb88a4e..ef4f920 100644
--- a/rebase_test.go
+++ b/rebase_test.go
@@ -182,7 +182,7 @@ func performRebaseOnto(repo *Repository, branch string) (*Rebase, error) {
// Check no operation has been started yet
rebaseOperationIndex, err := rebase.CurrentOperationIndex()
- if err == nil {
+ if rebaseOperationIndex != RebaseNoOperation && err != ErrRebaseNoOperation {
return nil, errors.New("No operation should have been started yet")
}