git.fiddlerwoaroof.com
Browse code

fix: ref issues

Edward Langley authored on 08/11/2023 12:42:21
Showing 6 changed files
... ...
@@ -51,7 +51,7 @@
51 51
          (o (fwoar.cl-git.pack::extract-object-at-pos
52 52
              pack
53 53
              offset
54
-             (make-instance 'fwoar.cl-git:git-ref
54
+             (make-instance 'fwoar.cl-git.ref:ref
55 55
                             :hash "00000000"
56 56
                             :repo nil)))
57 57
          (obj (serapeum:assocdr :object-data o))
... ...
@@ -84,7 +84,7 @@
84 84
              (o (fwoar.cl-git.pack:extract-object-at-pos
85 85
                  pack
86 86
                  offset
87
-                 (make-instance 'fwoar.cl-git:git-ref
87
+                 (make-instance 'fwoar.cl-git.ref:ref
88 88
                                 :hash "00000000"
89 89
                                 :repo nil)))
90 90
              (obj (serapeum:assocdr :object-data o)))
... ...
@@ -7,7 +7,7 @@
7 7
 (defun pack (index pack repository)
8 8
   (fw.lu:new 'pack index pack repository))
9 9
 
10
-(defclass packed-ref (fwoar.cl-git::git-ref)
10
+(defclass packed-ref (fwoar.cl-git.ref:ref)
11 11
   ((%pack :initarg :pack :reader packed-ref-pack)
12 12
    (%offset :initarg :offset :reader packed-ref-offset)))
13 13
 
... ...
@@ -20,21 +20,21 @@
20 20
   (:use :cl)
21 21
   (:export #:pack #:pack-file #:index-file #:idx-toc
22 22
            #:with-pack-streams #:seek-to-object-in-pack #:packed-ref
23
-           #:packed-ref-pack #:packed-ref-offset #:extract-object #:git-ref
23
+           #:packed-ref-pack #:packed-ref-offset #:extract-object #:ref
24 24
            #:loose-ref #:extract-object-at-pos #:raw-object-for-ref))
25 25
 
26 26
 (defpackage :fwoar.cl-git.ref
27 27
   (:use :cl :fwoar.cl-git.protocol)
28
-  (:export #:git-ref #:loose-ref #:ref-repo #:ref-hash #:loose-ref-file))
28
+  (:export #:ref #:loose-ref #:ref-repo #:ref-hash #:loose-ref-file))
29 29
 
30 30
 (defpackage :fwoar.cl-git
31 31
   (:use :cl :fwoar.cl-git.protocol)
32 32
   (:import-from :fwoar.cl-git.commit #:git-commit)
33 33
   (:import-from :fwoar.cl-git.pack #:packed-ref)
34
-  (:import-from :fwoar.cl-git.ref #:git-ref #:loose-ref #:ref-hash #:ref-repo)
34
+  (:import-from :fwoar.cl-git.ref #:loose-ref #:ref-hash #:ref-repo)
35 35
   (:export #:ensure-ref #:repository #:*want-delta* #:git-object #:hash
36 36
            #:*git-encoding* #:git-commit #:ref #:component #:*git-repository*
37
-           #:git-ref #:extract-object #:git-tree #:blob))
37
+           #:extract-object #:git-tree #:blob))
38 38
 
39 39
 (defpackage :fwoar.cl-git.types
40 40
   (:use :cl )
... ...
@@ -13,7 +13,7 @@
13 13
 
14 14
 (defgeneric component (component object)
15 15
   (:argument-precedence-order object component)
16
-  (:method (component (object fwoar.cl-git:git-ref))
16
+  (:method (component (object fwoar.cl-git.ref:ref))
17 17
     (component component (fwoar.cl-git:extract-object object)))
18 18
   (:method ((component sequence) object)
19 19
     (reduce (lambda (cur next)
... ...
@@ -1,12 +1,12 @@
1 1
 (in-package :fwoar.cl-git.ref)
2 2
 
3
-(defclass git-ref ()
3
+(defclass ref ()
4 4
   ((%repo :initarg :repo :reader ref-repo)
5 5
    (%hash :initarg :hash :reader ref-hash)))
6
-(defclass loose-ref (git-ref)
6
+(defclass loose-ref (ref)
7 7
   ((%file :initarg :file :reader loose-ref-file)))
8 8
 
9
-(defmethod print-object ((obj git-ref) s)
9
+(defmethod print-object ((obj ref) s)
10 10
   (print-unreadable-object (obj s :type t :identity t)
11 11
     (format s "~a of ~a"
12 12
             (subseq (ref-hash obj) 0 6)
... ...
@@ -16,5 +16,5 @@
16 16
                                      (root-of (ref-repo obj))
17 17
                                      "~/"))))
18 18
 
19
-(defmethod fwoar.cl-git:component ((component (eql :hash)) (object git-ref))
19
+(defmethod fwoar.cl-git:component ((component (eql :hash)) (object ref))
20 20
   (ref-hash object))
... ...
@@ -9,7 +9,7 @@
9 9
   :in :fwoar.cl-git)
10 10
 (fiveam:in-suite :fwoar.cl-git.git-objects)
11 11
 
12
-(defclass fake-ref (fwoar.cl-git:git-ref)
12
+(defclass fake-ref (fwoar.cl-git.ref:ref)
13 13
   ())
14 14
 (defun fake-ref (repo hash)
15 15
   (fwoar.lisputils:new 'fake-ref repo hash))