Refactor git command's handling of repo and channel
Dependencies
- [2]
FF4TXHN5In `pijul git`, avoid diffing files not modified by a commit - [3]
A3DMBJJAUpgrading the `git` subcommand to the latest Sanakirja and Libpijul - [4]
SXEYMYF7Fixing the bad changes in history (unfortunately, by rebooting). - [5]
EUZFFJSOUpdating Pijul with the latest changes in Libpijul - [6]
VGBH3ED6The Git feature does not need to be async - [7]
3AZB5NUOFixing the Git feature - [8]
NHO3QO3WReturn a clean error instead of a panic when the channel for a commit is not found in `pijul git` - [9]
IIV3EL2XCleanup, formatting, and fixing the Git feature - [10]
NEJOYVJBFixing the Git feature
Change contents
- edit in pijul/src/commands/git.rs at line 39
use crate::commands::load_channel_exact; - replacement in pijul/src/commands/git.rs at line 46
let repo = if let Ok(repo) = Repository::find_root(self.pijul_path.clone()) {let repo = if let Ok(repo) = Repository::find_root(self.pijul_path.as_deref()) { - replacement in pijul/src/commands/git.rs at line 49
Repository::init(self.pijul_path.clone(), None, None)?Repository::init(self.pijul_path.as_deref(), None, None)? - replacement in pijul/src/commands/git.rs at line 282
let channel = if let Some(c) = txn.read().load_channel(&oid_)? {c} else {bail!("Channel not found: {:?}", oid);};let channel = load_channel_exact(&oid_, &*txn.read())?;