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

Function handle_dotdot

revision.c:2119–2145  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2117}
2118
2119static int handle_dotdot(const char *arg,
2120 struct rev_info *revs, int flags,
2121 int cant_be_filename)
2122{
2123 struct object_context a_oc = {0}, b_oc = {0};
2124 const char *dotdot = strstr(arg, "..");
2125 char *tmp;
2126 int symmetric = 0;
2127 int ret;
2128
2129 if (!dotdot)
2130 return -1;
2131
2132 tmp = xmemdupz(arg, dotdot - arg);
2133 dotdot += 2;
2134 if (*dotdot == '.') {
2135 symmetric = 1;
2136 dotdot++;
2137 }
2138 ret = handle_dotdot_1(tmp, dotdot, arg, symmetric, revs, flags,
2139 cant_be_filename, &a_oc, &b_oc);
2140 free(tmp);
2141
2142 object_context_release(&a_oc);
2143 object_context_release(&b_oc);
2144 return ret;
2145}
2146
2147static int handle_revision_arg_1(const char *arg_, struct rev_info *revs, int flags, unsigned revarg_opt)
2148{

Callers 1

handle_revision_arg_1Function · 0.85

Calls 3

xmemdupzFunction · 0.85
handle_dotdot_1Function · 0.85
object_context_releaseFunction · 0.85

Tested by

no test coverage detected