Commit 0a93fb8
committed
grep: teach --untracked and --exclude-standard options
In a working tree of a git managed repository, "grep --untracked" would
find the specified patterns from files in untracked files in addition to
its usual behaviour of finding them in the tracked files.
By default, when working with "--no-index" option, "grep" does not pay
attention to .gitignore mechanism. "grep --no-index --exclude-standard"
can be used to tell the command to use .gitignore and stop reporting hits
from files that would be ignored. Also, when working without "--no-index",
"grep" honors .gitignore mechanism, and "grep --no-exclude-standard" can
be used to tell the command to include hits from files that are ignored.
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent a9e6436 commit 0a93fb8
3 files changed
+65
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
39 | 52 | | |
40 | 53 | | |
41 | 54 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
646 | 646 | | |
647 | 647 | | |
648 | 648 | | |
649 | | - | |
| 649 | + | |
650 | 650 | | |
651 | 651 | | |
652 | 652 | | |
653 | 653 | | |
654 | 654 | | |
| 655 | + | |
| 656 | + | |
655 | 657 | | |
656 | 658 | | |
657 | 659 | | |
| |||
749 | 751 | | |
750 | 752 | | |
751 | 753 | | |
752 | | - | |
| 754 | + | |
753 | 755 | | |
754 | 756 | | |
755 | 757 | | |
| |||
764 | 766 | | |
765 | 767 | | |
766 | 768 | | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
767 | 773 | | |
768 | 774 | | |
769 | 775 | | |
| |||
950 | 956 | | |
951 | 957 | | |
952 | 958 | | |
953 | | - | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
954 | 963 | | |
955 | | - | |
956 | | - | |
| 964 | + | |
957 | 965 | | |
958 | | - | |
959 | | - | |
| 966 | + | |
| 967 | + | |
960 | 968 | | |
961 | 969 | | |
962 | 970 | | |
963 | 971 | | |
964 | 972 | | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
965 | 976 | | |
966 | 977 | | |
967 | 978 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
455 | 455 | | |
456 | 456 | | |
457 | 457 | | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
458 | 475 | | |
459 | 476 | | |
460 | 477 | | |
| |||
465 | 482 | | |
466 | 483 | | |
467 | 484 | | |
468 | | - | |
469 | 485 | | |
470 | 486 | | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
471 | 491 | | |
472 | 492 | | |
473 | 493 | | |
| |||
476 | 496 | | |
477 | 497 | | |
478 | 498 | | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
479 | 503 | | |
480 | 504 | | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
481 | 509 | | |
482 | 510 | | |
483 | 511 | | |
| 512 | + | |
484 | 513 | | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
485 | 517 | | |
486 | 518 | | |
487 | 519 | | |
| |||
0 commit comments