summaryrefslogtreecommitdiff
path: root/cmd_command.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd_command.go')
-rw-r--r--cmd_command.go23
1 files changed, 12 insertions, 11 deletions
diff --git a/cmd_command.go b/cmd_command.go
index 819d6eb..5698efa 100644
--- a/cmd_command.go
+++ b/cmd_command.go
@@ -48,7 +48,7 @@ type CmdCommit struct {
Merge []string
}
-func (c CmdCommit) fiCmdClass() cmdClass { return cmdClassCommand }
+func (c CmdCommit) fiCmdClass(_ fiReaderState) cmdClass { return cmdClassCommand }
func (c CmdCommit) fiCmdWrite(fiw fiWriter) error {
ez := &ezfiw{fiw: fiw}
@@ -93,6 +93,7 @@ func (CmdCommit) fiCmdRead(fir fiReader) (cmd Cmd, err error) {
c.Mark, err = strconv.Atoi(trimLinePrefix(ez.ReadLine(), "mark :"))
ez.Errcheck(err)
}
+ fir.SetCommandMark(c.Mark)
// original-oid?
if strings.HasPrefix(ez.PeekLine(), "original-oid ") {
@@ -152,7 +153,7 @@ func (CmdCommit) fiCmdRead(fir fiReader) (cmd Cmd, err error) {
// Backend.
type CmdCommitEnd struct{}
-func (CmdCommitEnd) fiCmdClass() cmdClass { return cmdClassInCommit }
+func (CmdCommitEnd) fiCmdClass(_ fiReaderState) cmdClass { return cmdClassInCommit }
func (CmdCommitEnd) fiCmdWrite(fiw fiWriter) error { return nil }
func (CmdCommitEnd) fiCmdRead(fir fiReader) (Cmd, error) { panic("not reached") }
@@ -172,7 +173,7 @@ type CmdTag struct {
Data string
}
-func (c CmdTag) fiCmdClass() cmdClass { return cmdClassCommand }
+func (c CmdTag) fiCmdClass(_ fiReaderState) cmdClass { return cmdClassCommand }
func (c CmdTag) fiCmdWrite(fiw fiWriter) error {
ez := &ezfiw{fiw: fiw}
@@ -249,7 +250,7 @@ type CmdReset struct {
CommitIsh string // optional
}
-func (c CmdReset) fiCmdClass() cmdClass { return cmdClassCommand }
+func (c CmdReset) fiCmdClass(_ fiReaderState) cmdClass { return cmdClassCommand }
func (c CmdReset) fiCmdWrite(fiw fiWriter) error {
ez := &ezfiw{fiw: fiw}
@@ -289,7 +290,7 @@ type CmdBlob struct {
Data string
}
-func (c CmdBlob) fiCmdClass() cmdClass { return cmdClassCommand }
+func (c CmdBlob) fiCmdClass(_ fiReaderState) cmdClass { return cmdClassCommand }
func (c CmdBlob) fiCmdWrite(fiw fiWriter) error {
ez := &ezfiw{fiw: fiw}
@@ -340,7 +341,7 @@ type CmdAlias struct {
CommitIsh string
}
-func (c CmdAlias) fiCmdClass() cmdClass { return cmdClassCommand }
+func (c CmdAlias) fiCmdClass(_ fiReaderState) cmdClass { return cmdClassCommand }
func (c CmdAlias) fiCmdWrite(fiw fiWriter) error {
ez := &ezfiw{fiw: fiw}
ez.WriteLine("alias")
@@ -379,7 +380,7 @@ func (CmdAlias) fiCmdRead(fir fiReader) (cmd Cmd, err error) {
// CmdCheckpoint requests that the Backend flush already-sent data.
type CmdCheckpoint struct{}
-func (c CmdCheckpoint) fiCmdClass() cmdClass { return cmdClassCommand }
+func (c CmdCheckpoint) fiCmdClass(_ fiReaderState) cmdClass { return cmdClassCommand }
func (c CmdCheckpoint) fiCmdWrite(fiw fiWriter) error {
return fiw.WriteLine("checkpoint")
}
@@ -400,7 +401,7 @@ type CmdProgress struct {
Str string
}
-func (c CmdProgress) fiCmdClass() cmdClass { return cmdClassCommand }
+func (c CmdProgress) fiCmdClass(_ fiReaderState) cmdClass { return cmdClassCommand }
func (c CmdProgress) fiCmdWrite(fiw fiWriter) error {
return fiw.WriteLine("progress", c.Str)
}
@@ -422,7 +423,7 @@ type CmdFeature struct {
Argument string
}
-func (c CmdFeature) fiCmdClass() cmdClass { return cmdClassCommand }
+func (c CmdFeature) fiCmdClass(_ fiReaderState) cmdClass { return cmdClassCommand }
func (c CmdFeature) fiCmdWrite(fiw fiWriter) error {
if c.Argument != "" {
return fiw.WriteLine("feature", c.Feature+"="+c.Argument)
@@ -456,7 +457,7 @@ type CmdOption struct {
Option string
}
-func (c CmdOption) fiCmdClass() cmdClass { return cmdClassCommand }
+func (c CmdOption) fiCmdClass(_ fiReaderState) cmdClass { return cmdClassCommand }
func (c CmdOption) fiCmdWrite(fiw fiWriter) error {
return fiw.WriteLine("option", c.Option)
}
@@ -476,7 +477,7 @@ func (CmdOption) fiCmdRead(fir fiReader) (cmd Cmd, err error) {
// sent.
type CmdDone struct{}
-func (c CmdDone) fiCmdClass() cmdClass { return cmdClassCommand }
+func (c CmdDone) fiCmdClass(_ fiReaderState) cmdClass { return cmdClassCommand }
func (c CmdDone) fiCmdWrite(fiw fiWriter) error {
return fiw.WriteLine("done")
}