githelper.git
/
githelper.pike
version
»
Context lines:
10
20
40
80
file
none
3
githelper.git/githelper.pike:560:
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 check_not_tracking() {
-
string local_branch = run_git("symbolic-ref", "HEAD");
+
string local_branch = run_git
_ex
(
128,
"symbolic-ref", "HEAD");
+
if (local_branch == "") {
+
return 0;
+
}
if (!has_prefix(local_branch, "refs/heads/")) { write("Attempt to commit to non-branch: %s.\n", local_branch); } if (has_prefix(local_branch, "refs/heads/tracking/")) { write("Attempt to commit to tracking branch.\n"); return 1; } local_branch = local_branch[sizeof("refs/heads/")..]; if (has_suffix(local_branch, "\n")) { local_branch = local_branch[..<1];