diff options
author | Vincent Ambo <mail@tazj.in> | 2021-09-21T10·03+0300 |
---|---|---|
committer | Vincent Ambo <mail@tazj.in> | 2021-09-21T11·29+0300 |
commit | 43b1791ec601732ac31195df96781a848360a9ac (patch) | |
tree | daae8d638343295d2f1f7da955e556ef4c958864 /third_party/git/t/lib-patch-mode.sh | |
parent | 2d8e7dc9d9c38127ec4ebd13aee8e8f586a43318 (diff) |
chore(3p/git): Unvendor git and track patches instead r/2903
This was vendored a long time ago under the expectation that keeping it in sync with cgit would be easier this way, but it has proven not to be a big issue. On the other hand, a vendored copy of git is an annoying maintenance burden. It is much easier to rebase the single (dottime) patch that we have. This removes the vendored copy of git and instead passes the git source code to cgit via `pkgs.srcOnly`, which includes the applied patch so that cgit can continue rendering dottime. Change-Id: If31f62dea7ce688fd1b9050204e9378019775f2b
Diffstat (limited to 'third_party/git/t/lib-patch-mode.sh')
-rw-r--r-- | third_party/git/t/lib-patch-mode.sh | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/third_party/git/t/lib-patch-mode.sh b/third_party/git/t/lib-patch-mode.sh deleted file mode 100644 index cfd76bf987bd..000000000000 --- a/third_party/git/t/lib-patch-mode.sh +++ /dev/null @@ -1,50 +0,0 @@ -: included from t2016 and others - -. ./test-lib.sh - -# set_state <path> <worktree-content> <index-content> -# -# Prepare the content for path in worktree and the index as specified. -set_state () { - echo "$3" > "$1" && - git add "$1" && - echo "$2" > "$1" -} - -# save_state <path> -# -# Save index/worktree content of <path> in the files _worktree_<path> -# and _index_<path> -save_state () { - noslash="$(echo "$1" | tr / _)" && - cat "$1" > _worktree_"$noslash" && - git show :"$1" > _index_"$noslash" -} - -# set_and_save_state <path> <worktree-content> <index-content> -set_and_save_state () { - set_state "$@" && - save_state "$1" -} - -# verify_state <path> <expected-worktree-content> <expected-index-content> -verify_state () { - test "$(cat "$1")" = "$2" && - test "$(git show :"$1")" = "$3" -} - -# verify_saved_state <path> -# -# Call verify_state with expected contents from the last save_state -verify_saved_state () { - noslash="$(echo "$1" | tr / _)" && - verify_state "$1" "$(cat _worktree_"$noslash")" "$(cat _index_"$noslash")" -} - -save_head () { - git rev-parse HEAD > _head -} - -verify_saved_head () { - test "$(cat _head)" = "$(git rev-parse HEAD)" -} |