Commit 98d9b23
mingw: short-circuit the conversion of
In the next commit, we want to disallow accessing any path that contains
any segment that is equivalent to `NUL`. In particular, we want to
disallow accessing `NUL` (e.g. to prevent any repository from being
checked out that contains a file called `NUL`, as that is not a valid
file name on Windows).
However, there are legitimate use cases within Git itself to write to
the Null device. As Git is really a Linux project, it does not abstract
that idea, though, but instead uses `/dev/null` to describe this
intention.
So let's side-step the validation _specifically_ in the case that we
want to write to (or read from) `/dev/null`, via a dedicated short-cut
in the code that skips the call to `validate_win32_path()`.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>/dev/null to UTF-161 parent 53a06cf commit 98d9b23
1 file changed
+16
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
484 | 484 | | |
485 | 485 | | |
486 | 486 | | |
487 | | - | |
488 | | - | |
489 | | - | |
490 | 487 | | |
491 | 488 | | |
492 | 489 | | |
493 | 490 | | |
494 | 491 | | |
495 | | - | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
496 | 495 | | |
| 496 | + | |
497 | 497 | | |
498 | 498 | | |
499 | 499 | | |
| |||
556 | 556 | | |
557 | 557 | | |
558 | 558 | | |
559 | | - | |
560 | | - | |
561 | | - | |
| 559 | + | |
| 560 | + | |
562 | 561 | | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
563 | 566 | | |
564 | 567 | | |
565 | 568 | | |
| |||
583 | 586 | | |
584 | 587 | | |
585 | 588 | | |
586 | | - | |
587 | | - | |
588 | | - | |
| 589 | + | |
| 590 | + | |
589 | 591 | | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
590 | 596 | | |
591 | 597 | | |
592 | 598 | | |
| |||
0 commit comments