Commit 7c67d2a
diff: return diff_filepair from diff queue helpers
The `diff_addremove()` and `diff_change()` functions set up and queue
diffs, but do not return the `diff_filepair` added to the queue. In a
subsequent commit, modifications to `diff_filepair` need to occur in
certain cases after being queued.
Since the existing `diff_addremove()` and `diff_change()` are also used
for callbacks in `diff_options` as types `add_remove_fn_t` and
`change_fn_t`, modifying the existing function signatures requires
further changes. The diff options for pruning use `file_add_remove()`
and `file_change()` where file pairs do not even get queued. Thus,
separate functions are implemented instead.
Split out the queuing operations into `diff_queue_addremove()` and
`diff_queue_change()` which also return a handle to the queued
`diff_filepair`. Both `diff_addremove()` and `diff_change()` are
reimplemented as thin wrappers around the new functions.
Signed-off-by: Justin Tobler <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>1 parent 08bdfd4 commit 7c67d2a
2 files changed
+75
-20
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7161 | 7161 | | |
7162 | 7162 | | |
7163 | 7163 | | |
7164 | | - | |
7165 | | - | |
7166 | | - | |
7167 | | - | |
7168 | | - | |
| 7164 | + | |
| 7165 | + | |
| 7166 | + | |
| 7167 | + | |
| 7168 | + | |
| 7169 | + | |
| 7170 | + | |
7169 | 7171 | | |
7170 | 7172 | | |
| 7173 | + | |
7171 | 7174 | | |
7172 | 7175 | | |
7173 | | - | |
| 7176 | + | |
7174 | 7177 | | |
7175 | 7178 | | |
7176 | 7179 | | |
| |||
7190 | 7193 | | |
7191 | 7194 | | |
7192 | 7195 | | |
7193 | | - | |
| 7196 | + | |
7194 | 7197 | | |
7195 | 7198 | | |
7196 | 7199 | | |
| |||
7202 | 7205 | | |
7203 | 7206 | | |
7204 | 7207 | | |
7205 | | - | |
| 7208 | + | |
7206 | 7209 | | |
7207 | 7210 | | |
| 7211 | + | |
| 7212 | + | |
7208 | 7213 | | |
7209 | 7214 | | |
7210 | | - | |
7211 | | - | |
7212 | | - | |
7213 | | - | |
7214 | | - | |
7215 | | - | |
7216 | | - | |
| 7215 | + | |
| 7216 | + | |
| 7217 | + | |
| 7218 | + | |
| 7219 | + | |
| 7220 | + | |
| 7221 | + | |
| 7222 | + | |
| 7223 | + | |
7217 | 7224 | | |
7218 | 7225 | | |
7219 | 7226 | | |
7220 | 7227 | | |
7221 | 7228 | | |
7222 | 7229 | | |
7223 | | - | |
| 7230 | + | |
7224 | 7231 | | |
7225 | 7232 | | |
7226 | 7233 | | |
| |||
7231 | 7238 | | |
7232 | 7239 | | |
7233 | 7240 | | |
7234 | | - | |
| 7241 | + | |
7235 | 7242 | | |
7236 | 7243 | | |
7237 | 7244 | | |
7238 | 7245 | | |
7239 | 7246 | | |
7240 | 7247 | | |
7241 | 7248 | | |
7242 | | - | |
| 7249 | + | |
7243 | 7250 | | |
7244 | 7251 | | |
7245 | | - | |
| 7252 | + | |
7246 | 7253 | | |
7247 | 7254 | | |
7248 | 7255 | | |
7249 | 7256 | | |
7250 | 7257 | | |
7251 | | - | |
| 7258 | + | |
7252 | 7259 | | |
7253 | 7260 | | |
7254 | 7261 | | |
| 7262 | + | |
| 7263 | + | |
| 7264 | + | |
| 7265 | + | |
| 7266 | + | |
| 7267 | + | |
| 7268 | + | |
| 7269 | + | |
| 7270 | + | |
| 7271 | + | |
| 7272 | + | |
| 7273 | + | |
| 7274 | + | |
| 7275 | + | |
| 7276 | + | |
| 7277 | + | |
| 7278 | + | |
| 7279 | + | |
| 7280 | + | |
| 7281 | + | |
| 7282 | + | |
| 7283 | + | |
| 7284 | + | |
7255 | 7285 | | |
7256 | 7286 | | |
7257 | 7287 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
508 | 508 | | |
509 | 509 | | |
510 | 510 | | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
511 | 536 | | |
512 | 537 | | |
513 | 538 | | |
| |||
0 commit comments