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/helper/test-dump-untracked-cache.c | |
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/helper/test-dump-untracked-cache.c')
-rw-r--r-- | third_party/git/t/helper/test-dump-untracked-cache.c | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/third_party/git/t/helper/test-dump-untracked-cache.c b/third_party/git/t/helper/test-dump-untracked-cache.c deleted file mode 100644 index cf0f2c7228e8..000000000000 --- a/third_party/git/t/helper/test-dump-untracked-cache.c +++ /dev/null @@ -1,66 +0,0 @@ -#define USE_THE_INDEX_COMPATIBILITY_MACROS -#include "test-tool.h" -#include "cache.h" -#include "dir.h" - -static int compare_untracked(const void *a_, const void *b_) -{ - const char *const *a = a_; - const char *const *b = b_; - return strcmp(*a, *b); -} - -static int compare_dir(const void *a_, const void *b_) -{ - const struct untracked_cache_dir *const *a = a_; - const struct untracked_cache_dir *const *b = b_; - return strcmp((*a)->name, (*b)->name); -} - -static void dump(struct untracked_cache_dir *ucd, struct strbuf *base) -{ - int i, len; - QSORT(ucd->untracked, ucd->untracked_nr, compare_untracked); - QSORT(ucd->dirs, ucd->dirs_nr, compare_dir); - len = base->len; - strbuf_addf(base, "%s/", ucd->name); - printf("%s %s", base->buf, - oid_to_hex(&ucd->exclude_oid)); - if (ucd->recurse) - fputs(" recurse", stdout); - if (ucd->check_only) - fputs(" check_only", stdout); - if (ucd->valid) - fputs(" valid", stdout); - printf("\n"); - for (i = 0; i < ucd->untracked_nr; i++) - printf("%s\n", ucd->untracked[i]); - for (i = 0; i < ucd->dirs_nr; i++) - dump(ucd->dirs[i], base); - strbuf_setlen(base, len); -} - -int cmd__dump_untracked_cache(int ac, const char **av) -{ - struct untracked_cache *uc; - struct strbuf base = STRBUF_INIT; - - /* Hack to avoid modifying the untracked cache when we read it */ - ignore_untracked_cache_config = 1; - - setup_git_directory(); - if (read_cache() < 0) - die("unable to read index file"); - uc = the_index.untracked; - if (!uc) { - printf("no untracked cache\n"); - return 0; - } - printf("info/exclude %s\n", oid_to_hex(&uc->ss_info_exclude.oid)); - printf("core.excludesfile %s\n", oid_to_hex(&uc->ss_excludes_file.oid)); - printf("exclude_per_dir %s\n", uc->exclude_per_dir); - printf("flags %08x\n", uc->dir_flags); - if (uc->root) - dump(uc->root, &base); - return 0; -} |