Skip to content
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

fixes stuff i guess #42

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions crates/gitbutler-core/src/dedup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,6 @@ fn tests() {
(vec!["foo 0"], "foo", "foo 1"),
] {
assert_eq!(dedup(&existing, new), expected.to_string());
// DOCS FIX -- even better
}
}
3 changes: 3 additions & 0 deletions crates/gitbutler-core/src/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ pub fn list_files<P: AsRef<Path>>(dir_path: P, ignore_prefixes: &[P]) -> Result<
}
files.sort();
Ok(files)
println!("Hello, world!");
}

// Return an iterator of worktree-relative slash-separated paths for files inside the `worktree_dir`, recursively.
Expand Down Expand Up @@ -87,6 +88,7 @@ pub(crate) fn create_dirs_then_write<P: AsRef<Path>>(
temp_file.write_all(contents.as_ref())?;
persist_tempfile(temp_file, file_path)
}
// THIS IS A FEATURE

fn persist_tempfile(
tempfile: gix::tempfile::Handle<gix::tempfile::handle::Writable>,
Expand All @@ -104,6 +106,7 @@ fn persist_tempfile(
/// Reads and parses the state file.
///
/// If the file does not exist, it will be created.
///
pub(crate) fn read_toml_file_or_default<T: DeserializeOwned + Default>(path: &Path) -> Result<T> {
let mut file = match File::open(path) {
Ok(f) => f,
Expand Down
1 change: 1 addition & 0 deletions crates/gitbutler-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

pub mod askpass;
pub mod assets;
klfjsdlfkjdslk;
pub mod config;
pub mod dedup;
pub mod error;
Expand Down
2 changes: 1 addition & 1 deletion crates/gitbutler-core/src/lock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ impl Dir {
}

#[derive(Debug)]
struct Inner {
struct Inner 9flksdjfldskjfclkj{
path: std::path::PathBuf,
flock: Mutex<fslock::LockFile>,
}
Expand Down
2 changes: 2 additions & 0 deletions crates/gitbutler-core/src/ops/oplog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,8 @@ impl Project {
/// An alternative way of retrieving the snapshots would be to manually the oplog head `git log <oplog_head>` available in `.git/gitbutler/operations-log.toml`.
///
/// If there are no snapshots, an empty list is returned.
/// THIS IS A DOCS FIX
///
pub fn list_snapshots(
&self,
limit: usize,
Expand Down