diff -Nru git-2.19.1/archive.c git-2.19.2/archive.c --- git-2.19.1/archive.c 2018-09-27 20:46:40.000000000 +0000 +++ git-2.19.2/archive.c 2018-11-21 14:58:11.000000000 +0000 @@ -110,7 +110,8 @@ static struct attr_check *check; if (!check) check = attr_check_initl("export-ignore", "export-subst", NULL); - return git_check_attr(istate, path, check) ? NULL : check; + git_check_attr(istate, path, check); + return check; } static int check_attr_export_ignore(const struct attr_check *check) diff -Nru git-2.19.1/attr.c git-2.19.2/attr.c --- git-2.19.1/attr.c 2018-09-27 20:46:40.000000000 +0000 +++ git-2.19.2/attr.c 2018-11-21 14:58:11.000000000 +0000 @@ -1143,9 +1143,9 @@ fill(path, pathlen, basename_offset, check->stack, check->all_attrs, rem); } -int git_check_attr(const struct index_state *istate, - const char *path, - struct attr_check *check) +void git_check_attr(const struct index_state *istate, + const char *path, + struct attr_check *check) { int i; @@ -1158,8 +1158,6 @@ value = ATTR__UNSET; check->items[i].value = value; } - - return 0; } void git_all_attrs(const struct index_state *istate, diff -Nru git-2.19.1/attr.h git-2.19.2/attr.h --- git-2.19.1/attr.h 2018-09-27 20:46:40.000000000 +0000 +++ git-2.19.2/attr.h 2018-11-21 14:58:11.000000000 +0000 @@ -63,8 +63,8 @@ */ const char *git_attr_name(const struct git_attr *); -int git_check_attr(const struct index_state *istate, - const char *path, struct attr_check *check); +void git_check_attr(const struct index_state *istate, + const char *path, struct attr_check *check); /* * Retrieve all attributes that apply to the specified path. diff -Nru git-2.19.1/builtin/add.c git-2.19.2/builtin/add.c --- git-2.19.1/builtin/add.c 2018-09-27 20:46:40.000000000 +0000 +++ git-2.19.2/builtin/add.c 2018-11-21 14:58:11.000000000 +0000 @@ -454,7 +454,7 @@ * Check the "pathspec '%s' did not match any files" block * below before enabling new magic. */ - parse_pathspec(&pathspec, 0, + parse_pathspec(&pathspec, PATHSPEC_ATTR, PATHSPEC_PREFER_FULL | PATHSPEC_SYMLINK_LEADING_PATH, prefix, argv); diff -Nru git-2.19.1/builtin/branch.c git-2.19.2/builtin/branch.c --- git-2.19.1/builtin/branch.c 2018-09-27 20:46:40.000000000 +0000 +++ git-2.19.2/builtin/branch.c 2018-11-21 14:58:11.000000000 +0000 @@ -735,8 +735,7 @@ print_columns(&output, colopts, NULL); string_list_clear(&output, 0); return 0; - } - else if (edit_description) { + } else if (edit_description) { const char *branch_name; struct strbuf branch_ref = STRBUF_INIT; @@ -828,11 +827,6 @@ git_config_set_multivar(buf.buf, NULL, NULL, 1); strbuf_release(&buf); } else if (argc > 0 && argc <= 2) { - struct branch *branch = branch_get(argv[0]); - - if (!branch) - die(_("no such branch '%s'"), argv[0]); - if (filter.kind != FILTER_REFS_BRANCHES) die(_("-a and -r options to 'git branch' do not make sense with a branch name")); diff -Nru git-2.19.1/builtin/cat-file.c git-2.19.2/builtin/cat-file.c --- git-2.19.1/builtin/cat-file.c 2018-09-27 20:46:40.000000000 +0000 +++ git-2.19.2/builtin/cat-file.c 2018-11-21 14:58:11.000000000 +0000 @@ -50,6 +50,13 @@ return 0; } +static int stream_blob(const struct object_id *oid) +{ + if (stream_blob_to_fd(1, oid, NULL, 0)) + die("unable to stream %s to stdout", oid_to_hex(oid)); + return 0; +} + static int cat_one_file(int opt, const char *exp_type, const char *obj_name, int unknown_type) { @@ -131,7 +138,7 @@ } if (type == OBJ_BLOB) - return stream_blob_to_fd(1, &oid, NULL, 0); + return stream_blob(&oid); buf = read_object_file(&oid, &type, &size); if (!buf) die("Cannot read object %s", obj_name); @@ -154,7 +161,7 @@ oidcpy(&blob_oid, &oid); if (oid_object_info(the_repository, &blob_oid, NULL) == OBJ_BLOB) - return stream_blob_to_fd(1, &blob_oid, NULL, 0); + return stream_blob(&blob_oid); /* * we attempted to dereference a tag to a blob * and failed; there may be new dereference @@ -317,8 +324,9 @@ BUG("invalid cmdmode: %c", opt->cmdmode); batch_write(opt, contents, size); free(contents); - } else if (stream_blob_to_fd(1, oid, NULL, 0) < 0) - die("unable to stream %s to stdout", oid_to_hex(oid)); + } else { + stream_blob(oid); + } } else { enum object_type type; diff -Nru git-2.19.1/builtin/check-attr.c git-2.19.2/builtin/check-attr.c --- git-2.19.1/builtin/check-attr.c 2018-09-27 20:46:40.000000000 +0000 +++ git-2.19.2/builtin/check-attr.c 2018-11-21 14:58:11.000000000 +0000 @@ -65,8 +65,7 @@ if (collect_all) { git_all_attrs(&the_index, full_path, check); } else { - if (git_check_attr(&the_index, full_path, check)) - die("git_check_attr died"); + git_check_attr(&the_index, full_path, check); } output_attr(check, file); diff -Nru git-2.19.1/builtin/commit.c git-2.19.2/builtin/commit.c --- git-2.19.1/builtin/commit.c 2018-09-27 20:46:40.000000000 +0000 +++ git-2.19.2/builtin/commit.c 2018-11-21 14:58:11.000000000 +0000 @@ -872,6 +872,7 @@ s->use_color = 0; commitable = run_status(s->fp, index_file, prefix, 1, s); s->use_color = saved_color_setting; + string_list_clear(&s->change, 1); } else { struct object_id oid; const char *parent = "HEAD"; diff -Nru git-2.19.1/builtin/commit-graph.c git-2.19.2/builtin/commit-graph.c --- git-2.19.1/builtin/commit-graph.c 2018-09-27 20:46:40.000000000 +0000 +++ git-2.19.2/builtin/commit-graph.c 2018-11-21 14:58:11.000000000 +0000 @@ -120,6 +120,8 @@ return 0; } +extern int read_replace_refs; + static int graph_write(int argc, const char **argv) { struct string_list *pack_indexes = NULL; @@ -150,6 +152,8 @@ if (!opts.obj_dir) opts.obj_dir = get_object_directory(); + read_replace_refs = 0; + if (opts.reachable) { write_commit_graph_reachable(opts.obj_dir, opts.append); return 0; diff -Nru git-2.19.1/builtin/interpret-trailers.c git-2.19.2/builtin/interpret-trailers.c --- git-2.19.1/builtin/interpret-trailers.c 2018-09-27 20:46:40.000000000 +0000 +++ git-2.19.2/builtin/interpret-trailers.c 2018-11-21 14:58:11.000000000 +0000 @@ -104,6 +104,7 @@ OPT_BOOL(0, "unfold", &opts.unfold, N_("join whitespace-continued values")), { OPTION_CALLBACK, 0, "parse", &opts, NULL, N_("set parsing options"), PARSE_OPT_NOARG | PARSE_OPT_NONEG, parse_opt_parse }, + OPT_BOOL(0, "no-divider", &opts.no_divider, N_("do not treat --- specially")), OPT_CALLBACK(0, "trailer", &trailers, N_("trailer"), N_("trailer(s) to add"), option_parse_trailer), OPT_END() diff -Nru git-2.19.1/builtin/pack-objects.c git-2.19.2/builtin/pack-objects.c --- git-2.19.1/builtin/pack-objects.c 2018-09-27 20:46:40.000000000 +0000 +++ git-2.19.2/builtin/pack-objects.c 2018-11-21 14:58:11.000000000 +0000 @@ -951,8 +951,7 @@ if (!check) check = attr_check_initl("delta", NULL); - if (git_check_attr(&the_index, path, check)) - return 0; + git_check_attr(&the_index, path, check); if (ATTR_FALSE(check->items[0].value)) return 1; return 0; @@ -2299,7 +2298,6 @@ pthread_mutex_init(&cache_mutex, NULL); pthread_mutex_init(&progress_mutex, NULL); pthread_cond_init(&progress_cond, NULL); - pthread_mutex_init(&to_pack.lock, NULL); old_try_to_free_routine = set_try_to_free_routine(try_to_free_from_threads); } @@ -2991,6 +2989,7 @@ init_revisions(&revs, NULL); save_commit_buffer = 0; + revs.allow_exclude_promisor_objects_opt = 1; setup_revisions(ac, av, &revs, NULL); /* make sure shallows are read */ diff -Nru git-2.19.1/builtin/prune.c git-2.19.2/builtin/prune.c --- git-2.19.1/builtin/prune.c 2018-09-27 20:46:40.000000000 +0000 +++ git-2.19.2/builtin/prune.c 2018-11-21 14:58:11.000000000 +0000 @@ -120,6 +120,7 @@ save_commit_buffer = 0; read_replace_refs = 0; ref_paranoia = 1; + revs.allow_exclude_promisor_objects_opt = 1; init_revisions(&revs, prefix); argc = parse_options(argc, argv, prefix, options, prune_usage, 0); @@ -161,7 +162,7 @@ free(s); if (is_repository_shallow(the_repository)) - prune_shallow(show_only); + prune_shallow(show_only ? PRUNE_SHOW_ONLY : 0); return 0; } diff -Nru git-2.19.1/builtin/receive-pack.c git-2.19.2/builtin/receive-pack.c --- git-2.19.1/builtin/receive-pack.c 2018-09-27 20:46:40.000000000 +0000 +++ git-2.19.2/builtin/receive-pack.c 2018-11-21 14:58:11.000000000 +0000 @@ -465,7 +465,7 @@ unsigned char sha1[GIT_SHA1_RAWSZ]; strbuf_addf(&buf, "%s:%"PRItime, path, stamp); - hmac_sha1(sha1, buf.buf, buf.len, cert_nonce_seed, strlen(cert_nonce_seed));; + hmac_sha1(sha1, buf.buf, buf.len, cert_nonce_seed, strlen(cert_nonce_seed)); strbuf_release(&buf); /* RFC 2104 5. HMAC-SHA1-80 */ @@ -1025,6 +1025,7 @@ const char *ret; struct object_id *old_oid = &cmd->old_oid; struct object_id *new_oid = &cmd->new_oid; + int do_update_worktree = 0; /* only refs/... are allowed */ if (!starts_with(name, "refs/") || check_refname_format(name + 5, 0)) { @@ -1050,9 +1051,8 @@ refuse_unconfigured_deny(); return "branch is currently checked out"; case DENY_UPDATE_INSTEAD: - ret = update_worktree(new_oid->hash); - if (ret) - return ret; + /* pass -- let other checks intervene first */ + do_update_worktree = 1; break; } } @@ -1117,6 +1117,12 @@ return "hook declined"; } + if (do_update_worktree) { + ret = update_worktree(new_oid->hash); + if (ret) + return ret; + } + if (is_null_oid(new_oid)) { struct strbuf err = STRBUF_INIT; if (!parse_object(the_repository, old_oid)) { @@ -1833,7 +1839,7 @@ /* * keep hooks happy by forcing a temporary shallow file via * env variable because we can't add --shallow-file to every - * command. check_everything_connected() will be done with + * command. check_connected() will be done with * true .git/shallow though. */ setenv(GIT_SHALLOW_FILE_ENVIRONMENT, alt_shallow_file, 1); diff -Nru git-2.19.1/builtin/remote.c git-2.19.2/builtin/remote.c --- git-2.19.1/builtin/remote.c 2018-09-27 20:46:40.000000000 +0000 +++ git-2.19.2/builtin/remote.c 2018-11-21 14:58:11.000000000 +0000 @@ -625,7 +625,7 @@ oldremote = remote_get(rename.old_name); if (!remote_is_configured(oldremote, 1)) - die(_("No such remote: %s"), rename.old_name); + die(_("No such remote: '%s'"), rename.old_name); if (!strcmp(rename.old_name, rename.new_name) && oldremote->origin != REMOTE_CONFIG) return migrate_file(oldremote); @@ -761,7 +761,7 @@ remote = remote_get(argv[1]); if (!remote_is_configured(remote, 1)) - die(_("No such remote: %s"), argv[1]); + die(_("No such remote: '%s'"), argv[1]); known_remotes.to_delete = remote; for_each_remote(add_known_remote, &known_remotes); @@ -860,7 +860,7 @@ states->remote = remote_get(name); if (!states->remote) - return error(_("No such remote: %s"), name); + return error(_("No such remote: '%s'"), name); read_branches(); diff -Nru git-2.19.1/builtin/repack.c git-2.19.2/builtin/repack.c --- git-2.19.1/builtin/repack.c 2018-09-27 20:46:40.000000000 +0000 +++ git-2.19.2/builtin/repack.c 2018-11-21 14:58:11.000000000 +0000 @@ -531,6 +531,12 @@ if (!po_args.quiet && isatty(2)) opts |= PRUNE_PACKED_VERBOSE; prune_packed_objects(opts); + + if (!keep_unreachable && + (!(pack_everything & LOOSEN_UNREACHABLE) || + unpack_unreachable) && + is_repository_shallow(the_repository)) + prune_shallow(PRUNE_QUICK); } if (!no_update_server_info) diff -Nru git-2.19.1/builtin/replace.c git-2.19.2/builtin/replace.c --- git-2.19.1/builtin/replace.c 2018-09-27 20:46:40.000000000 +0000 +++ git-2.19.2/builtin/replace.c 2018-11-21 14:58:11.000000000 +0000 @@ -39,7 +39,8 @@ enum replace_format format; }; -static int show_reference(const char *refname, const struct object_id *oid, +static int show_reference(struct repository *r, const char *refname, + const struct object_id *oid, int flag, void *cb_data) { struct show_data *data = cb_data; @@ -56,9 +57,8 @@ if (get_oid(refname, &object)) return error(_("failed to resolve '%s' as a valid ref"), refname); - obj_type = oid_object_info(the_repository, &object, - NULL); - repl_type = oid_object_info(the_repository, oid, NULL); + obj_type = oid_object_info(r, &object, NULL); + repl_type = oid_object_info(r, oid, NULL); printf("%s (%s) -> %s (%s)\n", refname, type_name(obj_type), oid_to_hex(oid), type_name(repl_type)); diff -Nru git-2.19.1/builtin/rev-list.c git-2.19.2/builtin/rev-list.c --- git-2.19.1/builtin/rev-list.c 2018-09-27 20:46:40.000000000 +0000 +++ git-2.19.2/builtin/rev-list.c 2018-11-21 14:58:11.000000000 +0000 @@ -372,6 +372,7 @@ git_config(git_default_config, NULL); init_revisions(&revs, prefix); revs.abbrev = DEFAULT_ABBREV; + revs.allow_exclude_promisor_objects_opt = 1; revs.commit_format = CMIT_FMT_UNSPECIFIED; /* diff -Nru git-2.19.1/builtin/update-ref.c git-2.19.2/builtin/update-ref.c --- git-2.19.1/builtin/update-ref.c 2018-09-27 20:46:40.000000000 +0000 +++ git-2.19.2/builtin/update-ref.c 2018-11-21 14:58:11.000000000 +0000 @@ -14,7 +14,8 @@ }; static char line_termination = '\n'; -static int update_flags; +static unsigned int update_flags; +static unsigned int default_flags; static unsigned create_reflog_flag; static const char *msg; @@ -205,7 +206,7 @@ msg, &err)) die("%s", err.buf); - update_flags = 0; + update_flags = default_flags; free(refname); strbuf_release(&err); @@ -237,7 +238,7 @@ msg, &err)) die("%s", err.buf); - update_flags = 0; + update_flags = default_flags; free(refname); strbuf_release(&err); @@ -273,7 +274,7 @@ update_flags, msg, &err)) die("%s", err.buf); - update_flags = 0; + update_flags = default_flags; free(refname); strbuf_release(&err); @@ -302,7 +303,7 @@ update_flags, &err)) die("%s", err.buf); - update_flags = 0; + update_flags = default_flags; free(refname); strbuf_release(&err); @@ -357,7 +358,6 @@ const char *refname, *oldval; struct object_id oid, oldoid; int delete = 0, no_deref = 0, read_stdin = 0, end_null = 0; - unsigned int flags = 0; int create_reflog = 0; struct option options[] = { OPT_STRING( 'm', NULL, &msg, N_("reason"), N_("reason of the update")), @@ -378,6 +378,11 @@ create_reflog_flag = create_reflog ? REF_FORCE_CREATE_REFLOG : 0; + if (no_deref) { + default_flags = REF_NO_DEREF; + update_flags = default_flags; + } + if (read_stdin) { struct strbuf err = STRBUF_INIT; struct ref_transaction *transaction; @@ -385,7 +390,7 @@ transaction = ref_transaction_begin(&err); if (!transaction) die("%s", err.buf); - if (delete || no_deref || argc > 0) + if (delete || argc > 0) usage_with_options(git_update_ref_usage, options); if (end_null) line_termination = '\0'; @@ -427,8 +432,6 @@ die("%s: not a valid old SHA1", oldval); } - if (no_deref) - flags = REF_NO_DEREF; if (delete) /* * For purposes of backwards compatibility, we treat @@ -436,9 +439,9 @@ */ return delete_ref(msg, refname, (oldval && !is_null_oid(&oldoid)) ? &oldoid : NULL, - flags); + default_flags); else return update_ref(msg, refname, &oid, oldval ? &oldoid : NULL, - flags | create_reflog_flag, + default_flags | create_reflog_flag, UPDATE_REFS_DIE_ON_ERR); } diff -Nru git-2.19.1/cache.h git-2.19.2/cache.h --- git-2.19.1/cache.h 2018-09-27 20:46:40.000000000 +0000 +++ git-2.19.2/cache.h 2018-11-21 14:58:11.000000000 +0000 @@ -781,6 +781,8 @@ #define CE_MATCH_REFRESH 0x10 /* don't refresh_fsmonitor state or do stat comparison even if CE_FSMONITOR_VALID is true */ #define CE_MATCH_IGNORE_FSMONITOR 0X20 +extern int is_racy_timestamp(const struct index_state *istate, + const struct cache_entry *ce); extern int ie_match_stat(struct index_state *, const struct cache_entry *, struct stat *, unsigned int); extern int ie_modified(struct index_state *, const struct cache_entry *, struct stat *, unsigned int); diff -Nru git-2.19.1/command-list.txt git-2.19.2/command-list.txt --- git-2.19.1/command-list.txt 2018-09-27 20:46:40.000000000 +0000 +++ git-2.19.2/command-list.txt 2018-11-21 14:58:11.000000000 +0000 @@ -62,7 +62,7 @@ git-checkout mainporcelain history git-checkout-index plumbingmanipulators git-check-ref-format purehelpers -git-cherry ancillaryinterrogators complete +git-cherry plumbinginterrogators complete git-cherry-pick mainporcelain git-citool mainporcelain git-clean mainporcelain @@ -96,7 +96,7 @@ git-format-patch mainporcelain git-fsck ancillaryinterrogators complete git-gc mainporcelain -git-get-tar-commit-id ancillaryinterrogators +git-get-tar-commit-id plumbinginterrogators git-grep mainporcelain info git-gui mainporcelain git-hash-object plumbingmanipulators @@ -152,7 +152,7 @@ git-reset mainporcelain worktree git-revert mainporcelain git-rev-list plumbinginterrogators -git-rev-parse ancillaryinterrogators +git-rev-parse plumbinginterrogators git-rm mainporcelain worktree git-send-email foreignscminterface complete git-send-pack synchingrepositories diff -Nru git-2.19.1/commit.c git-2.19.2/commit.c --- git-2.19.1/commit.c 2018-09-27 20:46:40.000000000 +0000 +++ git-2.19.2/commit.c 2018-11-21 14:58:11.000000000 +0000 @@ -209,7 +209,7 @@ return 0; } -static void prepare_commit_graft(struct repository *r) +void prepare_commit_graft(struct repository *r) { char *graft_file; @@ -1787,10 +1787,10 @@ * Returns the number of bytes from the tail to ignore, to be fed as * the second parameter to append_signoff(). */ -int ignore_non_trailer(const char *buf, size_t len) +size_t ignore_non_trailer(const char *buf, size_t len) { - int boc = 0; - int bol = 0; + size_t boc = 0; + size_t bol = 0; int in_old_conflicts_block = 0; size_t cutoff = wt_status_locate_end(buf, len); diff -Nru git-2.19.1/commit-graph.c git-2.19.2/commit-graph.c --- git-2.19.1/commit-graph.c 2018-09-27 20:46:40.000000000 +0000 +++ git-2.19.2/commit-graph.c 2018-11-21 14:58:11.000000000 +0000 @@ -13,6 +13,8 @@ #include "commit-graph.h" #include "object-store.h" #include "alloc.h" +#include "hashmap.h" +#include "replace-object.h" #define GRAPH_SIGNATURE 0x43475048 /* "CGPH" */ #define GRAPH_CHUNKID_OIDFANOUT 0x4f494446 /* "OIDF" */ @@ -56,6 +58,28 @@ return g; } +extern int read_replace_refs; + +static int commit_graph_compatible(struct repository *r) +{ + if (!r->gitdir) + return 0; + + if (read_replace_refs) { + prepare_replace_object(r); + if (hashmap_get_size(&r->objects->replace_map->map)) + return 0; + } + + prepare_commit_graft(r); + if (r->parsed_objects && r->parsed_objects->grafts_nr) + return 0; + if (is_repository_shallow(r)) + return 0; + + return 1; +} + struct commit_graph *load_commit_graph_one(const char *graph_file) { void *graph_map; @@ -223,6 +247,9 @@ */ return 0; + if (!commit_graph_compatible(r)) + return 0; + obj_dir = r->objects->objectdir; prepare_commit_graph_one(r, obj_dir); prepare_alt_odb(r); @@ -233,10 +260,10 @@ return !!r->objects->commit_graph; } -static void close_commit_graph(void) +void close_commit_graph(struct repository *r) { - free_commit_graph(the_repository->objects->commit_graph); - the_repository->objects->commit_graph = NULL; + free_commit_graph(r->objects->commit_graph); + r->objects->commit_graph = NULL; } static int bsearch_graph(struct commit_graph *g, struct object_id *oid, uint32_t *pos) @@ -693,6 +720,9 @@ int num_extra_edges; struct commit_list *parent; + if (!commit_graph_compatible(the_repository)) + return; + oids.nr = 0; oids.alloc = approximate_object_count() / 4; @@ -845,7 +875,7 @@ write_graph_chunk_data(f, GRAPH_OID_LEN, commits.list, commits.nr); write_graph_chunk_large_edges(f, commits.list, commits.nr); - close_commit_graph(); + close_commit_graph(the_repository); finalize_hashfile(f, NULL, CSUM_HASH_IN_STREAM | CSUM_FSYNC); commit_lock_file(&lk); diff -Nru git-2.19.1/commit-graph.h git-2.19.2/commit-graph.h --- git-2.19.1/commit-graph.h 2018-09-27 20:46:40.000000000 +0000 +++ git-2.19.2/commit-graph.h 2018-11-21 14:58:11.000000000 +0000 @@ -60,6 +60,7 @@ int verify_commit_graph(struct repository *r, struct commit_graph *g); +void close_commit_graph(struct repository *); void free_commit_graph(struct commit_graph *); #endif diff -Nru git-2.19.1/commit.h git-2.19.2/commit.h --- git-2.19.1/commit.h 2018-09-27 20:46:40.000000000 +0000 +++ git-2.19.2/commit.h 2018-11-21 14:58:11.000000000 +0000 @@ -202,6 +202,7 @@ struct commit_graft *read_graft_line(struct strbuf *line); int register_commit_graft(struct repository *r, struct commit_graft *, int); +void prepare_commit_graft(struct repository *r); struct commit_graft *lookup_commit_graft(struct repository *r, const struct object_id *oid); extern struct commit_list *get_merge_bases(struct commit *rev1, struct commit *rev2); @@ -255,7 +256,9 @@ uint32_t **used, int *ref_status); extern int delayed_reachability_test(struct shallow_info *si, int c); -extern void prune_shallow(int show_only); +#define PRUNE_SHOW_ONLY 1 +#define PRUNE_QUICK 2 +extern void prune_shallow(unsigned options); extern struct trace_key trace_shallow; int is_descendant_of(struct commit *, struct commit_list *); @@ -322,7 +325,7 @@ size_t *out_len); /* Find the end of the log message, the right place for a new trailer. */ -extern int ignore_non_trailer(const char *buf, size_t len); +extern size_t ignore_non_trailer(const char *buf, size_t len); typedef int (*each_mergetag_fn)(struct commit *commit, struct commit_extra_header *extra, void *cb_data); diff -Nru git-2.19.1/compat/mingw.c git-2.19.2/compat/mingw.c --- git-2.19.1/compat/mingw.c 2018-09-27 20:46:40.000000000 +0000 +++ git-2.19.2/compat/mingw.c 2018-11-21 14:58:11.000000000 +0000 @@ -341,6 +341,19 @@ return ret; } +/* + * Calling CreateFile() using FILE_APPEND_DATA and without FILE_WRITE_DATA + * is documented in [1] as opening a writable file handle in append mode. + * (It is believed that) this is atomic since it is maintained by the + * kernel unlike the O_APPEND flag which is racily maintained by the CRT. + * + * [1] https://docs.microsoft.com/en-us/windows/desktop/fileio/file-access-rights-constants + * + * This trick does not appear to work for named pipes. Instead it creates + * a named pipe client handle that cannot be written to. Callers should + * just use the regular _wopen() for them. (And since client handle gets + * bound to a unique server handle, it isn't really an issue.) + */ static int mingw_open_append(wchar_t const *wfilename, int oflags, ...) { HANDLE handle; @@ -360,10 +373,12 @@ NULL, create, FILE_ATTRIBUTE_NORMAL, NULL); if (handle == INVALID_HANDLE_VALUE) return errno = err_win_to_posix(GetLastError()), -1; + /* * No O_APPEND here, because the CRT uses it only to reset the - * file pointer to EOF on write(); but that is not necessary - * for a file created with FILE_APPEND_DATA. + * file pointer to EOF before each write(); but that is not + * necessary (and may lead to races) for a file created with + * FILE_APPEND_DATA. */ fd = _open_osfhandle((intptr_t)handle, O_BINARY); if (fd < 0) @@ -371,6 +386,21 @@ return fd; } +/* + * Does the pathname map to the local named pipe filesystem? + * That is, does it have a "//./pipe/" prefix? + */ +static int is_local_named_pipe_path(const char *filename) +{ + return (is_dir_sep(filename[0]) && + is_dir_sep(filename[1]) && + filename[2] == '.' && + is_dir_sep(filename[3]) && + !strncasecmp(filename+4, "pipe", 4) && + is_dir_sep(filename[8]) && + filename[9]); +} + int mingw_open (const char *filename, int oflags, ...) { typedef int (*open_fn_t)(wchar_t const *wfilename, int oflags, ...); @@ -387,7 +417,7 @@ if (filename && !strcmp(filename, "/dev/null")) filename = "nul"; - if (oflags & O_APPEND) + if ((oflags & O_APPEND) && !is_local_named_pipe_path(filename)) open_fn = mingw_open_append; else open_fn = _wopen; diff -Nru git-2.19.1/config.mak.dev git-2.19.2/config.mak.dev --- git-2.19.1/config.mak.dev 2018-09-27 20:46:40.000000000 +0000 +++ git-2.19.2/config.mak.dev 2018-11-21 14:58:11.000000000 +0000 @@ -7,6 +7,7 @@ CFLAGS += -DUSE_PARENS_AROUND_GETTEXT_N=0 endif CFLAGS += -Wdeclaration-after-statement +CFLAGS += -Wformat-security CFLAGS += -Wno-format-zero-length CFLAGS += -Wold-style-definition CFLAGS += -Woverflow diff -Nru git-2.19.1/configure git-2.19.2/configure --- git-2.19.1/configure 2018-09-27 20:46:41.000000000 +0000 +++ git-2.19.2/configure 2018-11-21 14:58:11.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for git 2.19.1. +# Generated by GNU Autoconf 2.69 for git 2.19.2. # # Report bugs to . # @@ -580,8 +580,8 @@ # Identity of this package. PACKAGE_NAME='git' PACKAGE_TARNAME='git' -PACKAGE_VERSION='2.19.1' -PACKAGE_STRING='git 2.19.1' +PACKAGE_VERSION='2.19.2' +PACKAGE_STRING='git 2.19.2' PACKAGE_BUGREPORT='git@vger.kernel.org' PACKAGE_URL='' @@ -1265,7 +1265,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures git 2.19.1 to adapt to many kinds of systems. +\`configure' configures git 2.19.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1327,7 +1327,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of git 2.19.1:";; + short | recursive ) echo "Configuration of git 2.19.2:";; esac cat <<\_ACEOF @@ -1472,7 +1472,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -git configure 2.19.1 +git configure 2.19.2 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1952,7 +1952,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by git $as_me 2.19.1, which was +It was created by git $as_me 2.19.2, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -8251,7 +8251,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by git $as_me 2.19.1, which was +This file was extended by git $as_me 2.19.2, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -8308,7 +8308,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -git config.status 2.19.1 +git config.status 2.19.2 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -Nru git-2.19.1/contrib/coccinelle/preincr.cocci git-2.19.2/contrib/coccinelle/preincr.cocci --- git-2.19.1/contrib/coccinelle/preincr.cocci 1970-01-01 00:00:00.000000000 +0000 +++ git-2.19.2/contrib/coccinelle/preincr.cocci 2018-11-21 14:58:11.000000000 +0000 @@ -0,0 +1,5 @@ +@ preincrement @ +identifier i; +@@ +- ++i > 1 ++ i++ diff -Nru git-2.19.1/contrib/completion/git-completion.bash git-2.19.2/contrib/completion/git-completion.bash --- git-2.19.1/contrib/completion/git-completion.bash 2018-09-27 20:46:40.000000000 +0000 +++ git-2.19.2/contrib/completion/git-completion.bash 2018-11-21 14:58:11.000000000 +0000 @@ -1340,17 +1340,6 @@ esac } -_git_cherry () -{ - case "$cur" in - --*) - __gitcomp_builtin cherry - return - esac - - __git_complete_refs -} - __git_cherry_pick_inprogress_options="--continue --quit --abort" _git_cherry_pick () diff -Nru git-2.19.1/convert.c git-2.19.2/convert.c --- git-2.19.1/convert.c 2018-09-27 20:46:40.000000000 +0000 +++ git-2.19.2/convert.c 2018-11-21 14:58:11.000000000 +0000 @@ -1297,6 +1297,7 @@ struct conv_attrs *ca, const char *path) { static struct attr_check *check; + struct attr_check_item *ccheck = NULL; if (!check) { check = attr_check_initl("crlf", "ident", "filter", @@ -1306,30 +1307,25 @@ git_config(read_convert_config, NULL); } - if (!git_check_attr(istate, path, check)) { - struct attr_check_item *ccheck = check->items; - ca->crlf_action = git_path_check_crlf(ccheck + 4); - if (ca->crlf_action == CRLF_UNDEFINED) - ca->crlf_action = git_path_check_crlf(ccheck + 0); - ca->ident = git_path_check_ident(ccheck + 1); - ca->drv = git_path_check_convert(ccheck + 2); - if (ca->crlf_action != CRLF_BINARY) { - enum eol eol_attr = git_path_check_eol(ccheck + 3); - if (ca->crlf_action == CRLF_AUTO && eol_attr == EOL_LF) - ca->crlf_action = CRLF_AUTO_INPUT; - else if (ca->crlf_action == CRLF_AUTO && eol_attr == EOL_CRLF) - ca->crlf_action = CRLF_AUTO_CRLF; - else if (eol_attr == EOL_LF) - ca->crlf_action = CRLF_TEXT_INPUT; - else if (eol_attr == EOL_CRLF) - ca->crlf_action = CRLF_TEXT_CRLF; - } - ca->working_tree_encoding = git_path_check_encoding(ccheck + 5); - } else { - ca->drv = NULL; - ca->crlf_action = CRLF_UNDEFINED; - ca->ident = 0; + git_check_attr(istate, path, check); + ccheck = check->items; + ca->crlf_action = git_path_check_crlf(ccheck + 4); + if (ca->crlf_action == CRLF_UNDEFINED) + ca->crlf_action = git_path_check_crlf(ccheck + 0); + ca->ident = git_path_check_ident(ccheck + 1); + ca->drv = git_path_check_convert(ccheck + 2); + if (ca->crlf_action != CRLF_BINARY) { + enum eol eol_attr = git_path_check_eol(ccheck + 3); + if (ca->crlf_action == CRLF_AUTO && eol_attr == EOL_LF) + ca->crlf_action = CRLF_AUTO_INPUT; + else if (ca->crlf_action == CRLF_AUTO && eol_attr == EOL_CRLF) + ca->crlf_action = CRLF_AUTO_CRLF; + else if (eol_attr == EOL_LF) + ca->crlf_action = CRLF_TEXT_INPUT; + else if (eol_attr == EOL_CRLF) + ca->crlf_action = CRLF_TEXT_CRLF; } + ca->working_tree_encoding = git_path_check_encoding(ccheck + 5); /* Save attr and make a decision for action */ ca->attr_action = ca->crlf_action; diff -Nru git-2.19.1/debian/changelog git-2.19.2/debian/changelog --- git-2.19.1/debian/changelog 2018-10-05 22:56:06.000000000 +0000 +++ git-2.19.2/debian/changelog 2018-11-22 09:18:33.000000000 +0000 @@ -1,4 +1,4 @@ -git (1:2.19.1-1~ppa0~ubuntu12.04.1) precise; urgency=medium +git (1:2.19.2-0ppa1~ubuntu12.04.1) precise; urgency=medium [ Jonathan Nieder ] * debian/diff/0011-status-show-comment-prefix-by-..diff: @@ -8,6 +8,7 @@ git-buildpackage. [ Anders Kaseorg ] + * New upstream point release (see RelNotes/2.19.2.txt). * Build for PPA. * Avoid dpkg-maintscript-helper dir_to_symlink. * Revert gitweb configuration changes for Apache 2.4. @@ -17,7 +18,7 @@ * Put completion script back at /etc/bash_completion.d/git to restore compatibility with bash-completion < 2. - -- Anders Kaseorg Fri, 05 Oct 2018 15:56:06 -0700 + -- Anders Kaseorg Thu, 22 Nov 2018 01:18:33 -0800 git (1:2.19.1-1) unstable; urgency=high diff -Nru git-2.19.1/debian/changelog.upstream git-2.19.2/debian/changelog.upstream --- git-2.19.1/debian/changelog.upstream 2018-10-05 22:56:05.000000000 +0000 +++ git-2.19.2/debian/changelog.upstream 2018-11-22 09:18:32.000000000 +0000 @@ -1,3 +1,189 @@ +Version v2.19.2; changes since v2.19.1: +--------------------------------------- + +Alexander Pyhalov (1): + t7005-editor: quote filename to fix whitespace-issue + +Andreas Heiduk (6): + doc: clarify boundaries of 'git worktree list --porcelain' + doc: fix ASCII art tab spacing + doc: fix inappropriate monospace formatting + doc: fix descripion for 'git tag --format' + doc: fix indentation of listing blocks in gitweb.conf.txt + doc: fix formatting in git-update-ref + +Ben Peart (1): + git-mv: allow submodules and fsmonitor to work together + +Brandon Williams (1): + config: document value 2 for protocol.version + +Daniels Umanovskis (3): + doc: move git-rev-parse from porcelain to plumbing + doc: move git-get-tar-commit-id to plumbing + doc: move git-cherry to plumbing + +David Zych (1): + doc: clarify gitcredentials path component matching + +Derrick Stolee (6): + commit-graph: update design document + test-repository: properly init repo + commit-graph: not compatible with replace objects + commit-graph: not compatible with grafts + commit-graph: not compatible with uninitialized repo + commit-graph: close_commit_graph before shallow walk + +Elijah Newren (7): + Remove superfluous trailing semicolons + t4200: demonstrate rerere segfault on specially crafted merge + rerere: avoid buffer overrun + update-ref: fix type of update_flags variable to match its usage + update-ref: allow --no-deref with --stdin + sequencer: fix --allow-empty-message behavior, make it smarter + commit: fix erroneous BUG, 'multiple renames on the same target? how?' + +Frederick Eaton (3): + git-archimport.1: specify what kind of Arch we're talking about + git-column.1: clarify initial description, provide examples + git-describe.1: clarify that "human readable" is also git-readable + +Jeff Hostetler (2): + t0051: test GIT_TRACE to a windows named pipe + mingw: fix mingw_open_append to work with named pipes + +Jeff King (16): + trailer: use size_t for string offsets + trailer: use size_t for iterating trailer list + trailer: pass process_trailer_opts to trailer_info_get() + interpret-trailers: tighten check for "---" patch boundary + interpret-trailers: allow suppressing "---" divider + pretty, ref-filter: format %(trailers) with no_divider option + sequencer: ignore "---" divider when parsing trailers + append_signoff: use size_t for string offsets + reopen_tempfile(): truncate opened file + config.mak.dev: add -Wformat-security + receive-pack: update comment with check_everything_connected + run-command: mark path lookup errors with ENOENT + upload-pack: fix broken if/else chain in config callback + t1450: check large blob in trailing-garbage test + check_stream_sha1(): handle input underflow + cat-file: handle streaming failures consistently + +Johannes Schindelin (8): + rebase -i --autosquash: demonstrate a problem skipping the last squash + rebase -i: be careful to wrap up fixup/squash chains + pack-objects: fix typo 'detla' -> 'delta' + pack-objects (mingw): demonstrate a segmentation fault with large deltas + pack-objects (mingw): initialize `packing_data` mutex in the correct spot + repack: point out a bug handling stale shallow info + shallow: offer to prune only non-existing entries + repack -ad: prune the list of shallow commits + +Johannes Sixt (2): + diff: don't attempt to strip prefix from absolute Windows paths + t3404-rebase-interactive: test abbreviated commands + +Jonathan Nieder (2): + mailmap: consistently normalize brian m. carlson's name + git doc: direct bug reporters to mailing list archive + +Jonathan Tan (4): + fetch-object: unify fetch_object[s] functions + fetch-object: set exact_oid when fetching + fetch-pack: avoid object flags if no_dependents + fetch-pack: exclude blobs when lazy-fetching trees + +Junio C Hamano (5): + CodingGuidelines: document the API in *.h files + receive: denyCurrentBranch=updateinstead should not blindly update + cocci: simplify "if (++u > 1)" to "if (u++)" + fsck: s/++i > 1/i++/ + Git 2.19.2 + +Martin Ågren (5): + git-commit-graph.txt: fix bullet lists + git-commit-graph.txt: typeset more in monospace + git-commit-graph.txt: refer to "*commit*-graph file" + Doc: refer to the "commit-graph file" with dash + t1400: drop debug `echo` to actually execute `test` + +Matthew DeVore (2): + Documentation/git-log.txt: do not show --exclude-promisor-objects + exclude-promisor-objects: declare when option is allowed + +Michael Witten (3): + docs: typo: s/go/to/ + docs: graph: remove unnecessary `graph_update()' call + docs: typo: s/isimilar/similar/ + +Mihir Mehta (1): + doc: fix a typo and clarify a sentence + +Nguyễn Thái Ngọc Duy (2): + add: do not accept pathspec magic 'attr' + config.txt: correct the note about uploadpack.packObjectsHook + +Noam Postavsky (1): + log: fix coloring of certain octopus merge shapes + +René Scharfe (1): + sequencer: use return value of oidset_insert() + +SZEDER Gábor (12): + Documentation/git.txt: clarify that GIT_TRACE=/path appends + t3701-add-interactive: tighten the check of trace output + t1700-split-index: drop unnecessary 'grep' + t0090: disable GIT_TEST_SPLIT_INDEX for the test checking split index + t1700-split-index: document why FSMONITOR is disabled in this test script + split-index: add tests to demonstrate the racy split index problem + t1700-split-index: date back files to avoid racy situations + split-index: count the number of deleted entries + split-index: don't compare cached data of entries already marked for split index + split-index: smudge and add racily clean cache entries to split index + split-index: BUG() when cache entry refers to non-existing shared entry + test-lib: introduce the '-V' short option for '--verbose-log' + +Sam McKelvie (1): + rev-parse: --show-superproject-working-tree should work during a merge + +Saulius Gurklys (1): + doc: fix small typo in git show-branch + +Sebastian Staudt (1): + travis-ci: no longer use containers + +Shulhan (1): + builtin/remote: quote remote name on error to display empty name + +Stefan Beller (4): + refs.c: migrate internal ref iteration to pass thru repository argument + refs.c: upgrade for_each_replace_ref to be a each_repo_ref_fn callback + string-list: remove unused function print_string_list + strbuf.h: format according to coding guidelines + +Tao Qingyun (3): + refs: docstring typo + builtin/branch.c: remove useless branch_get + branch: trivial style fix + +Thomas Gummerer (4): + .gitattributes: add conflict-marker-size for relevant files + linear-assignment: fix potential out of bounds memory access + t5551: move setup code inside test_expect blocks + t5551: compare sorted cookies files + +Tim Schumacher (1): + Documentation/Makefile: make manpage-base-url.xsl generation quieter + +Torsten Bögershausen (2): + Make git_check_attr() a void function + path.c: char is not (always) signed + +Uwe Kleine-König (1): + howto/using-merge-subtree: mention --allow-unrelated-histories + + Version v2.19.1; changes since v2.19.0: --------------------------------------- @@ -18456,9 +18642,6 @@ Benny Siegert (1): Add MirBSD support to the build system. -Brian M. Carlson (1): - remote-curl: fix large pushes with GSSAPI - Brodie Rao (1): sha1_name: don't resolve refs when core.warnambiguousrefs is false @@ -18757,7 +18940,8 @@ Zoltan Klinger (1): difftool: display the number of files in the diff queue in the prompt -brian m. carlson (1): +brian m. carlson (2): + remote-curl: fix large pushes with GSSAPI Documentation: document pitfalls with 3-way merge jcb91 (1): @@ -19149,10 +19333,6 @@ OS X: Fix redeclaration of die warning t5551: Remove header from curl cookie file -Brian M. Carlson (2): - submodule: fix confusing variable name - submodule: don't print status output with ignore=all - Christian Couder (7): replace: forbid replacing an object with one of a different type Documentation/replace: state that objects must be of the same type @@ -19657,7 +19837,9 @@ Uli Heller (1): git-svn: fix termination issues for remote svn connections -brian m. carlson (1): +brian m. carlson (3): + submodule: fix confusing variable name + submodule: don't print status output with ignore=all CodingGuidelines: style for multi-line comments Ævar Arnfjörð Bjarmason (1): @@ -19752,9 +19934,6 @@ Antoine Pelisse (1): commit: search author pattern against mailmap -Brian M. Carlson (1): - http-backend: provide Allow header for 405 - Christian Couder (1): sha1_file: move comment about return value where it belongs @@ -19828,6 +20007,9 @@ Torstein Hegge (1): test-lib: fix typo in comment +brian m. carlson (1): + http-backend: provide Allow header for 405 + Version v1.8.4.1; changes since v1.8.4: --------------------------------------- @@ -19843,9 +20025,6 @@ t9902-completion.sh: old Bash still does not support array+=('') notation contrib/git-prompt.sh: handle missing 'printf -v' more gracefully -Brian M. Carlson (1): - send-email: don't call methods on undefined values - Jeff King (2): config: do not use C function names as struct members mailmap: handle mailmap blobs without trailing newlines @@ -19902,6 +20081,9 @@ Thorsten Glaser (1): fix shell syntax error in template +brian m. carlson (1): + send-email: don't call methods on undefined values + Version v1.8.4; changes since v1.8.4-rc4: ----------------------------------------- @@ -19966,9 +20148,6 @@ Version v1.8.4-rc2; changes since v1.8.4-rc1: --------------------------------------------- -Brian M. Carlson (1): - Add missing test file for UTF-16. - Felix Gruber (1): fix typo in documentation of git-svn @@ -20000,6 +20179,9 @@ Trần Ngọc Quân (1): l10n: vi.po (2133t) +brian m. carlson (1): + Add missing test file for UTF-16. + Version v1.8.4-rc1; changes since v1.8.4-rc0: --------------------------------------------- diff -Nru git-2.19.1/debian/versions.upstream git-2.19.2/debian/versions.upstream --- git-2.19.1/debian/versions.upstream 2018-10-05 22:56:05.000000000 +0000 +++ git-2.19.2/debian/versions.upstream 2018-11-22 09:18:32.000000000 +0000 @@ -624,3 +624,4 @@ v2.19.0-rc2 v2.19.0 v2.19.1 +v2.19.2 diff -Nru git-2.19.1/diff.c git-2.19.2/diff.c --- git-2.19.1/diff.c 2018-09-27 20:46:40.000000000 +0000 +++ git-2.19.2/diff.c 2018-11-21 14:58:11.000000000 +0000 @@ -4256,12 +4256,12 @@ static void strip_prefix(int prefix_length, const char **namep, const char **otherp) { /* Strip the prefix but do not molest /dev/null and absolute paths */ - if (*namep && **namep != '/') { + if (*namep && !is_absolute_path(*namep)) { *namep += prefix_length; if (**namep == '/') ++*namep; } - if (*otherp && **otherp != '/') { + if (*otherp && !is_absolute_path(*otherp)) { *otherp += prefix_length; if (**otherp == '/') ++*otherp; diff -Nru git-2.19.1/Documentation/CodingGuidelines git-2.19.2/Documentation/CodingGuidelines --- git-2.19.1/Documentation/CodingGuidelines 2018-09-27 20:46:40.000000000 +0000 +++ git-2.19.2/Documentation/CodingGuidelines 2018-11-21 14:58:11.000000000 +0000 @@ -358,7 +358,10 @@ string_list for sorted string lists, a hash map (mapping struct objects) named "struct decorate", amongst other things. - - When you come up with an API, document it. + - When you come up with an API, document its functions and structures + in the header file that exposes the API to its callers. Use what is + in "strbuf.h" as a model for the appropriate tone and level of + detail. - The first #include in C files, except in platform specific compat/ implementations, must be either "git-compat-util.h", "cache.h" or diff -Nru git-2.19.1/Documentation/config.txt git-2.19.2/Documentation/config.txt --- git-2.19.1/Documentation/config.txt 2018-09-27 20:46:40.000000000 +0000 +++ git-2.19.2/Documentation/config.txt 2018-11-21 14:58:11.000000000 +0000 @@ -2828,6 +2828,8 @@ * `1` - the original wire protocol with the addition of a version string in the initial response from the server. +* `2` - link:technical/protocol-v2.html[wire protocol version 2]. + -- pull.ff:: @@ -3632,15 +3634,15 @@ was run. I.e., `upload-pack` will feed input intended for `pack-objects` to the hook, and expects a completed packfile on stdout. - -uploadpack.allowFilter:: - If this option is set, `upload-pack` will support partial - clone and partial fetch object filtering. + Note that this configuration variable is ignored if it is seen in the repository-level config (this is a safety measure against fetching from untrusted repositories). +uploadpack.allowFilter:: + If this option is set, `upload-pack` will support partial + clone and partial fetch object filtering. + uploadpack.allowRefInWant:: If this option is set, `upload-pack` will support the `ref-in-want` feature of the protocol version 2 `fetch` command. This feature diff -Nru git-2.19.1/Documentation/git-archimport.txt git-2.19.2/Documentation/git-archimport.txt --- git-2.19.1/Documentation/git-archimport.txt 2018-09-27 20:46:40.000000000 +0000 +++ git-2.19.2/Documentation/git-archimport.txt 2018-11-21 14:58:11.000000000 +0000 @@ -3,7 +3,7 @@ NAME ---- -git-archimport - Import an Arch repository into Git +git-archimport - Import a GNU Arch repository into Git SYNOPSIS @@ -14,7 +14,8 @@ DESCRIPTION ----------- -Imports a project from one or more Arch repositories. It will follow branches +Imports a project from one or more GNU Arch repositories. +It will follow branches and repositories within the namespaces defined by the parameters supplied. If it cannot find the remote branch a merge comes from it will just import it as a regular commit. If it can find it, it will mark it diff -Nru git-2.19.1/Documentation/gitattributes.txt git-2.19.2/Documentation/gitattributes.txt --- git-2.19.1/Documentation/gitattributes.txt 2018-09-27 20:46:40.000000000 +0000 +++ git-2.19.2/Documentation/gitattributes.txt 2018-11-21 14:58:11.000000000 +0000 @@ -303,21 +303,21 @@ attribute. If you decide to use the `working-tree-encoding` attribute in your repository, then it is strongly recommended to ensure that all clients working with the repository support it. - - For example, Microsoft Visual Studio resources files (`*.rc`) or - PowerShell script files (`*.ps1`) are sometimes encoded in UTF-16. - If you declare `*.ps1` as files as UTF-16 and you add `foo.ps1` with - a `working-tree-encoding` enabled Git client, then `foo.ps1` will be - stored as UTF-8 internally. A client without `working-tree-encoding` - support will checkout `foo.ps1` as UTF-8 encoded file. This will - typically cause trouble for the users of this file. - - If a Git client, that does not support the `working-tree-encoding` - attribute, adds a new file `bar.ps1`, then `bar.ps1` will be - stored "as-is" internally (in this example probably as UTF-16). - A client with `working-tree-encoding` support will interpret the - internal contents as UTF-8 and try to convert it to UTF-16 on checkout. - That operation will fail and cause an error. ++ +For example, Microsoft Visual Studio resources files (`*.rc`) or +PowerShell script files (`*.ps1`) are sometimes encoded in UTF-16. +If you declare `*.ps1` as files as UTF-16 and you add `foo.ps1` with +a `working-tree-encoding` enabled Git client, then `foo.ps1` will be +stored as UTF-8 internally. A client without `working-tree-encoding` +support will checkout `foo.ps1` as UTF-8 encoded file. This will +typically cause trouble for the users of this file. ++ +If a Git client, that does not support the `working-tree-encoding` +attribute, adds a new file `bar.ps1`, then `bar.ps1` will be +stored "as-is" internally (in this example probably as UTF-16). +A client with `working-tree-encoding` support will interpret the +internal contents as UTF-8 and try to convert it to UTF-16 on checkout. +That operation will fail and cause an error. - Reencoding content to non-UTF encodings can cause errors as the conversion might not be UTF-8 round trip safe. If you suspect your diff -Nru git-2.19.1/Documentation/git-bisect-lk2009.txt git-2.19.2/Documentation/git-bisect-lk2009.txt --- git-2.19.1/Documentation/git-bisect-lk2009.txt 2018-09-27 20:46:40.000000000 +0000 +++ git-2.19.2/Documentation/git-bisect-lk2009.txt 2018-11-21 14:58:11.000000000 +0000 @@ -633,11 +633,11 @@ Let's take the following graph as an example: ------------- - G-H-I-J - / \ + G-H-I-J + / \ A-B-C-D-E-F O - \ / - K-L-M-N + \ / + K-L-M-N ------------- If we compute the following non optimal function on it: @@ -649,25 +649,25 @@ we get: ------------- - 4 3 2 1 - G-H-I-J + 4 3 2 1 + G-H-I-J 1 2 3 4 5 6/ \0 A-B-C-D-E-F O - \ / - K-L-M-N - 4 3 2 1 + \ / + K-L-M-N + 4 3 2 1 ------------- but with the algorithm used by git bisect we get: ------------- - 7 7 6 5 - G-H-I-J + 7 7 6 5 + G-H-I-J 1 2 3 4 5 6/ \0 A-B-C-D-E-F O - \ / - K-L-M-N - 7 7 6 5 + \ / + K-L-M-N + 7 7 6 5 ------------- So we chose G, H, K or L as the best bisection point, which is better @@ -773,7 +773,7 @@ ------------- A-B-C-D-E-F-G <--main \ - H-I-J <--dev + H-I-J <--dev ------------- The commit "D" is called a "merge base" for branch "main" and "dev" diff -Nru git-2.19.1/Documentation/git-checkout.txt git-2.19.2/Documentation/git-checkout.txt --- git-2.19.1/Documentation/git-checkout.txt 2018-09-27 20:46:40.000000000 +0000 +++ git-2.19.2/Documentation/git-checkout.txt 2018-11-21 14:58:11.000000000 +0000 @@ -311,9 +311,9 @@ commits, one of them tagged, and with branch 'master' checked out: ------------ - HEAD (refers to branch 'master') - | - v + HEAD (refers to branch 'master') + | + v a---b---c branch 'master' (refers to commit 'c') ^ | @@ -329,9 +329,9 @@ ------------ $ edit; git add; git commit - HEAD (refers to branch 'master') - | - v + HEAD (refers to branch 'master') + | + v a---b---c---d branch 'master' (refers to commit 'd') ^ | @@ -398,7 +398,7 @@ ------------ $ git checkout master - HEAD (refers to branch 'master') + HEAD (refers to branch 'master') e---f | / v a---b---c---d branch 'master' (refers to commit 'd') diff -Nru git-2.19.1/Documentation/git-column.txt git-2.19.2/Documentation/git-column.txt --- git-2.19.1/Documentation/git-column.txt 2018-09-27 20:46:40.000000000 +0000 +++ git-2.19.2/Documentation/git-column.txt 2018-11-21 14:58:11.000000000 +0000 @@ -13,7 +13,10 @@ DESCRIPTION ----------- -This command formats its input into multiple columns. +This command formats the lines of its standard input into a table with +multiple columns. Each input line occupies one cell of the table. It +is used internally by other git commands to format output into +columns. OPTIONS ------- @@ -23,7 +26,7 @@ --mode=:: Specify layout mode. See configuration variable column.ui for option - syntax. + syntax in linkgit:git-config[1]. --raw-mode=:: Same as --mode but take mode encoded as a number. This is mainly used @@ -43,6 +46,34 @@ --padding=:: The number of spaces between columns. One space by default. +EXAMPLES +------ + +Format data by columns: +------------ +$ seq 1 24 | git column --mode=column --padding=5 +1 4 7 10 13 16 19 22 +2 5 8 11 14 17 20 23 +3 6 9 12 15 18 21 24 +------------ + +Format data by rows: +------------ +$ seq 1 21 | git column --mode=row --padding=5 +1 2 3 4 5 6 7 +8 9 10 11 12 13 14 +15 16 17 18 19 20 21 +------------ + +List some tags in a table with unequal column widths: +------------ +$ git tag --list 'v2.4.*' --column=row,dense +v2.4.0 v2.4.0-rc0 v2.4.0-rc1 v2.4.0-rc2 v2.4.0-rc3 +v2.4.1 v2.4.10 v2.4.11 v2.4.12 v2.4.2 +v2.4.3 v2.4.4 v2.4.5 v2.4.6 v2.4.7 +v2.4.8 v2.4.9 +------------ + GIT --- Part of the linkgit:git[1] suite diff -Nru git-2.19.1/Documentation/git-commit-graph.txt git-2.19.2/Documentation/git-commit-graph.txt --- git-2.19.1/Documentation/git-commit-graph.txt 2018-09-27 20:46:40.000000000 +0000 +++ git-2.19.2/Documentation/git-commit-graph.txt 2018-11-21 14:58:11.000000000 +0000 @@ -3,7 +3,7 @@ NAME ---- -git-commit-graph - Write and verify Git commit graph files +git-commit-graph - Write and verify Git commit-graph files SYNOPSIS @@ -17,24 +17,24 @@ DESCRIPTION ----------- -Manage the serialized commit graph file. +Manage the serialized commit-graph file. OPTIONS ------- --object-dir:: - Use given directory for the location of packfiles and commit graph + Use given directory for the location of packfiles and commit-graph file. This parameter exists to specify the location of an alternate - that only has the objects directory, not a full .git directory. The - commit graph file is expected to be at /info/commit-graph and - the packfiles are expected to be in /pack. + that only has the objects directory, not a full `.git` directory. The + commit-graph file is expected to be at `/info/commit-graph` and + the packfiles are expected to be in `/pack`. COMMANDS -------- 'write':: -Write a commit graph file based on the commits found in packfiles. +Write a commit-graph file based on the commits found in packfiles. + With the `--stdin-packs` option, generate the new commit graph by walking objects only in the specified pack-indexes. (Cannot be combined @@ -54,8 +54,8 @@ 'read':: -Read a graph file given by the commit-graph file and output basic -details about the graph file. Used for debugging purposes. +Read the commit-graph file and output basic details about it. +Used for debugging purposes. 'verify':: @@ -66,27 +66,28 @@ EXAMPLES -------- -* Write a commit graph file for the packed commits in your local .git folder. +* Write a commit-graph file for the packed commits in your local `.git` + directory. + ------------------------------------------------ $ git commit-graph write ------------------------------------------------ -* Write a graph file, extending the current graph file using commits -* in . +* Write a commit-graph file, extending the current commit-graph file + using commits in ``. + ------------------------------------------------ $ echo | git commit-graph write --stdin-packs ------------------------------------------------ -* Write a graph file containing all reachable commits. +* Write a commit-graph file containing all reachable commits. + ------------------------------------------------ $ git show-ref -s | git commit-graph write --stdin-commits ------------------------------------------------ -* Write a graph file containing all commits in the current -* commit-graph file along with those reachable from HEAD. +* Write a commit-graph file containing all commits in the current + commit-graph file along with those reachable from `HEAD`. + ------------------------------------------------ $ git rev-parse HEAD | git commit-graph write --stdin-commits --append diff -Nru git-2.19.1/Documentation/gitcredentials.txt git-2.19.2/Documentation/gitcredentials.txt --- git-2.19.1/Documentation/gitcredentials.txt 2018-09-27 20:46:40.000000000 +0000 +++ git-2.19.2/Documentation/gitcredentials.txt 2018-11-21 14:58:11.000000000 +0000 @@ -133,6 +133,12 @@ the same domain. Likewise, a config entry for `http://example.com` would not match: Git compares the protocols exactly. +If the "pattern" URL does include a path component, then this too must match +exactly: the context `https://example.com/bar/baz.git` will match a config +entry for `https://example.com/bar/baz.git` (in addition to matching the config +entry for `https://example.com`) but will not match a config entry for +`https://example.com/bar`. + CONFIGURATION OPTIONS --------------------- diff -Nru git-2.19.1/Documentation/git-describe.txt git-2.19.2/Documentation/git-describe.txt --- git-2.19.1/Documentation/git-describe.txt 2018-09-27 20:46:40.000000000 +0000 +++ git-2.19.2/Documentation/git-describe.txt 2018-11-21 14:58:11.000000000 +0000 @@ -18,7 +18,9 @@ commit. If the tag points to the commit, then only the tag is shown. Otherwise, it suffixes the tag name with the number of additional commits on top of the tagged object and the -abbreviated object name of the most recent commit. +abbreviated object name of the most recent commit. The result +is a "human-readable" object name which can also be used to +identify the commit to other git commands. By default (without --all or --tags) `git describe` only shows annotated tags. For more information about creating annotated tags diff -Nru git-2.19.1/Documentation/git-diff.txt git-2.19.2/Documentation/git-diff.txt --- git-2.19.1/Documentation/git-diff.txt 2018-09-27 20:46:40.000000000 +0000 +++ git-2.19.2/Documentation/git-diff.txt 2018-11-21 14:58:11.000000000 +0000 @@ -72,10 +72,10 @@ This form is to view the changes on the branch containing and up to the second , starting at a common ancestor of both . "git diff A\...B" is equivalent to - "git diff $(git-merge-base A B) B". You can omit any one + "git diff $(git merge-base A B) B". You can omit any one of , which has the same effect as using HEAD instead. -Just in case if you are doing something exotic, it should be +Just in case you are doing something exotic, it should be noted that all of the in the above description, except in the last two forms that use ".." notations, can be any . diff -Nru git-2.19.1/Documentation/git-interpret-trailers.txt git-2.19.2/Documentation/git-interpret-trailers.txt --- git-2.19.1/Documentation/git-interpret-trailers.txt 2018-09-27 20:46:40.000000000 +0000 +++ git-2.19.2/Documentation/git-interpret-trailers.txt 2018-11-21 14:58:11.000000000 +0000 @@ -56,8 +56,9 @@ least 25% trailers. The group must be preceded by one or more empty (or whitespace-only) lines. The group must either be at the end of the message or be the last -non-whitespace lines before a line that starts with '---'. Such three -minus signs start the patch part of the message. +non-whitespace lines before a line that starts with '---' (followed by a +space or the end of the line). Such three minus signs start the patch +part of the message. See also `--no-divider` below. When reading trailers, there can be whitespaces after the token, the separator and the value. There can also be whitespaces @@ -125,6 +126,11 @@ A convenience alias for `--only-trailers --only-input --unfold`. +--no-divider:: + Do not treat `---` as the end of the commit message. Use this + when you know your input contains just the commit message itself + (and not an email or the output of `git format-patch`). + CONFIGURATION VARIABLES ----------------------- diff -Nru git-2.19.1/Documentation/git-merge-base.txt git-2.19.2/Documentation/git-merge-base.txt --- git-2.19.1/Documentation/git-merge-base.txt 2018-09-27 20:46:40.000000000 +0000 +++ git-2.19.2/Documentation/git-merge-base.txt 2018-11-21 14:58:11.000000000 +0000 @@ -154,13 +154,13 @@ `origin/master` may have been rewound and rebuilt, leading to a history of this shape: - o---B2 + o---B2 / ---o---o---B1--o---o---o---B (origin/master) \ - B0 + B0 \ - D0---D1---D (topic) + D0---D1---D (topic) where `origin/master` used to point at commits B0, B1, B2 and now it points at B, and your `topic` branch was started on top of it back diff -Nru git-2.19.1/Documentation/gitmodules.txt git-2.19.2/Documentation/gitmodules.txt --- git-2.19.1/Documentation/gitmodules.txt 2018-09-27 20:46:40.000000000 +0000 +++ git-2.19.2/Documentation/gitmodules.txt 2018-11-21 14:58:11.000000000 +0000 @@ -67,7 +67,8 @@ submodule..ignore:: Defines under what circumstances "git status" and the diff family show a submodule as modified. The following values are supported: - ++ +-- all;; The submodule will never be considered modified (but will nonetheless show up in the output of status and commit when it has been staged). @@ -84,12 +85,14 @@ differences, and modifications to tracked and untracked files are shown. This is the default option. - If this option is also present in the submodules entry in .git/config - of the superproject, the setting there will override the one found in - .gitmodules. - Both settings can be overridden on the command line by using the - "--ignore-submodule" option. The 'git submodule' commands are not - affected by this setting. +If this option is also present in the submodules entry in .git/config +of the superproject, the setting there will override the one found in +.gitmodules. + +Both settings can be overridden on the command line by using the +"--ignore-submodule" option. The 'git submodule' commands are not +affected by this setting. +-- submodule..shallow:: When set to true, a clone of this submodule will be performed as a diff -Nru git-2.19.1/Documentation/git-rebase.txt git-2.19.2/Documentation/git-rebase.txt --- git-2.19.1/Documentation/git-rebase.txt 2018-09-27 20:46:40.000000000 +0000 +++ git-2.19.2/Documentation/git-rebase.txt 2018-11-21 14:58:11.000000000 +0000 @@ -954,7 +954,7 @@ to proceed. The `reset` command resets the HEAD, index and worktree to the specified -revision. It is isimilar to an `exec git reset --hard