Commit e7b432c
committed
revision: introduce --exclude=<glob> to tame wildcards
People often find "git log --branches" etc. that includes _all_
branches is cumbersome to use when they want to grab most but except
some. The same applies to --tags, --all and --glob.
Teach the revision machinery to remember patterns, and then upon the
next such a globbing option, exclude those that match the pattern.
With this, I can view only my integration branches (e.g. maint,
master, etc.) without topic branches, which are named after two
letters from primary authors' names, slash and topic name.
git rev-list --no-walk --exclude=??/* --branches |
git name-rev --refs refs/heads/* --stdin
This one shows things reachable from local and remote branches that
have not been merged to the integration branches.
git log --remotes --branches --not --exclude=??/* --branches
It may be a bit rough around the edges, in that the pattern to give
the exclude option depends on what globbing option follows. In
these examples, the pattern "??/*" is used, not "refs/heads/??/*",
because the globbing option that follows the -"-exclude=<pattern>"
is "--branches". As each use of globbing option resets previously
set "--exclude", this may not be such a bad thing, though.
Signed-off-by: Junio C Hamano <[email protected]>1 parent e230c56 commit e7b432c
2 files changed
+51
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1180 | 1180 | | |
1181 | 1181 | | |
1182 | 1182 | | |
| 1183 | + | |
| 1184 | + | |
| 1185 | + | |
| 1186 | + | |
| 1187 | + | |
| 1188 | + | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
1183 | 1196 | | |
1184 | 1197 | | |
1185 | 1198 | | |
1186 | | - | |
1187 | | - | |
| 1199 | + | |
| 1200 | + | |
| 1201 | + | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
1188 | 1205 | | |
1189 | 1206 | | |
1190 | 1207 | | |
| |||
1197 | 1214 | | |
1198 | 1215 | | |
1199 | 1216 | | |
| 1217 | + | |
| 1218 | + | |
| 1219 | + | |
| 1220 | + | |
| 1221 | + | |
| 1222 | + | |
| 1223 | + | |
| 1224 | + | |
| 1225 | + | |
| 1226 | + | |
| 1227 | + | |
| 1228 | + | |
| 1229 | + | |
| 1230 | + | |
| 1231 | + | |
| 1232 | + | |
| 1233 | + | |
| 1234 | + | |
1200 | 1235 | | |
1201 | 1236 | | |
1202 | 1237 | | |
| |||
1953 | 1988 | | |
1954 | 1989 | | |
1955 | 1990 | | |
| 1991 | + | |
1956 | 1992 | | |
1957 | 1993 | | |
| 1994 | + | |
1958 | 1995 | | |
1959 | 1996 | | |
1960 | 1997 | | |
1961 | 1998 | | |
1962 | 1999 | | |
1963 | 2000 | | |
| 2001 | + | |
1964 | 2002 | | |
1965 | 2003 | | |
| 2004 | + | |
1966 | 2005 | | |
1967 | 2006 | | |
1968 | 2007 | | |
1969 | 2008 | | |
| 2009 | + | |
| 2010 | + | |
| 2011 | + | |
| 2012 | + | |
1970 | 2013 | | |
1971 | 2014 | | |
1972 | 2015 | | |
1973 | 2016 | | |
1974 | 2017 | | |
| 2018 | + | |
1975 | 2019 | | |
1976 | 2020 | | |
1977 | 2021 | | |
1978 | 2022 | | |
| 2023 | + | |
1979 | 2024 | | |
1980 | 2025 | | |
1981 | 2026 | | |
1982 | 2027 | | |
| 2028 | + | |
1983 | 2029 | | |
1984 | 2030 | | |
1985 | 2031 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
62 | 65 | | |
63 | 66 | | |
64 | 67 | | |
| |||
0 commit comments