##// END OF EJS Templates
rust-dirstate-entry: add `modified` method...
Raphaël Gomès -
r50029:c6c1caf2 default
parent child Browse files
Show More
@@ -417,6 +417,11 b' impl DirstateEntry {'
417 self.flags.contains(Flags::WDIR_TRACKED) && !self.in_either_parent()
417 self.flags.contains(Flags::WDIR_TRACKED) && !self.in_either_parent()
418 }
418 }
419
419
420 pub fn modified(&self) -> bool {
421 self.flags
422 .contains(Flags::WDIR_TRACKED | Flags::P1_TRACKED | Flags::P2_INFO)
423 }
424
420 pub fn maybe_clean(&self) -> bool {
425 pub fn maybe_clean(&self) -> bool {
421 if !self.flags.contains(Flags::WDIR_TRACKED) {
426 if !self.flags.contains(Flags::WDIR_TRACKED) {
422 false
427 false
@@ -463,10 +468,7 b' impl DirstateEntry {'
463 }
468 }
464 if self.removed() {
469 if self.removed() {
465 EntryState::Removed
470 EntryState::Removed
466 } else if self
471 } else if self.modified() {
467 .flags
468 .contains(Flags::WDIR_TRACKED | Flags::P1_TRACKED | Flags::P2_INFO)
469 {
470 EntryState::Merged
472 EntryState::Merged
471 } else if self.added() {
473 } else if self.added() {
472 EntryState::Added
474 EntryState::Added
General Comments 0
You need to be logged in to leave comments. Login now