| 1016 | #[test] |
| 1017 | #[serial] |
| 1018 | fn test_add_run_all_no_untracked() { |
| 1019 | let _guard = DirGuard::new(); |
| 1020 | |
| 1021 | let temp_dir = tempfile::tempdir().unwrap(); |
| 1022 | let repo_path = temp_dir.path(); |
| 1023 | |
| 1024 | // Initialize repository (no untracked files) |
| 1025 | { |
| 1026 | let _repo = Repository::init(repo_path).unwrap(); |
| 1027 | } |
| 1028 | |
| 1029 | std::env::set_current_dir(repo_path).unwrap(); |
| 1030 | |
| 1031 | let add = Add::new().with_all(true); |
| 1032 | let result = add.run(); |
| 1033 | |
| 1034 | // Should succeed with a message about nothing to add |
| 1035 | assert!( |
| 1036 | result.is_ok(), |
| 1037 | "Add --all with no files failed: {:?}", |
| 1038 | result.err() |
| 1039 | ); |
| 1040 | } |
| 1041 | |
| 1042 | #[test] |
| 1043 | #[serial] |