X-Git-Url: https://thelambdalab.xyz/gitweb/index.cgi?a=blobdiff_plain;ds=sidebyside;f=examples%2Fbrowse-git.scm;h=ec7ea421ee5cdf91d5c697a2ad4ee67b52e508c7;hb=ddf946e28add699f4c5b5ffcd2df19f92136f7ff;hp=dbf0b1727d5ea5d307222fb4bc447636f1bde9da;hpb=2ee1c7c6da9e093c1722a0009c82dba5c14a0db0;p=scratchy.git diff --git a/examples/browse-git.scm b/examples/browse-git.scm old mode 100755 new mode 100644 index dbf0b17..ec7ea42 --- a/examples/browse-git.scm +++ b/examples/browse-git.scm @@ -40,7 +40,8 @@ (define (serve-tree) (let ((entries (git "ls-tree" branch path)) - (references (git "show-ref" "--heads"))) + (references (git "show-ref" "--heads")) + (commits (git "rev-list" "--abbrev-commit" "-n5" branch))) (append (list (conc "Git repository " git-base-url repo) "") @@ -60,6 +61,16 @@ refname) (conc "browse-git.scm|" repo "|" refname "|" path "|tree")))) references) + (list + "" + (conc "-----= Recent Commits [" branch "] =-----")) + (map (lambda (commit) + (list + 1 + (conc (if (equal? branch commit) "*" "") + (car (git "show" "-s" "--format=%s (%ar)" commit))) + (conc "browse-git.scm|" repo "|" commit "|" path "|tree"))) + commits) (list "" (conc "-----= Files [" path "] =-----")) (map (lambda (entry)