This patch adds a filter to check whether we should
traverse directories, which allows us to traverse them when adding
files, but not when doing a simple pijul diff -su
, improving the
time for that command and uncluttering the output.
J33DKFPM7LLK5V47GXZYJ6LO24VYA77DYHKT4QNPESABETUOVYMQC
BKF5KRLHEQSCEPDSP3H4PAUF4SXZTF4DQKTJI7IBRSRYXD7GWBTAC
RAS4PCNUEODS72Q5LEPVE54AUYWX656ZHTAERRVG2AJ6IHKO4WRAC
TVUSKAR72SYNH53MIQG4GAPX5WEPZ7G2G3D6V42VYYJNOHFSOY6AC
DDJO7X2P2BAJSXPOE6ODKAJM7GRWKPT36WWTUZ373ZWQRYU4CFIAC
V6J6DTJCGVYSL5W7NVSRP5ROIUWTMZW2MBYO7UBZFCUEJQO3ADWQC
SXEYMYF7P4RZMZ46WPL4IZUTSQ2ATBWYZX7QNVMS3SGOYXYOHAGQC
NWU66ZIPZ33WVBFVGVKI67E2F2UDB7QOVDWGRKYO2BAVWG7CMUGQC
EWZ7VHV4N7QNK7GNG3FC6AQ6XVPH4ADJSUQADM7TZFYAD2AYNNTAC
CCLLB7OIFNFYJZTG3UCI7536TOCWSCSXR67VELSB466R24WLJSDAC
I24UEJQLCH2SOXA4UHIYWTRDCHSOPU7AFTRUOTX7HZIAV4AZKYEQC
HSEYMLO2DJCDGBO4F7T6NFMFSZ4TMSOBH5XGIU5NYOEFKUSV5UKAC
3SJ3DJNFDA665FS5RLD3HA5S2RKMB5GTA56MBF77YSOPCOHTFMYAC
3J6IK4W2BA4RJJQYXZOQFU4AQ3WJIM3TUXUNNBIQ6M6TS2JSHT6QC
2RXOCWUWOGHEKHT5W73LAHJSOZVRTOGS7BWLSIGEEEBJGMCZBXQAC
4OCC6D42GZYRDLH3NSKXMJTRKXP7UZ6Z3YNGCNUT7NT6WBDBCBIAC
let mut txn_ = txn.write();
let actions: Vec<_> = rec
.actions
.into_iter()
.map(|rec| rec.globalize(&*txn_).unwrap())
.collect();
let actions: Vec<_> = {
let txn_ = txn.read();
rec.actions
.into_iter()
.map(|rec| rec.globalize(&*txn_).unwrap())
.collect()
};
let (dependencies, extra_known) = if self.tag {
full_dependencies(&*txn_, &channel)?
} else {
dependencies(&*txn_, &*channel.read(), change.changes.iter())?
let (dependencies, extra_known) = {
let txn_ = txn.read();
if self.tag {
full_dependencies(&*txn_, &channel)?
} else {
dependencies(&*txn_, &*channel.read(), change.changes.iter())?
}
.iterate_prefix_rec(repo_path.clone(), repo_path.clone(), false, threads)?
.filter_map(move |x| {
let (path, _) = x.unwrap();
use path_slash::PathExt;
let path_str = path.to_slash_lossy();
if !txn.is_tracked(&path_str).unwrap() {
Some(path)
} else {
None
.iterate_prefix_rec(
repo_path.clone(),
repo_path.clone(),
false,
threads,
move |path, _| {
use path_slash::PathExt;
let path_str = path.to_slash_lossy();
log::debug!("untracked {:?}", path_str);
path_str.is_empty() || txn.read().is_tracked(&path_str).unwrap()
},
)?
.filter_map(move |path| match path {
Err(e) => Some(Err(e)),
Ok((path, _)) => {
use path_slash::PathExt;
let path_str = path.to_slash_lossy();
log::debug!("untracked {:?}", path_str);
if !txn_.read().is_tracked(&path_str).unwrap() {
Some(Ok(path))
} else {
None
}