Commit 4538eef
grep: add submodules as a grep source type
Add `GREP_SOURCE_SUBMODULE` as a grep_source type and cases for this new
type in the various switch statements in grep.c.
When initializing a grep_source with type `GREP_SOURCE_SUBMODULE` the
identifier can either be NULL (to indicate that the working tree will be
used) or a SHA1 (the REV of the submodule to be grep'd). If the
identifier is a SHA1 then we want to fall through to the
`GREP_SOURCE_SHA1` case to handle the copying of the SHA1.
Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent 9ebf689 commit 4538eef
2 files changed
+16
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1735 | 1735 | | |
1736 | 1736 | | |
1737 | 1737 | | |
| 1738 | + | |
| 1739 | + | |
| 1740 | + | |
| 1741 | + | |
| 1742 | + | |
| 1743 | + | |
| 1744 | + | |
| 1745 | + | |
| 1746 | + | |
| 1747 | + | |
1738 | 1748 | | |
1739 | 1749 | | |
1740 | 1750 | | |
1741 | 1751 | | |
1742 | 1752 | | |
1743 | 1753 | | |
| 1754 | + | |
1744 | 1755 | | |
1745 | 1756 | | |
1746 | 1757 | | |
| |||
1760 | 1771 | | |
1761 | 1772 | | |
1762 | 1773 | | |
| 1774 | + | |
1763 | 1775 | | |
1764 | 1776 | | |
1765 | 1777 | | |
| |||
1831 | 1843 | | |
1832 | 1844 | | |
1833 | 1845 | | |
| 1846 | + | |
| 1847 | + | |
1834 | 1848 | | |
1835 | | - | |
| 1849 | + | |
1836 | 1850 | | |
1837 | 1851 | | |
1838 | 1852 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
| 164 | + | |
164 | 165 | | |
165 | 166 | | |
166 | 167 | | |
| |||
0 commit comments