Commit c59ab2e
connect.c: refactor url parsing
Make the function is_local() in transport.c public, rename it into
url_is_local_not_ssh() and use it in both transport.c and connect.c
Use a protocol "local" for URLs for the local file system.
One note about using file:// under Windows:
The (absolute) path on Unix like system typically starts with "/".
When the host is empty, it can be omitted, so that a shell scriptlet
url=file://$pwd
will give a URL like "file:///home/user/repo".
Windows does not have the same concept of a root directory located in "/".
When parsing the URL allow "file://C:/user/repo"
(even if RFC1738 indicates that "file:///C:/user/repo" should be used).
Signed-off-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent 83b0587 commit c59ab2e
File tree
5 files changed
+48
-37
lines changed- t
5 files changed
+48
-37
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
| 235 | + | |
235 | 236 | | |
236 | 237 | | |
237 | 238 | | |
238 | 239 | | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
239 | 248 | | |
240 | 249 | | |
241 | 250 | | |
242 | 251 | | |
| 252 | + | |
243 | 253 | | |
244 | 254 | | |
245 | 255 | | |
| |||
261 | 271 | | |
262 | 272 | | |
263 | 273 | | |
264 | | - | |
| 274 | + | |
265 | 275 | | |
266 | 276 | | |
267 | 277 | | |
| |||
564 | 574 | | |
565 | 575 | | |
566 | 576 | | |
567 | | - | |
| 577 | + | |
568 | 578 | | |
569 | | - | |
570 | 579 | | |
571 | 580 | | |
572 | 581 | | |
| |||
578 | 587 | | |
579 | 588 | | |
580 | 589 | | |
581 | | - | |
582 | 590 | | |
583 | 591 | | |
584 | | - | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
585 | 596 | | |
586 | 597 | | |
587 | 598 | | |
| |||
597 | 608 | | |
598 | 609 | | |
599 | 610 | | |
600 | | - | |
601 | | - | |
602 | | - | |
603 | | - | |
604 | | - | |
605 | | - | |
606 | | - | |
607 | | - | |
608 | | - | |
609 | | - | |
| 611 | + | |
610 | 612 | | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
611 | 617 | | |
612 | 618 | | |
613 | 619 | | |
| |||
616 | 622 | | |
617 | 623 | | |
618 | 624 | | |
619 | | - | |
620 | | - | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
621 | 630 | | |
622 | 631 | | |
623 | | - | |
624 | | - | |
625 | | - | |
626 | | - | |
627 | | - | |
628 | | - | |
629 | 632 | | |
630 | 633 | | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
631 | 637 | | |
632 | | - | |
633 | | - | |
634 | | - | |
635 | | - | |
| 638 | + | |
636 | 639 | | |
637 | 640 | | |
638 | 641 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
612 | 612 | | |
613 | 613 | | |
614 | 614 | | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
615 | 622 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
362 | 362 | | |
363 | 363 | | |
364 | 364 | | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
365 | 373 | | |
366 | 374 | | |
367 | 375 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
885 | 885 | | |
886 | 886 | | |
887 | 887 | | |
888 | | - | |
889 | | - | |
890 | | - | |
891 | | - | |
892 | | - | |
893 | | - | |
894 | | - | |
895 | | - | |
896 | 888 | | |
897 | 889 | | |
898 | 890 | | |
| |||
941 | 933 | | |
942 | 934 | | |
943 | 935 | | |
944 | | - | |
| 936 | + | |
945 | 937 | | |
946 | 938 | | |
947 | 939 | | |
| |||
1297 | 1289 | | |
1298 | 1290 | | |
1299 | 1291 | | |
1300 | | - | |
| 1292 | + | |
1301 | 1293 | | |
1302 | 1294 | | |
1303 | 1295 | | |
| |||
0 commit comments