Show More
@@ -92,7 +92,7 b' pub fn pack_dirstate(' | |||
|
92 | 92 | .iter() |
|
93 | 93 | .map(|(filename, _)| { |
|
94 | 94 | let mut length = MIN_ENTRY_SIZE + filename.len(); |
|
95 |
if let Some( |
|
|
95 | if let Some(copy) = copy_map.get(filename) { | |
|
96 | 96 | length += copy.len() + 1; |
|
97 | 97 | } |
|
98 | 98 | length |
@@ -106,8 +106,8 b' pub fn pack_dirstate(' | |||
|
106 | 106 | packed.extend(&parents.p1); |
|
107 | 107 | packed.extend(&parents.p2); |
|
108 | 108 | |
|
109 |
for ( |
|
|
110 |
let mut new_filename: Vec<u8> = filename.to_ |
|
|
109 | for (filename, entry) in state_map.iter() { | |
|
110 | let mut new_filename: Vec<u8> = filename.to_owned(); | |
|
111 | 111 | let mut new_mtime: i32 = entry.mtime; |
|
112 | 112 | if entry.state == EntryState::Normal && entry.mtime == now { |
|
113 | 113 | // The file was last modified "simultaneously" with the current |
@@ -121,7 +121,7 b' pub fn pack_dirstate(' | |||
|
121 | 121 | // mistakenly treating such files as clean. |
|
122 | 122 | new_mtime = -1; |
|
123 | 123 | new_state_map.push(( |
|
124 |
filename.to_owned() |
|
|
124 | filename.to_owned(), | |
|
125 | 125 | DirstateEntry { |
|
126 | 126 | mtime: new_mtime, |
|
127 | 127 | ..*entry |
@@ -129,7 +129,7 b' pub fn pack_dirstate(' | |||
|
129 | 129 | )); |
|
130 | 130 | } |
|
131 | 131 | |
|
132 |
if let Some(copy) = copy_map.get( |
|
|
132 | if let Some(copy) = copy_map.get(filename) { | |
|
133 | 133 | new_filename.push('\0' as u8); |
|
134 | 134 | new_filename.extend(copy); |
|
135 | 135 | } |
General Comments 0
You need to be logged in to leave comments.
Login now