✨ Add `--only-untracked (-U)` to status subcommand
Dependencies
- [2]
I52XSRUHMassive cleanup, and simplification - [3]
5BB266P6Optional colours in the global config file - [4]
HSEYMLO2Adding an untracked change iterator - [5]
NWU66ZIPUntracked files when there are no other changes - [6]
EWZ7VHV4pijul diff: Do not ignore the --untracked option in presence of --short. - [7]
J33DKFPMDo not traverse unindexed directories in `pijul diff -su` - [8]
IBLJI7IA✨ Add `pijul status` subcommand - [9]
YQJRT2UB✨ Add current channel to pijul status output - [10]
CQKIS7KR♻️ Refactor status command's handling of repo and channel - [11]
SXEYMYF7Fixing the bad changes in history (unfortunately, by rebooting). - [12]
RAS4PCNU"Touch" the channel after `pijul diff` if the diff and the prefixes are both empty
Change contents
- edit in pijul/src/commands/status.rs at line 20
/// Show only untracked files#[clap(short = 'U', long = "only-untracked")]pub only_untracked: bool, - edit in pijul/src/commands/status.rs at line 33
let txn = repo.pristine.txn_begin()?; - replacement in pijul/src/commands/status.rs at line 35
let current = txn.current_channel().ok();writeln!(stdout,"{}",current.map_or_else(|| "Not on a channel".into(), |c| format!("On channel: {c}")))?;{let txn = repo.pristine.txn_begin()?;let current = txn.current_channel().ok();writeln!(stdout,"{}",current.map_or_else(|| "Not on a channel".into(), |c| format!("On channel: {c}")))?;}if self.only_untracked {let txn = repo.pristine.arc_txn_begin()?;return super::diff::print_untracked_files(&repo, txn);} - replacement in pijul/src/commands/diff.rs at line 133
for path in untracked(&repo, txn.clone())? {writeln!(stdout, "U {}", path?.to_str().unwrap())?;}print_untracked_files(&repo, txn.clone())?; - replacement in pijul/src/commands/diff.rs at line 284
for path in untracked(&repo, txn.clone())? {writeln!(stdout, "U {}", path?.to_str().unwrap())?;}print_untracked_files(&repo, txn.clone())?; - edit in pijul/src/commands/diff.rs at line 414
}pub fn print_untracked_files<T: TxnTExt + Send + Sync + 'static>(repo: &Repository,txn: libpijul::ArcTxn<T>,) -> Result<(), anyhow::Error> {let mut stdout = std::io::stdout();for path in untracked(&repo, txn)? {writeln!(stdout, "U {}", path?.to_str().unwrap())?;}Ok(())