void load_ref_decorations(int flags) { static int loaded; if (!loaded) { loaded = 1; for_each_ref(add_ref_decoration, &flags); head_ref(add_ref_decoration, &flags); } }
void load_ref_decorations(int flags) { static int loaded; if (!loaded) { loaded = 1; for_each_ref(add_ref_decoration, &flags); head_ref(add_ref_decoration, &flags); for_each_commit_graft(add_graft_decoration, NULL); } }
void load_ref_decorations(int flags) { if (!decoration_loaded) { decoration_loaded = 1; decoration_flags = flags; for_each_ref(add_ref_decoration, NULL); head_ref(add_ref_decoration, NULL); for_each_commit_graft(add_graft_decoration, NULL); } }
static void upload_pack(void) { if (advertise_refs || !stateless_rpc) { reset_timeout(); head_ref(send_ref, NULL); for_each_ref(send_ref, NULL); packet_flush(1); } else { head_ref(mark_our_ref, NULL); for_each_ref(mark_our_ref, NULL); } if (advertise_refs) return; receive_needs(); if (want_obj.nr) { get_common_commits(); create_pack_file(); } }
static void upload_pack(void) { reset_timeout(); head_ref(send_ref, NULL); for_each_ref(send_ref, NULL); packet_flush(1); receive_needs(); if (want_obj.nr) { get_common_commits(); create_pack_file(); } }
int cmd_show_ref(int argc, const char **argv, const char *prefix) { if (argc == 2 && !strcmp(argv[1], "-h")) usage_with_options(show_ref_usage, show_ref_options); argc = parse_options(argc, argv, prefix, show_ref_options, show_ref_usage, PARSE_OPT_NO_INTERNAL_HELP); if (exclude_arg) return exclude_existing(exclude_existing_arg); pattern = argv; if (!*pattern) pattern = NULL; if (verify) { if (!pattern) die("--verify requires a reference"); while (*pattern) { unsigned char sha1[20]; if (!prefixcmp(*pattern, "refs/") && !read_ref(*pattern, sha1)) { if (!quiet) show_one(*pattern, sha1); } else if (!quiet) die("'%s' - not a valid ref", *pattern); else return 1; pattern++; } return 0; } if (show_head) head_ref(show_ref, NULL); for_each_ref(show_ref, NULL); if (!found_match) { if (verify && !quiet) die("No match"); return 1; } return 0; }
int cmd_show_ref(int argc, const char **argv, const char *prefix) { git_config(git_default_config, NULL); argc = parse_options(argc, argv, prefix, show_ref_options, show_ref_usage, 0); if (exclude_arg) return exclude_existing(exclude_existing_arg); pattern = argv; if (!*pattern) pattern = NULL; if (verify) { if (!pattern) die("--verify requires a reference"); while (*pattern) { struct object_id oid; if ((starts_with(*pattern, "refs/") || !strcmp(*pattern, "HEAD")) && !read_ref(*pattern, &oid)) { show_one(*pattern, &oid); } else if (!quiet) die("'%s' - not a valid ref", *pattern); else return 1; pattern++; } return 0; } if (show_head) head_ref(show_ref, NULL); for_each_ref(show_ref, NULL); if (!found_match) { if (verify && !quiet) die("No match"); return 1; } return 0; }