Roxen.git / server / tools / git-rxnpatch

version» Context lines:

Roxen.git/server/tools/git-rxnpatch:1642:    foreach(git("ls-tree", "--full-tree", "-r", "-z", head_sha1,    "--", subtree_prefix)/"\0",    string line) {    if (!has_suffix(line, ".distignore")) continue;    array(string) a = line/"\t";    string path = a[1..]*"\t";    if (!has_suffix(path, "/.distignore") && (path != ".distignore")) continue;    string distignore = replace(git_cat_file(head_sha1, path), "\r", "\n");    path = path[sizeof(subtree_prefix)..];    string dir = path_prefix + dirname(path); -  if (distignore == "") { -  distignore_prefixes += ({ dir }); -  } else { +     foreach(distignore/"\n" - ({""}), string path) {    path = (path/"#")[0];    if (path == "") continue;    if (has_suffix(path, "*")) path = path[..sizeof(path)-2];    distignore_prefixes += ({ combine_path(dir, path) });    }    } -  } +     distignore_prefixes = Array.uniq(distignore_prefixes);       // Set up suitable diff options, so that we can expand Id-strings.    if (!git_try("config", "diff.expand-ident.textconv")) {    // NB: Use string concat to avoid erroneous self-replacement here.    git("config", "diff.expand-ident.textconv",    "sed -e \"s/\\\\\\$"    "Id\\\\\\$/\\$"    "Id: `git hash-object \"$1\"` \\$/g\" < \"$1\"");    // git("config", "xfuncname", "");