Skip to content

Changes needed to use gitoxide for radicle-link test setup #190

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 91 commits into from
Sep 7, 2021
Merged
Changes from 1 commit
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
6d0bedd
[actor #190] methods to get an actor signature at the current time
Byron Aug 31, 2021
1927be7
[repository #190] Make local-offset available on demand only…
Byron Aug 31, 2021
3a7d379
[various #190] rename 'local-offset' to 'local-time-support'
Byron Aug 31, 2021
7c559d6
[repository #190] A way to write objects and the empty tree specifically
Byron Sep 1, 2021
1e029b4
[repository #190] refactor
Byron Sep 1, 2021
26a6637
[repository #190] put git-lock into ST1…
Byron Sep 1, 2021
78bacf9
[object #190] More conversion methods for Object
Byron Sep 1, 2021
3f36a01
[ref #190] refactor
Byron Sep 1, 2021
507d710
[features #190] be more explicit about why sha1-asm is disabled
Byron Sep 2, 2021
c5de433
[object #190] consistent method naming
Byron Sep 2, 2021
63bedc7
[refs #190] refactor; handle value-checks in dereffed symlinks correctly
Byron Sep 2, 2021
bfcf8f1
[repository #190] first version of 'commit(…)' without reflog message…
Byron Sep 2, 2021
0763ac2
[repository #190] thanks clippy
Byron Sep 2, 2021
43f7568
[repository #190] commit::summary()
Byron Sep 2, 2021
e7a8b62
[repository #190] produce nice reflog messages
Byron Sep 2, 2021
4ec631c
[repository #190] another commit() test…
Byron Sep 2, 2021
e4abcf3
allow incremental builds…
Byron Sep 2, 2021
06b9270
[repository #190] show that unconditional creation of references does…
Byron Sep 3, 2021
9741987
[ref #190] prepare massive refactoring to get additional constraint
Byron Sep 3, 2021
1a4786f
[ref #190] Allow for explicit expected previous values
Byron Sep 3, 2021
07126d6
[ref #190] refactor
Byron Sep 3, 2021
68f7fc2
[ref #190] don't claim there was a previous oid unnecessarily…
Byron Sep 3, 2021
c04c8b9
[ref #190] be explicit about what the previous reflog oid is for…
Byron Sep 3, 2021
0e65559
[ref #190] refactor
Byron Sep 3, 2021
74f85b1
[ref #190] deletions also use PreviousValue now
Byron Sep 3, 2021
980e16a
[ref #190] more tests
Byron Sep 3, 2021
8634341
[ref #190] introduce Raw reference type that simplifies everything…
Byron Sep 3, 2021
d6bef3a
[repository #190] refactor
Byron Sep 3, 2021
9473a71
[ref #190] raw reference peeling
Byron Sep 3, 2021
7aeea9c
[ref #190] Use Raw Reference everywhere for great simplification…
Byron Sep 3, 2021
14dff63
thanks clippy
Byron Sep 3, 2021
df21f25
[ref #190] fix remaining tests
Byron Sep 3, 2021
c55ce4d
[repository #190] experiment with 'HEAD' API…
Byron Sep 3, 2021
ac4413c
Bump git-ref v0.7.0
Byron Sep 3, 2021
3e64ec1
[ref #190] fix docs
Byron Sep 3, 2021
2cb511e
[ref #190] cache peeled objects properly
Byron Sep 3, 2021
43ac4f5
[repository #190] a major step forward with `head()` access
Byron Sep 4, 2021
15d4ac8
[repository #190] refactor
Byron Sep 4, 2021
376c045
thanks clippy
Byron Sep 4, 2021
0b635e9
[ref #190] Move file-log-specific functionality into own extension tr…
Byron Sep 4, 2021
60fc215
[ref #190] move remaining file store functions to extension trait
Byron Sep 4, 2021
4a36ded
[ref #190] First working sketch of reverse log iter access
Byron Sep 4, 2021
641edde
[repository #190] reflog tests
Byron Sep 4, 2021
998c7c6
[ref #190] check for zero sized buffers in reverse log iterators…
Byron Sep 4, 2021
946bbf1
[repository #190] ref log for HEAD specifically
Byron Sep 4, 2021
2de86f9
[ref #190] reverse reflog ergonomics
Byron Sep 4, 2021
023dedc
thanks clippy
Byron Sep 4, 2021
49fe1dc
[ref #190] refactor
Byron Sep 4, 2021
e751688
[repository #190] refactor
Byron Sep 4, 2021
c3e240d
[ref #190] add forward log iter and localize iter types…
Byron Sep 4, 2021
28afd8e
[repository #190] shortcut to create references
Byron Sep 4, 2021
7a111b1
[repository #190] refactor
Byron Sep 5, 2021
1fe1b42
[ref #190] more Target conversions…
Byron Sep 5, 2021
e34be7e
[ref #190] refactor
Byron Sep 5, 2021
a985491
[repository #190] obtain the kind fo hash used in a repo
Byron Sep 5, 2021
6efd90d
Bump git-hash v0.6.0
Byron Sep 5, 2021
427f146
[repository #190] prepare reference iteration
Byron Sep 5, 2021
8c532a4
[repository #190] refactor
Byron Sep 5, 2021
2c0939a
[repository #190] implementation of reference iteration (all() for now)…
Byron Sep 5, 2021
a6e19c9
[repository #190] prefixed reference iteration
Byron Sep 5, 2021
1795a33
[ref #190] more conversion trait impls
Byron Sep 5, 2021
e4411ff
[repository #190] cleanup usage of bstr…
Byron Sep 5, 2021
3b7ffde
[repository #190] public bstr re-export
Byron Sep 5, 2021
3d8796e
[repository #190] turns out we need bstr with unicode support
Byron Sep 5, 2021
16b2232
[ref #190] Make References sortable
Byron Sep 5, 2021
0b0fea4
[#190] faster builds with debug=false and dependency caching
Byron Sep 5, 2021
a22c95b
[#190] run tests faster (at the cost of compile time)
Byron Sep 6, 2021
d14f073
[repository #190] transparent namespace support
Byron Sep 6, 2021
f58a0ff
[ref #190] more assetions to understand 'find(…)' for namespaced refs…
Byron Sep 6, 2021
d335731
[repository #190] note a known limitation about finding references in…
Byron Sep 6, 2021
f5e118c
[repository #190] fix build
Byron Sep 6, 2021
1ef6cb3
[ref #190] refactor
Byron Sep 6, 2021
609c249
[repository #190] refactor
Byron Sep 6, 2021
d2d1db6
[repository #190] prepare for namespacing support on file store level
Byron Sep 6, 2021
0660a6f
[#190] disable caching to see if this fixes windows
Byron Sep 6, 2021
3c7968c
[ref #190] refactor
Byron Sep 6, 2021
d5987d4
[ref #190] iteration with namespace support
Byron Sep 6, 2021
1aa9c11
[repository #190] leverage git-ref namespace support
Byron Sep 6, 2021
5fcd0e4
[ref #190] prepare test for namespaced find(…)
Byron Sep 6, 2021
1240c21
[ref #190] find() with namespace support
Byron Sep 6, 2021
c663da1
[ref #190] don't provide namespace support for loose and packed refs…
Byron Sep 6, 2021
e5a5c09
[repository #190] fix tests; needs inbound transaction handling…
Byron Sep 6, 2021
e426e15
[ref #190] fix tests
Byron Sep 6, 2021
010be48
[ref #190] refactor
Byron Sep 6, 2021
e7188e0
[repository #190] refactor
Byron Sep 6, 2021
85f1a48
[repository #190] first shot at ancestor iteration…
Byron Sep 6, 2021
f4d1ec4
[repository #190] access to repository directories
Byron Sep 6, 2021
e5e3c80
Bump git-pack v0.10.0
Byron Sep 6, 2021
6da3599
[repository #190] fix build, lets just make traversal available by de…
Byron Sep 6, 2021
fdc3678
[repository #190] test for oid.ancestors().all()
Byron Sep 6, 2021
ab250f7
[odb #190] Read all eligble packed refs, no "pack-" prefix needed
Byron Sep 7, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[repository #190] access to repository directories
  • Loading branch information
Byron committed Sep 6, 2021
commit f4d1ec4ac0be8aa46d97eb92fb8a8f3fb8da94fb
16 changes: 16 additions & 0 deletions git-repository/src/repository.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,22 @@ pub mod init {
}
}

mod location {
use crate::Repository;

impl Repository {
/// The path to the `.git` directory itself, or equivalent if this is a bare repository.
pub fn path(&self) -> &std::path::Path {
&self.refs.base
}

/// Return the path to the working directory if this is not a bare repository.
pub fn workdir(&self) -> Option<&std::path::Path> {
self.work_tree.as_deref()
}
}
}

pub mod discover {
use std::{convert::TryInto, path::Path};

Expand Down