Commit 6bb6907
builtin/update-index.c: cleanup update_one
do_reupdate calls update_one with a cache_entry.name, there's no need for
the extra sanitation / normalization that happens in prefix_path.
cmd_update_index calls update_one with an already prefixed path, no need to
prefix_path twice.
Remove the extra prefix_path from update_one. Also remove the now unused
'prefix' and 'prefix_length' parameters.
As of d089eba "setup: sanitize absolute and funny paths in get_pathspec()",
prefix_path uncoditionally returns a copy, even if the passed in path isn't
changed. Lets unconditionally free() the result.
Signed-off-by: Karsten Blees <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>1 parent e837af6 commit 6bb6907
1 file changed
+15
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
274 | 274 | | |
275 | 275 | | |
276 | 276 | | |
277 | | - | |
| 277 | + | |
278 | 278 | | |
279 | | - | |
280 | | - | |
| 279 | + | |
281 | 280 | | |
282 | | - | |
| 281 | + | |
283 | 282 | | |
284 | 283 | | |
285 | | - | |
| 284 | + | |
286 | 285 | | |
287 | | - | |
| 286 | + | |
288 | 287 | | |
289 | 288 | | |
290 | | - | |
| 289 | + | |
291 | 290 | | |
292 | | - | |
| 291 | + | |
293 | 292 | | |
294 | 293 | | |
295 | 294 | | |
296 | | - | |
| 295 | + | |
297 | 296 | | |
298 | 297 | | |
299 | | - | |
| 298 | + | |
300 | 299 | | |
301 | | - | |
| 300 | + | |
302 | 301 | | |
303 | 302 | | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | 303 | | |
308 | 304 | | |
309 | 305 | | |
| |||
579 | 575 | | |
580 | 576 | | |
581 | 577 | | |
582 | | - | |
| 578 | + | |
583 | 579 | | |
584 | 580 | | |
585 | 581 | | |
| |||
836 | 832 | | |
837 | 833 | | |
838 | 834 | | |
839 | | - | |
| 835 | + | |
840 | 836 | | |
841 | 837 | | |
842 | | - | |
843 | | - | |
| 838 | + | |
844 | 839 | | |
845 | 840 | | |
846 | 841 | | |
| |||
879 | 874 | | |
880 | 875 | | |
881 | 876 | | |
882 | | - | |
| 877 | + | |
883 | 878 | | |
884 | 879 | | |
885 | | - | |
886 | | - | |
| 880 | + | |
887 | 881 | | |
888 | 882 | | |
889 | 883 | | |
| |||
0 commit comments