Commit 33eb4dd
apply: handle filenames with double slashes better
When there are duplicated slashes in pathnames, like this:
--- a/perl//Git.pm
+++ b/perl//Git.pm
@@ -1358,3 +1358,4 @@
1; # Famous last words
+# test
the paths gleaned from the patch header won't be found in the index and
cause "apply --index" and "apply --cached" to fail.
Fix this by squashing the duplicated slashes upon input.
Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent 7a7eb51 commit 33eb4dd
1 file changed
Lines changed: 20 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
320 | 320 | | |
321 | 321 | | |
322 | 322 | | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
323 | 337 | | |
324 | 338 | | |
325 | 339 | | |
| |||
349 | 363 | | |
350 | 364 | | |
351 | 365 | | |
352 | | - | |
| 366 | + | |
353 | 367 | | |
354 | 368 | | |
355 | 369 | | |
| |||
369 | 383 | | |
370 | 384 | | |
371 | 385 | | |
372 | | - | |
| 386 | + | |
373 | 387 | | |
374 | 388 | | |
375 | | - | |
| 389 | + | |
376 | 390 | | |
377 | 391 | | |
378 | 392 | | |
| |||
383 | 397 | | |
384 | 398 | | |
385 | 399 | | |
386 | | - | |
| 400 | + | |
387 | 401 | | |
388 | 402 | | |
389 | 403 | | |
| |||
392 | 406 | | |
393 | 407 | | |
394 | 408 | | |
395 | | - | |
| 409 | + | |
396 | 410 | | |
397 | 411 | | |
398 | | - | |
| 412 | + | |
399 | 413 | | |
400 | 414 | | |
401 | 415 | | |
| |||
0 commit comments