githelper.git / githelper.pike

version» Context lines:

githelper.git/githelper.pike:148:       if(search(files_to_commit, ".gitattributes")>=0) {    string diff = run_git("diff", "-p", "--cached",    "--", ".gitattributes");    if (sizeof(diff)) {    int pos = search(diff, "\n@@");    if (pos >= 0)    diff = diff[pos+1..];    foreach(diff/"\n", string line)    if(sizeof(line) && search(line, "foreign_ident")>=0 && +  search(line, "[attr]") != 1 &&    (line[0]=='+' || line[0]=='-')) {    int code, len;    string fn;    if(sscanf(line, "%c/%s foreign_ident%n", code, fn, len) != 3 ||    len != sizeof(line)) {    write("Unsupported change of foreign_ident in .gitattributes\n");    return 1;    }    if (code=='-' && search(files_to_commit, fn)<0) {    write("Removed foreign_ident from unstaged file %s\n", fn);