Merge branch 'jc/ref-excludes'
People often wished a way to tell "git log --branches" (and "git log --remotes --not --branches") to exclude some local branches from the expansion of "--branches" (similarly for "--tags", "--all" and "--glob=<pattern>"). Now they have one. * jc/ref-excludes: rev-parse: introduce --exclude=<glob> to tame wildcards rev-list --exclude: export add/clear-ref-exclusion and ref-excluded API rev-list --exclude: tests document --exclude option revision: introduce --exclude=<glob> to tame wildcards
This commit is contained in:
@ -61,6 +61,9 @@ struct rev_info {
|
||||
/* The end-points specified by the end user */
|
||||
struct rev_cmdline_info cmdline;
|
||||
|
||||
/* excluding from --branches, --refs, etc. expansion */
|
||||
struct string_list *ref_excludes;
|
||||
|
||||
/* Basic information */
|
||||
const char *prefix;
|
||||
const char *def;
|
||||
@ -194,6 +197,11 @@ struct rev_info {
|
||||
struct saved_parents *saved_parents_slab;
|
||||
};
|
||||
|
||||
extern int ref_excluded(struct string_list *, const char *path);
|
||||
void clear_ref_exclusion(struct string_list **);
|
||||
void add_ref_exclusion(struct string_list **, const char *exclude);
|
||||
|
||||
|
||||
#define REV_TREE_SAME 0
|
||||
#define REV_TREE_NEW 1 /* Only new files */
|
||||
#define REV_TREE_OLD 2 /* Only files removed */
|
||||
|
Reference in New Issue
Block a user