MCPcopy Create free account
hub / github.com/git/git / grep_splice_or

Function grep_splice_or

grep.c:753–768  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

751}
752
753static struct grep_expr *grep_splice_or(struct grep_expr *x, struct grep_expr *y)
754{
755 struct grep_expr *z = x;
756
757 while (x) {
758 assert(x->node == GREP_NODE_OR);
759 if (x->u.binary.right &&
760 x->u.binary.right->node == GREP_NODE_TRUE) {
761 free(x->u.binary.right);
762 x->u.binary.right = y;
763 break;
764 }
765 x = x->u.binary.right;
766 }
767 return z;
768}
769
770void compile_grep_patterns(struct grep_opt *opt)
771{

Callers 1

compile_grep_patternsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected