summaryrefslogtreecommitdiff
path: root/delta_string.go
diff options
context:
space:
mode:
authorlhchavez <[email protected]>2020-02-23 14:49:04 +0000
committerlhchavez <[email protected]>2020-02-23 14:49:04 +0000
commit627447092fa24035ed3cd4cf31932dbef6f5a57f (patch)
tree48a9122be45522cf1ec72535cec18fd701db55d2 /delta_string.go
parent03339f731aba66baacab3fd67e7b2d185cdacb33 (diff)
parent06764f48dce903bf95701c6ef75ad0fe46c0dedf (diff)
Merge remote-tracking branch 'upstream/master' into more-annotated-commit
Diffstat (limited to 'delta_string.go')
-rw-r--r--delta_string.go33
1 files changed, 33 insertions, 0 deletions
diff --git a/delta_string.go b/delta_string.go
new file mode 100644
index 0000000..53e02bd
--- /dev/null
+++ b/delta_string.go
@@ -0,0 +1,33 @@
+// Code generated by "stringer -type Delta -trimprefix Delta -tags static"; DO NOT EDIT.
+
+package git
+
+import "strconv"
+
+func _() {
+ // An "invalid array index" compiler error signifies that the constant values have changed.
+ // Re-run the stringer command to generate them again.
+ var x [1]struct{}
+ _ = x[DeltaUnmodified-0]
+ _ = x[DeltaAdded-1]
+ _ = x[DeltaDeleted-2]
+ _ = x[DeltaModified-3]
+ _ = x[DeltaRenamed-4]
+ _ = x[DeltaCopied-5]
+ _ = x[DeltaIgnored-6]
+ _ = x[DeltaUntracked-7]
+ _ = x[DeltaTypeChange-8]
+ _ = x[DeltaUnreadable-9]
+ _ = x[DeltaConflicted-10]
+}
+
+const _Delta_name = "UnmodifiedAddedDeletedModifiedRenamedCopiedIgnoredUntrackedTypeChangeUnreadableConflicted"
+
+var _Delta_index = [...]uint8{0, 10, 15, 22, 30, 37, 43, 50, 59, 69, 79, 89}
+
+func (i Delta) String() string {
+ if i < 0 || i >= Delta(len(_Delta_index)-1) {
+ return "Delta(" + strconv.FormatInt(int64(i), 10) + ")"
+ }
+ return _Delta_name[_Delta_index[i]:_Delta_index[i+1]]
+}