summaryrefslogtreecommitdiff
path: root/cmd_comment.go
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2021-02-01 17:37:34 -0700
committerLuke Shumaker <lukeshu@lukeshu.com>2021-02-01 18:16:11 -0700
commitb7bd3adf84ed5f5c18b659973a0539d611a61230 (patch)
tree2fdf0bbf0dd52b5d39fc466bcf4daac80c94ada6 /cmd_comment.go
parentc3c1e51d8a2577a5f008dd7240ea6c509af2cd98 (diff)
Bring up to git.git commit 7ffde293f2e7f0ae455800b138416da601254436
Diffstat (limited to 'cmd_comment.go')
-rw-r--r--cmd_comment.go10
1 files changed, 9 insertions, 1 deletions
diff --git a/cmd_comment.go b/cmd_comment.go
index a6d8c9e..8c812f4 100644
--- a/cmd_comment.go
+++ b/cmd_comment.go
@@ -83,7 +83,15 @@ type CmdCatBlob struct {
DataRef string
}
-func (c CmdCatBlob) fiCmdClass() cmdClass { return cmdClassComment }
+func (c CmdCatBlob) fiCmdClass() cmdClass {
+ // Prior to git v2.22.0 this was 'cmdClassComment', but in
+ // v2.22.0 it was changed to a stricter
+ // 'cmdClassCommand|cmdClassInCommit|cmdClassInFileModify'. I
+ // don't want to implement cmdClassInFileModify for just this
+ // one command, and also I want to have better backward
+ // compatibility; so I'm keeping it as 'cmdClassComment'.
+ return cmdClassComment
+}
func (c CmdCatBlob) fiCmdWrite(fiw fiWriter) error {
return fiw.WriteLine("cat-blob", c.DataRef)
}