Tahinli/forge
public0 watching
★ 0
| 1 | //! Git LFS over HTTP: the batch API, object GET and PUT, and verify. See |
| 2 | //! `docs/wave-b-interfaces.md`, section 2. |
| 3 | //! |
| 4 | //! Objects are content-addressed under `<data_dir>/lfs/<oid[0..2]>/<oid[2..4]>/<oid>` and shared by |
| 5 | //! every repo. The `lfs_objects` table says which repo may use which object. Uploads stream into |
| 6 | //! `<data_dir>/lfs/tmp` first and are renamed into place once their SHA-256 matches. Locks are not |
| 7 | //! implemented, so the lock paths answer 404. `admin lfs-gc` lives in [`gc`]. |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | use ; |
| 15 | |
| 16 | use Result; |
| 17 | |
| 18 | use crateAppState; |
| 19 | |
| 20 | /// True for a 64-character lowercase hex SHA-256. |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 | |
| 27 | |
| 28 | /// Root of the object store: `<data_dir>/lfs`. |
| 29 | |
| 30 | |
| 31 | |
| 32 | |
| 33 | /// Where in-flight uploads are written before they are renamed into place. |
| 34 | |
| 35 | |
| 36 | |
| 37 | |
| 38 | /// The on-disk path of object `oid`. Callers pass a validated oid (see [`is_valid_oid`]); for any |
| 39 | /// other input the path is still inside the store, just not in a fan-out directory. |
| 40 | |
| 41 | |
| 42 | |
| 43 | |
| 44 | |
| 45 | |
| 46 | |
| 47 | /// The size of object `oid` as linked to `repo_id`, or `None` when that repo does not link it. |
| 48 | /// The UI uses this for pointer display. It reads the link only, not the file. |
| 49 | pub async |
| 50 | |
| 51 | |
| 52 | |
| 53 | |
| 54 | |
| 55 | |
| 56 | |
| 57 | |
| 58 | |
| 59 | |
| 60 | |
| 61 | |
| 62 | |
| 63 | |
| 64 | |
| 65 | |
| 66 | |
| 67 | |
| 68 | |
| 69 | |
| 70 | |
| 71 | |
| 72 | |
| 73 | |
| 74 | |
| 75 | |
| 76 | |
| 77 | |
| 78 | |
| 79 | |
| 80 | |
| 81 | |
| 82 |