githelper.git / githelper.pike

version» Context lines:

githelper.git/githelper.pike:359:    {    return get_committed_file("HEAD", filename, allow_empty);    }       int check_attributes_staged()    {    // We don't allow .gitattributes to differ between wt and index,    // because that could mean the committed stuff ends up with different    // attributes than they have right now...    -  if (sizeof(run_git("diff", "--name-only", ".gitattributes"))) { +  if (sizeof(run_git("diff", "--name-only", "--", ".gitattributes"))) {    write("You have unstaged changes to .gitattributes.\n"    "Please add or stash them before commit.\n");    return 1;    }    }       int hook()    {    files_to_commit =    split_z(run_git("diff", "--staged", "--name-only", "-z"));