git.fiddlerwoaroof.com
Browse code

chore(readme): update README.org, don't use GIT:GIT

Edward authored on 02/06/2021 07:09:09
Showing 1 changed files
... ...
@@ -39,35 +39,36 @@
39 39
 
40 40
     #+BEGIN_SRC lisp :exports both :results verbatim
41 41
       (git:in-repository "~/quicklisp/local-projects/cl-git")
42
-      (git:git (branch "master")) ;; the argument to branch defaults to "master"
42
+      (git:branch "master") ;; the argument to branch defaults to "master"
43 43
     #+END_SRC
44 44
 
45 45
     #+RESULTS:
46
-    : #<LOOSE-REF b27750d of /Users/edwlan/quicklisp/local-projects/cl-git/>
46
+    : #<LOOSE-REF 657ab33 of ~/git_repos/git.fiddlerwoaroof.com/u/edwlan/cl-git/>
47 47
 
48 48
 
49 49
 *** Show the commit message
50 50
 
51 51
     #+BEGIN_SRC lisp :exports both :results verbatim
52 52
       (git:in-repository "~/quicklisp/local-projects/cl-git")
53
-      (git:git (branch "master") ;; the argument to branch defaults to "master"
54
-               (component :message))
53
+      (git:component :message (git:branch "master"))
55 54
     #+END_SRC
56 55
 
57 56
     #+RESULTS:
58
-    : feat(delta): first cut of delta extraction
57
+    : feat(blobs): introduce BLOB class
59 58
 
60 59
 *** Show the messages of the commit's parent
61 60
 
62 61
     #+BEGIN_SRC lisp :exports both :results verbatim
63 62
       (git:in-repository "~/quicklisp/local-projects/cl-git")
64
-      (git:git (branch "master") ;; the argument to branch defaults to "master"
65
-               (commit-parents)
66
-               (map (component :message)))
63
+      (let* ((branch (git:branch "master"))
64
+             (parents (git:parents branch)))
65
+        (mapcar (lambda (it)
66
+                  (git:component :message it))
67
+                parents))
67 68
     #+END_SRC
68 69
 
69 70
     #+RESULTS:
70
-    : ("refactor: minor refactors, start using transducers
71
+    : ("(bump)
71 72
     : ")
72 73
 
73 74
 *** Show the files in a commit
... ...
@@ -92,24 +93,24 @@
92 93
     | .gitignore      | 100644 | 8a9fe9f77149f74fed5c05388be8e5ffd4a31678 |
93 94
     | .projectile     | 100644 | e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 |
94 95
     | LICENSE         | 100644 | 0306819e780fa57dc3bf6b99a0a059670b605ae0 |
95
-    | README.org      | 100644 | 8be1c00d70982a8dd819673289f57bab201ae9fb |
96
+    | README.org      | 100644 | 9889a8a1e253a446de953072db8ee9f13e90b716 |
96 97
     | branch.lisp     | 100644 | 6ee2b1e254e7895d55ecd534b2fa16267ec14389 |
97
-    | cl-git.asd      | 100644 | fac607480b840e3037abd80617d9b19a0fe214c7 |
98
+    | cl-git.asd      | 100644 | 486920e6178e436fa993ce3a2bd23f60827c9fd5 |
98 99
     | commit.lisp     | 100644 | d6a83c1a351eb2c0f5315ceddcde37545b7781d6 |
99
-    | delta.lisp      | 100644 | 1fa43a800829dfa49e540129d8243f748bb17543 |
100
-    | docker-run      |  40000 | 53b626da144188970e4c1b63ee3b23212e277672 |
100
+    | delta.lisp      | 100644 | 1417d8b8d172824c38d95791c8b884393db273ae |
101
+    | docker-run      |  40000 | acace4bb63832baa7e69e324e738eda7aae4ac2c |
101 102
     | extract.lisp    | 100644 | 4bfb480eb2993cf516fded3adec49483322fdcf4 |
102 103
     | git.lisp        | 100644 | bad6f54787369609581669de923afaf378ed4002 |
103 104
     | graph.lisp      | 100644 | 31576396aff0fff28f69e0ef84571c0dc8cc43ec |
104 105
     | model.lisp      | 100644 | 346fa823d06b6cebead49c7ec37d90b3cc660528 |
105 106
     | package.lisp    | 100644 | 538e7211817953a036f8f913dd4509c8edc6a489 |
106
-    | porcelain.lisp  | 100644 | 9190e6fb27aad51167b23f1cc4089e426241159b |
107
-    | protocol.lisp   | 100644 | 7e24a6a7a4349497fce06830fa132e9a8ef6fd06 |
107
+    | porcelain.lisp  | 100644 | 3929d993c8ad4c6c99b4e0ff3b3a54bee7c95fc1 |
108
+    | protocol.lisp   | 100644 | 01315cf76c90baac4daf5218f50fc76aa8674910 |
108 109
     | repository.lisp | 100644 | af1cc58c12b32770fa63ac29502a446b3b059c90 |
109
-    | tests           |  40000 | 47c7f38df49c936fa6263eb70fc6749f33f8be34 |
110
+    | tests           |  40000 | 0a5e860fc174d9c2078d1fc9f1cef01c0f5867d2 |
110 111
     | tree.lisp       | 100644 | 42eceec42eb35d4ee2b739e99d7e1a51f1b9fd35 |
111 112
     | undelta.lisp    | 100644 | ae0a070133d1a14d6e940a0f790f40b37e885b22 |
112
-    | util.lisp       | 100644 | 66279b2fa08c9d0872e888b85fe14d9950e27326 |
113
+    | util.lisp       | 100644 | d75f905d80b97abd329518b7574ef0f2fe1673c8 |
113 114
 
114 115
 *** Show the files that match a pattern
115 116
     - Note taken on [2020-11-15 Sun 01:49] \\
... ...
@@ -117,28 +118,32 @@
117 118
 
118 119
     #+BEGIN_SRC lisp :exports both :results table :hlines yes
119 120
       (git:with-repository ("~/quicklisp/local-projects/cl-git/")
120
-        (list* '("Name" "Mode" "Hash")
121
-               'hline
122
-               (git:git (branch "master")
123
-                        (tree)
124
-                        (filter-tree "^.....?[.]lisp")
125
-                        (map (juxt (component :name)
126
-                                   (component :mode)
127
-                                   (component :hash))))))
121
+        (let* ((branch (git:branch "master"))
122
+               (tree (git:tree branch))
123
+               (tree-entries (git:filter-tree "^.....?[.]lisp" tree)))
124
+          (flet ((component (component)
125
+                   (lambda (it)
126
+                     (git:component component it))))
127
+            (list* '("Name" "Mode" "Hash")
128
+                   'hline
129
+                   (mapcar (data-lens:juxt (component :name)
130
+                                           (component :mode)
131
+                                           (component :hash))
132
+                           tree-entries)))))
128 133
     #+END_SRC
129 134
 
130 135
     #+RESULTS:
131 136
     | Name       |   Mode | Hash                                     |
132 137
     |------------+--------+------------------------------------------|
133
-    | delta.lisp | 100644 | 1fa43a800829dfa49e540129d8243f748bb17543 |
138
+    | delta.lisp | 100644 | 1417d8b8d172824c38d95791c8b884393db273ae |
134 139
     | graph.lisp | 100644 | 31576396aff0fff28f69e0ef84571c0dc8cc43ec |
135 140
     | model.lisp | 100644 | 346fa823d06b6cebead49c7ec37d90b3cc660528 |
136 141
     | tree.lisp  | 100644 | 42eceec42eb35d4ee2b739e99d7e1a51f1b9fd35 |
137
-    | util.lisp  | 100644 | 66279b2fa08c9d0872e888b85fe14d9950e27326 |
142
+    | util.lisp  | 100644 | d75f905d80b97abd329518b7574ef0f2fe1673c8 |
138 143
 
139 144
 ** Partially Implemented:
140 145
 
141
-*** Delta refs [1/2]
146
+*** Delta refs
142 147
     Git uses a [[https://git-scm.com/docs/pack-format#_deltified_representation][delta calculation]] routine to compress some of the blobs
143 148
     in a pack file. This delta stores a reference to a base object and
144 149
     a sequence of commands for transforming the base object into the