aboutsummaryrefslogtreecommitdiffstats
path: root/bug
diff options
context:
space:
mode:
Diffstat (limited to 'bug')
-rw-r--r--bug/bug.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/bug/bug.go b/bug/bug.go
index b90beaa7..3c52adc8 100644
--- a/bug/bug.go
+++ b/bug/bug.go
@@ -299,11 +299,16 @@ func (bug *Bug) IsValid() bool {
return true
}
-// Append an operation into the staging area, to be commited later
+// Append an operation into the staging area, to be committed later
func (bug *Bug) Append(op Operation) {
bug.staging.Append(op)
}
+// Return if the bug need to be committed
+func (bug *Bug) HasPendingOp() bool {
+ return !bug.staging.IsEmpty()
+}
+
// Write the staging area in Git and move the operations to the packs
func (bug *Bug) Commit(repo repository.Repo) error {
if bug.staging.IsEmpty() {