summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--llm-tools-hl.el8
1 files changed, 6 insertions, 2 deletions
diff --git a/llm-tools-hl.el b/llm-tools-hl.el
index 1ec13ef..3072ffc 100644
--- a/llm-tools-hl.el
+++ b/llm-tools-hl.el
@@ -90,7 +90,8 @@ If INCLUDE-CONTENT is non-nil, append `|LINE' after each hash."
90 (llm-tools--hl-format-lines (llm-tools--hl-file-lines file beg end) beg t)) 90 (llm-tools--hl-format-lines (llm-tools--hl-file-lines file beg end) beg t))
91 91
92(defun llm-tools--hl-file-read-hashes (file) 92(defun llm-tools--hl-file-read-hashes (file)
93 "TODO rewrite docstring to be less redundant. Return FILE contents in hashline format without content as a list of hashline-formatted hashes." 93 "Return FILE contents as a list of hashline strings without line content.
94Each element is a line number and two-character hash, like `1vx'."
94 (string-lines (llm-tools--hl-format-lines (llm-tools--hl-file-lines file)))) 95 (string-lines (llm-tools--hl-format-lines (llm-tools--hl-file-lines file))))
95 96
96(defun llm-tools--hl-file-line-hash (file n) 97(defun llm-tools--hl-file-line-hash (file n)
@@ -149,7 +150,10 @@ the operations in that file's sections. Each anchor is a string like
149 sections)))) 150 sections))))
150 151
151(defun llm-tools--hl-verify (patch) 152(defun llm-tools--hl-verify (patch)
152 "TODO rewrite docstring to be lses verbose? Verifies the anchors exist in PATCH." 153 "Verify that all anchors in PATCH match the current file contents.
154Returns a list of booleans, one per file, indicating whether every
155anchor in that file's patch sections still matches the corresponding
156line in the on-disk file."
153 (let ((patch-anchors (llm-tools--hl-get-anchors patch))) 157 (let ((patch-anchors (llm-tools--hl-get-anchors patch)))
154 (mapcar (lambda (section) 158 (mapcar (lambda (section)
155 (let* ((file (car section)) 159 (let* ((file (car section))