aboutsummaryrefslogtreecommitdiff
path: root/web/view/markdown.scm
diff options
context:
space:
mode:
authorAlexander_Kabui2024-08-07 17:51:44 +0300
committerMunyoki Kilyungi2024-08-09 11:55:16 +0300
commit12b3d8158b807609f3f571cbf0603bb067878e9b (patch)
tree43e23bccc787089192f95175587020b2b9411315 /web/view/markdown.scm
parent8ece33e22a4eaedc9d65d2fe6f331ccbc96cb258 (diff)
downloadgn-guile-12b3d8158b807609f3f571cbf0603bb067878e9b.tar.gz
Use kebab case for Variables.
Diffstat (limited to 'web/view/markdown.scm')
-rw-r--r--web/view/markdown.scm19
1 files changed, 9 insertions, 10 deletions
diff --git a/web/view/markdown.scm b/web/view/markdown.scm
index 59eb8b8..e6d595d 100644
--- a/web/view/markdown.scm
+++ b/web/view/markdown.scm
@@ -56,15 +56,15 @@
(br)
(br))))
-(define (fetch-file repo query_path)
- (let* ( (abs_path (string-append repo "/" query_path)))
- (if (file-exists? abs_path) (let* ((full_path (canonicalize-path abs_path))
- (content (call-with-input-file full_path get-string-all))
+(define (fetch-file repo query-path)
+ (let* ( (abs-path (string-append repo "/" query-path)))
+ (if (file-exists? abs-path) (let* ((full-path (canonicalize-path abs-path))
+ (content (call-with-input-file full-path get-string-all))
(commit-sha (get-latest-commit-sha1 repo)))
- `(("file_path" . ,query_path)
+ `(("file_path" . ,query-path)
("content" . ,content)
("hash" . ,commit-sha))
- ) (throw 'file-error (string-append "the file path " abs_path " does not exists")))))
+ ) (throw 'file-error (string-append "the file path " abs-path " does not exists")))))
(define (git-invoke repo-path . args)
(apply system* "git" "-C" repo-path args))
@@ -80,10 +80,9 @@
commit-sha))
(define* (commit-file repo file-path content commit-message username email #:optional (prev-commit ""))
- (if (string=? prev-commit (get-latest-commit-sha1 repo))
- #t
- (throw 'system-error (format #f "Commits do no match.Please pull in latest changes for current * ~a * and prev * ~a * "
- (get-latest-commit-sha1 repo) prev-commit)))
+ (unless (string=? prev-commit (get-latest-commit-sha1 repo))
+ (throw 'system-error (format #f "Commits do no match.Please pull in latest changes for current * ~a * and prev * ~a * "
+ (get-latest-commit-sha1 repo) prev-commit)))
(if (is-repo? repo)
(match (file-exists? (string-append repo "/" file-path))
(#t