{"thread":{"id":"50872","subject":"What's cooking in git.git (Apr 2019, #01; Thu, 4)","startedAt":"2019-04-04T10:29:09Z","lastAt":"2019-04-13T10:20:15Z","messageCount":19,"participants":["Junio C Hamano","Duy Nguyen","Todd Zullinger","Ævar Arnfjörð Bjarmason","Josh Steadmon","Nguyễn Thái Ngọc Duy","Eric Sunshine"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"373111","messageId":"xmqqr2aidpxw.fsf@gitster-ct.c.googlers.com","threadId":"50872","inReplyTo":null,"subject":"What's cooking in git.git (Apr 2019, #01; Thu, 4)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-04-04T10:28:59Z","receivedAt":"2019-04-04T10:29:09Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"What's cooking in git.git (Apr 2019, #01; Thu, 4)\n--------------------------------------------------\n\nHere are the topics that have been cooking.  Commits prefixed with\n'-' are only in 'pu' (proposed updates) while commits prefixed with\n'+' are in 'next'.  The ones marked with '.' do not appear in any of\nthe integration branches, but I am still holding onto them.\n\nSo, ... while I was offline for a week, there seems to have been\nquite a lot of activities around here.  Hopefully everybody had fun\nin the meantime ;-) \n\nI think I'm mostly caught up by now (except for an inevitable \"fell\nthru the cracks\" topic or three) and here is what I collected so\nfar, thinking that they may be worth looking at.  I haven't given\nany deep thought to many topics yet, so the topic description may be\neither totally lacking or completely incorrect, and their assessment\nmay be stale and not reflect the already-reached list concensus.\nAs always, help in updating them would be grately appreciated.\n\nYou can find the changes described here in the integration branches\nof the repositories listed at\n\n    http://git-blame.blogspot.com/p/git-public-repositories.html\n\n--------------------------------------------------\n[Graduated to \"master\"]\n\n* ab/makefile-help-devs-more (2019-02-24) 6 commits\n  (merged to 'next' on 2019-03-11 at 898f5f44bc)\n + Makefile: allow for combining DEVELOPER=1 and CFLAGS=\"...\"\n + Makefile: move the setting of *FLAGS closer to \"include\"\n + Makefile: Move *_LIBS assignment into its own section\n + Makefile: add/remove comments at top and tweak whitespace\n + Makefile: move \"strip\" assignment down from flags\n + Makefile: remove an out-of-date comment\n\n Originally merged to 'next' on 2019-03-07\n\n CFLAGS now can be tweaked when invoking Make while using\n DEVELOPER=YesPlease; this did not work well before.\n\n\n* br/commit-tree-parseopt (2019-03-08) 1 commit\n  (merged to 'next' on 2019-03-11 at e1228ef04f)\n + commit-tree: utilize parse-options api\n\n Originally merged to 'next' on 2019-03-08\n\n The command line parser of \"git commit-tree\" has been rewritten to\n use the parse-options API.\n\n\n* jk/bisect-final-output (2019-03-01) 3 commits\n  (merged to 'next' on 2019-03-11 at dea599eb04)\n + bisect: make diff-tree output prettier\n + bisect: fix internal diff-tree config loading\n + bisect: use string arguments to feed internal diff-tree\n\n Originally merged to 'next' on 2019-03-07\n\n The final report from \"git bisect\" used to show the suspected\n culprit using a raw \"diff-tree\", with which there is no output for\n a merge commit.  This has been updated to use a more modern and\n human readable output that still is concise enough.\n\n\n* jk/config-type-color-ends-with-lf (2019-03-07) 1 commit\n  (merged to 'next' on 2019-03-11 at 810b269d1a)\n + config: document --type=color output is a complete line\n\n Originally merged to 'next' on 2019-03-07\n\n \"git config --type=color ...\" is meant to replace \"git config --get-color\"\n but there is a slight difference that wasn't documented, which is\n now fixed.\n\n\n* jk/fsck-doc (2019-03-05) 2 commits\n  (merged to 'next' on 2019-03-11 at 5cd610f73e)\n + fsck: always compute USED flags for unreachable objects\n + doc/fsck: clarify --connectivity-only behavior\n\n Originally merged to 'next' on 2019-03-07\n\n \"git fsck --connectivity-only\" omits computation necessary to sift\n the objects that are not reachable from any of the refs into\n unreachable and dangling.  This is now enabled when dangling\n objects are requested (which is done by default, but can be\n overridden with the \"--no-dangling\" option).\n\n\n* jk/no-sigpipe-during-network-transport (2019-03-05) 2 commits\n  (merged to 'next' on 2019-03-11 at 25900acd0d)\n + fetch: ignore SIGPIPE during network operation\n + fetch: avoid calling write_or_die()\n\n Originally merged to 'next' on 2019-03-07\n\n On platforms where \"git fetch\" is killed with SIGPIPE (e.g. OSX),\n the upload-pack that runs on the other end that hangs up after\n detecting an error could cause \"git fetch\" to die with a signal,\n which led to a flakey test.  \"git fetch\" now ignores SIGPIPE during\n the network portion of its operation (this is not a problem as we\n check the return status from our write(2)s).\n\n\n* jk/virtual-objects-do-exist (2019-03-05) 1 commit\n  (merged to 'next' on 2019-03-11 at 748c79a1f0)\n + rev-list: allow cached objects in existence check\n\n Originally merged to 'next' on 2019-03-07\n\n A recent update broke \"is this object available to us?\" check for\n well-known objects like an empty tree (which should yield \"yes\",\n even when there is no on-disk object for an empty tree), which has\n been corrected.\n\n\n* js/rebase-orig-head-fix (2019-03-04) 4 commits\n  (merged to 'next' on 2019-03-11 at 4b1b19d391)\n + built-in rebase: set ORIG_HEAD just once, before the rebase\n + built-in rebase: demonstrate that ORIG_HEAD is not set correctly\n + built-in rebase: use the correct reflog when switching branches\n + built-in rebase: no need to check out `onto` twice\n\n Originally merged to 'next' on 2019-03-07\n\n \"git rebase\" that was reimplemented in C did not set ORIG_HEAD\n correctly, which has been corrected.\n\n\n* js/stress-test-ui-tweak (2019-03-04) 2 commits\n  (merged to 'next' on 2019-03-11 at 223afded1c)\n + tests: introduce --stress-jobs=<N>\n + tests: let --stress-limit=<N> imply --stress\n\n Originally merged to 'next' on 2019-03-07\n\n Dev support.\n\n\n* ma/clear-repository-format (2019-03-01) 2 commits\n  (merged to 'next' on 2019-03-11 at f3db1c278f)\n + setup: fix memory leaks with `struct repository_format`\n + setup: free old value before setting `work_tree`\n\n Originally merged to 'next' on 2019-03-07\n\n The setup code has been cleaned up to avoid leaks around the\n repository_format structure.\n\n\n* sx/evolve (2019-02-15) 8 commits\n . evolve: add the git change list command\n . evolve: implement the git change command\n . evolve: add support for writing metacommits\n . evolve: add the change-table structure\n . evolve: add support for parsing metacommits\n . ref-filter: add the metas namespace to ref-filter\n . sha1-array: implement oid_array_readonly_contains\n . technical doc: add a design doc for the evolve command\n\n The beginning of \"hg evolve\" mimicry.\n\n--------------------------------------------------\n[New Topics]\n\n* ms/worktree-add-atomic-mkdir (2019-03-12) 1 commit\n  (merged to 'next' on 2019-03-20 at ded442ed02)\n + worktree: fix worktree add race\n\n \"git worktree add\" used to do a \"find an available name with stat\n and then mkdir\", which is race-prone.  This has been fixed by using\n mkdir and reacting to EEXIST in a loop.\n\n Will merge to 'master'.\n\n\n* tb/stash-in-c-unused-param-fix (2019-03-11) 1 commit\n  (merged to 'next' on 2019-03-20 at 5ccac5f80d)\n + stash: drop unused parameter\n (this branch uses ps/stash-in-c; is tangled with js/stash-in-c-pathspec-fix and tg/stash-in-c-show-default-to-p-fix.)\n\n Code clean-up.\n\n Will cook in 'next'.\n\n\n* dl/subtree-limit-to-one-rev (2019-03-12) 1 commit\n - contrib/subtree: ensure only one rev is provided\n\n \"git subtree\" (in contrib/) update.\n\n Will merge to 'next'.\n\n\n* ar/t4150-remove-cruft (2019-03-13) 1 commit\n  (merged to 'next' on 2019-03-20 at a0106a8d5c)\n + t4150: remove unused variable\n\n Test cleanup.\n\n Will merge to 'master'.\n\n\n* cb/doco-mono (2019-03-13) 2 commits\n - doc: format pathnames and URLs as monospace.\n - doc/CodingGuidelines: URLs and paths as monospace\n\n Clean-up markup in the documentation suite.\n\n Will merge to 'next'.\n\n\n* cc/multi-promisor (2019-04-02) 11 commits\n - remote: add promisor and partial clone config to the doc\n - partial-clone: add multiple remotes in the doc\n - t0410: test fetching from many promisor remotes\n - builtin/fetch: remove unique promisor remote limitation\n - promisor-remote: parse remote.*.partialclonefilter\n - Use promisor_remote_get_direct() and has_promisor_remote()\n - promisor-remote: use repository_format_partial_clone\n - promisor-remote: add promisor_remote_reinit()\n - promisor-remote: implement promisor_remote_get_direct()\n - Add initial support for many promisor remotes\n - fetch-object: make functions return an error code\n\n Breaks 'pu'.\n\n\n* jk/promote-ggg (2019-03-13) 1 commit\n  (merged to 'next' on 2019-03-20 at 3db7d2566d)\n + point pull requesters to GitGitGadget\n\n Suggest GitGitGadget instead of submitGit as a way to submit\n patches based on GitHub PR to us.\n\n Will merge to 'master'.\n\n\n* jk/sha1dc (2019-03-13) 1 commit\n  (merged to 'next' on 2019-03-20 at 969280e8e5)\n + Makefile: fix unaligned loads in sha1dc with UBSan\n\n Build update for SHA-1 with collision detection.\n\n Will merge to 'master'.\n\n\n* jt/submodule-fetch-errmsg (2019-03-14) 1 commit\n  (merged to 'next' on 2019-03-20 at a6b0efa76f)\n + submodule: explain first attempt failure clearly\n\n Error message update.\n\n Will merge to 'master'.\n cf. <20190313175738.252961-1-jonathantanmy@google.com> (v2)\n\n\n* nd/switch-and-restore (2019-04-02) 39 commits\n - doc: promote \"git restore\"\n - completion: support restore\n - SQUASH??? move -p test to 2071 from 2070\n - t: add tests for restore\n - restore: support --patch\n - restore: default to --source=HEAD when only --index is specified\n - restore: add --worktree and --index\n - checkout: factor out worktree checkout code\n - restore: disable overlay mode by default\n - restore: make pathspec mandatory\n - restore: take tree-ish from --source option instead\n - checkout: split part of it to new command 'restore'\n - doc: promote \"git switch\"\n - completion: support switch\n - t: add tests for switch\n - switch: make --orphan switch to an empty tree\n - switch: reject if some operation is in progress\n - switch: no worktree status unless real branch switch happens\n - switch: implicit dwim, use --no-guess to disable it\n - switch: add short option for --detach\n - switch: only allow explicit detached HEAD\n - switch: reject \"do nothing\" case\n - switch: stop accepting pathspec\n - switch: remove -l\n - switch: add --discard-changes\n - switch: better names for -b and -B\n - checkout: split part of it to new command 'switch'\n - checkout: split options[] array in three pieces\n - checkout: move 'confict_style' and 'dwim_..' to checkout_opts\n - checkout: make \"opts\" in cmd_checkout() a pointer\n - checkout: factor out some code in parse_branchname_arg()\n - checkout: keep most #include sorted\n - checkout: inform the user when removing branch state\n - checkout: advice how to get out of detached HEAD mode\n - t: rename t2014-switch.sh to t2014-checkout-switch.sh\n - git-checkout.txt: fix monospace typeset\n - doc: document --overwrite-ignore\n - git-checkout.txt: fix one syntax line\n - git-checkout.txt: spell out --no-option\n\n Two new commands \"git switch\" and \"git restore\" are introduced to\n split \"checking out a branch to work on advancing its history\" and\n \"checking out paths out of the index and/or a tree-ish to work on\n advancing the current history\" out of the single \"git checkout\"\n command.\n\n cf. <20190329103919.15642-1-pclouds@gmail.com> (switch v6)\n cf. <20190308101655.9767-1-pclouds@gmail.com> (restore v1)\n\n\n* ab/doc-misc-typofixes (2019-03-18) 1 commit\n - doc: fix typos in man pages\n\n Typofixes.\n\n Will merge to 'next'.\n\n\n* ab/drop-scripted-rebase (2019-03-20) 1 commit\n - rebase: remove the rebase.useBuiltin setting\n\n Retire scripted \"git rebase\" implementation.\n\n Will merge to 'next'.\n\n\n* ab/gc-reflog (2019-04-01) 7 commits\n - gc: handle & check gc.reflogExpire config\n - reflog tests: assert lack of early exit with expiry=\"never\"\n - reflog tests: test for the \"points nowhere\" warning\n - reflog tests: make use of \"test_config\" idiom\n - gc: refactor a \"call me once\" pattern\n - gc: convert to using the_hash_algo\n - gc: remove redundant check for gc_auto_threshold\n\n Fix various glitches in \"git gc\" around reflog handling.\n\n cf. <20190328161434.19200-1-avarab@gmail.com> (v4)\n\n\n* ew/repack-with-bitmaps-by-default (2019-03-18) 3 commits\n - pack-objects: default to writing bitmap hash-cache\n - t5310: correctly remove bitmaps for jgit test\n - repack: enable bitmaps by default on bare repos\n\n The connectivity bitmaps are created by default in bare\n repositories now; also the pathname hash-cache is created by\n default to avoid making crappy deltas when repacking.\n\n Will merge to 'next'.\n\n\n* jk/perf-lib-tee (2019-03-18) 1 commit\n - perf-lib.sh: rely on test-lib.sh for --tee handling\n\n Code cleanup in the test framework.\n\n Will merge to 'next'.\n\n\n* js/check-docs-exe (2019-04-01) 5 commits\n - check-docs: fix for setups where executables have an extension\n - check-docs: do not expect guide pages to correspond to commands\n - check-docs: really look at the documented commands again\n - docs: do not document the `git remote-testgit` command\n - docs: move gitremote-helpers into section 7\n\n Dev support update.\n\n Will merge to 'next'.\n\n\n* js/difftool-no-index (2019-03-18) 3 commits\n - difftool: allow running outside Git worktrees with --no-index\n - parse-options: make OPT_ARGUMENT() more useful\n - difftool: remove obsolete (and misleading) comment\n\n \"git difftool\" can now run outside a repository.\n\n Will merge to 'next'.\n\n\n* js/get-short-oid-drop-cache (2019-03-14) 4 commits\n - get_oid(): when an object was not found, try harder\n - sequencer: move stale comment into correct location\n - sequencer: improve error message when an OID could not be parsed\n - rebase -i: demonstrate obscure loose object cache bug\n\n A corner-case object name ambiguity while the sequencer machinery\n is working (e.g. \"rebase -i -x\") has been (half) fixed.\n\n Will merge to 'next'.\n\n\n* ma/doc-diff-doc-vs-doctor-comparison (2019-03-18) 4 commits\n - doc-diff: add `--cut-header-footer`\n - doc-diff: support diffing from/to AsciiDoc(tor)\n - doc-diff: let `render_tree()` take an explicit directory name\n - Doc: auto-detect changed build flags\n\n Dev support update to make it easier to compare two formatted\n results from our documentation.\n\n Will merge to 'next'.\n cf. <20190319031412.GC6173@sigill.intra.peff.net>\n\n\n* mh/pack-protocol-doc-fix (2019-03-18) 1 commit\n - fix pack protocol example client/server communication\n\n Docfix.\n\n Will merge to 'next'.\n\n\n* nd/checkout-f-while-conflicted-fix (2019-03-21) 1 commit\n - unpack-trees: fix oneway_merge accidentally carry over stage index\n\n \"git checkout -f <branch>\" while the index has an unmerged path\n incorrectly left some paths in an unmerged state, which has been\n corrected.\n\n Will merge to 'next'.\n\n\n* pw/cherry-pick-continue (2019-03-18) 3 commits\n - cherry-pick --continue: remember options\n - cherry-pick: demonstrate option amnesia\n - sequencer: break some long lines\n\n \"git cherry-pick --options A..B\", after giving control back to the\n user to ask help resolving a conflicted step, did not honor the\n options it originally received, which has been corrected.\n\n Will merge to 'next'.\n\n\n* pw/rerere-autoupdate (2019-03-18) 2 commits\n - merge: tweak --rerere-autoupdate documentation\n - am/cherry-pick/rebase/revert: document --rerere-autoupdate\n\n Doc updates.\n\n Will merge to 'next'.\n\n\n* sg/test-atexit (2019-03-14) 11 commits\n - t9811-git-p4-label-import: fix pipeline negation\n - git p4 test: disable '-x' tracing in the p4d watchdog loop\n - git p4 test: simplify timeout handling\n - git p4 test: clean up the p4d cleanup functions\n - git p4 test: use 'test_atexit' to kill p4d and the watchdog process\n - t0301-credential-cache: use 'test_atexit' to stop the credentials helper\n - tests: use 'test_atexit' to stop httpd\n - git-daemon: use 'test_atexit` to stop 'git-daemon'\n - test-lib: introduce 'test_atexit'\n - t/lib-git-daemon: make sure to kill the 'git-daemon' process\n - test-lib: fix interrupt handling with 'dash' and '--verbose-log -x'\n\n Test framework update to more robustly clean up leftover files and\n processes after tests are done.\n\n Will merge to 'next'.\n\n\n* tb/trace2-va-list-fix (2019-03-20) 1 commit\n - trace2: NULL is not allowed for va_list\n\n Fix some code that passed a NULL when a va_list was expected.\n\n Will merge to 'next'.\n\n\n* tg/glossary-overlay (2019-03-18) 1 commit\n - glossary: add definition for overlay\n\n Doc update.\n\n Will merge to 'next'.\n\n\n* tg/stash-in-c-show-default-to-p-fix (2019-03-21) 1 commit\n - stash: setup default diff output format if necessary\n (this branch uses ps/stash-in-c; is tangled with js/stash-in-c-pathspec-fix and tb/stash-in-c-unused-param-fix.)\n\n A regression fix.\n\n Will merge to 'next'.\n\n\n* tz/completion (2019-03-21) 4 commits\n - completion: use __git when calling --list-cmds\n - completion: fix multiple command removals\n - t9902: test multiple removals via completion.commands\n - git: read local config in --list-cmds\n\n The completion helper code now pays attention to repository-local\n configuration (when available), which allows --list-cmds to honour\n a repository specific setting of completion.commands, for example.\n\n Will merge to 'next'.\n cf. <20190320180329.22280-1-tmz@pobox.com> (v3)\n\n\n* tz/t4038-bash-redirect-target-workaround (2019-03-18) 1 commit\n - t4038-diff-combined: quote paths with whitespace\n\n Work-around extra warning from bash in our tests.\n\n Will merge to 'next'.\n\n\n* jc/format-patch-noclobber (2019-02-22) 1 commit\n - format-patch: --no-clobber refrains from overwriting output files\n (this branch uses jc/format-patch-error-check.)\n\n\n\n* jk/unused-params-even-more (2019-03-21) 13 commits\n - parse_opt_ref_sorting: always use with NONEG flag\n - pretty: drop unused strbuf from parse_padding_placeholder()\n - pretty: drop unused \"type\" parameter in needs_rfc2047_encoding()\n - parse-options: drop unused ctx parameter from show_gitcomp()\n - fetch_pack(): drop unused parameters\n - report_path_error(): drop unused prefix parameter\n - unpack-trees: drop unused error_type parameters\n - unpack-trees: drop name_entry from traverse_by_cache_tree()\n - test-date: drop unused \"now\" parameter from parse_dates()\n - update-index: drop unused prefix_length parameter from do_reupdate()\n - log: drop unused \"len\" from show_tagger()\n - log: drop unused rev_info from early output\n - revision: drop some unused \"revs\" parameters\n\n Code cleanup\n\n Will merge to 'next'.\n\n\n* ab/commit-graph-fixes (2019-04-01) 8 commits\n - commit-graph: improve & i18n error messages\n - commit-graph write: don't die if the existing graph is corrupt\n - commit-graph verify: detect inability to read the graph\n - commit-graph: don't pass filename to load_commit_graph_one_fd_st()\n - commit-graph: don't early exit(1) on e.g. \"git status\"\n - commit-graph: fix segfault on e.g. \"git status\"\n - commit-graph tests: test a graph that's too small\n - commit-graph tests: split up corrupt_graph_and_verify()\n\n Code cleanup with more careful error checking before using data\n read from the commit-graph file.\n\n Will merge to 'next'.\n\n\n* ab/gc-docs (2019-04-01) 12 commits\n - SQAUSH??? fixup! gc docs: include the \"gc.*\" section from \"config\" in \"gc\"\n - gc docs: remove incorrect reference to gc.auto=0\n - gc docs: clarify that \"gc\" doesn't throw away referenced objects\n - gc docs: note \"gc --aggressive\" in \"fast-import\"\n - gc docs: downplay the usefulness of --aggressive\n - gc docs: note how --aggressive impacts --window & --depth\n - gc docs: fix formatting for \"gc.writeCommitGraph\"\n - gc docs: re-flow the \"gc.*\" section in \"config\"\n - gc docs: include the \"gc.*\" section from \"config\" in \"gc\"\n - gc docs: clean grammar for \"gc.bigPackThreshold\"\n - gc docs: stop noting \"repack\" flags\n - gc docs: modernize the advice for manually running \"gc\"\n\n\n\n* ab/test-lib-pass-trace2-env (2019-04-01) 1 commit\n - test-lib: whitelist GIT_TR2_* in the environment\n\n Allow tracing of Git executable while running out tests.\n\n Will merge to 'next'.\n\n\n* am/p4-branches-excludes (2019-04-02) 8 commits\n - git-p4: respect excluded paths when detecting branches\n - git-p4: add failing test for \"git-p4: respect excluded paths when detecting branches\"\n - git-p4: don't exclude other files with same prefix\n - git-p4: add failing test for \"don't exclude other files with same prefix\"\n - git-p4: don't groom exclude path list on every commit\n - git-p4: match branches case insensitively if configured\n - git-p4: add failing test for \"git-p4: match branches case insensitively if configured\"\n - git-p4: detect/prevent infinite loop in gitCommitByP4Change()\n\n \"git p4\" update.\n\n\n* bb/unicode-12 (2019-03-22) 1 commit\n - unicode: update the width tables to Unicode 12\n\n Unicode update.\n\n Will merge to 'next'.\n\n\n* bc/hash-transition-16 (2019-04-01) 35 commits\n - gitweb: make hash size independent\n - Git.pm: make hash size independent\n - read-cache: read data in a hash-independent way\n - dir: make untracked cache extension hash size independent\n - builtin/difftool: use parse_oid_hex\n - refspec: make hash size independent\n - archive: convert struct archiver_args to object_id\n - builtin/get-tar-commit-id: make hash size independent\n - get-tar-commit-id: parse comment record\n - hash: add a function to lookup hash algorithm by length\n - remote-curl: make hash size independent\n - http: replace sha1_to_hex\n - http: compute hash of downloaded objects using the_hash_algo\n - http: replace hard-coded constant with the_hash_algo\n - http-walker: replace sha1_to_hex\n - http-push: remove remaining uses of sha1_to_hex\n - http-backend: allow 64-character hex names\n - http-push: convert to use the_hash_algo\n - builtin/pull: make hash-size independent\n - builtin/am: make hash size independent\n - fast-import: replace sha1_to_hex\n - fast-import: make hash-size independent\n - builtin/name-rev: make hash-size independent\n - object-store: rename and expand packed_git's sha1 member\n - notes: replace sha1_to_hex\n - notes: make hash size independent\n - notes-merge: switch to use the_hash_algo\n - submodule: avoid hard-coded constants\n - pack-bitmap: switch hash tables to use struct object_id\n - pack-bitmap: switch hard-coded constants to the_hash_algo\n - pack-bitmap: replace sha1_to_hex\n - pack-bitmap: convert struct stored_bitmap to object_id\n - pack-bitmap: make bitmap header handling hash agnostic\n - khash: move oid hash table definition\n - t/lib-submodule-update: use appropriate length constant\n\n Conversion from unsigned char[20] to struct object_id continues.\n\n Will merge to 'next'.\n\n\n\n* cc/replace-graft-peel-tags (2019-04-01) 4 commits\n - replace: fix --graft when passing a tag first\n - replace: fix --graft when passing a tag as parent\n - t6050: redirect expected error output to a file\n - t6050: use test_line_count instead of wc -l\n\n When given a tag that points at a commit-ish, \"git replace --graft\"\n failed to peel the tag before writing a replace ref, which did not\n make sense because the old graft mechanism the feature wants to\n mimick only allowed to replace one commit object with another.\n This has been fixed.\n\n The title of the top two commits are fairly useless and does not\n say how the issue was fixed, but the fix is to peel the given tag\n ourselves down to the underlying commit object.\n\n Will merge to 'next'.\n\n\n* dk/blame-keep-origin-blob (2019-04-03) 1 commit\n - blame.c: don't drop origin blobs as eagerly\n\n Performance fix around \"git blame\", especially in a linear history\n (which is the norm we should optimize for).\n\n Will merge to 'next'.\n\n\n* dl/forbid-tagging-a-tag (2019-04-03) 3 commits\n - SQUASH???\n - tag: prevent nested tags\n - tag: fix formatting\n\n \"git tag $newtag $obj\", when $obj is another tag, now aborts,\n requiring a new --allow-nested-tag option, even though an\n invocation with $obj that is a blob or a tree is silently allowed,\n which does not make much sense.\n \n Will discard.\n\n\n* dl/rebase-i-keep-base (2019-04-03) 4 commits\n - rebase: teach rebase --keep-base\n - rebase: fast-forward --onto in more cases\n - t3432: test rebase fast-forward behavior\n - t3431: add rebase --fork-point tests\n\n \"git rebase --keep-base <upstream>\" tries to find the original base\n of the topic being rebased and rebase on top of that same base, which\n is useful when running the \"git rebase -i\" (and its limited variant\n \"git rebase -x\").\n\n Will merge to 'next'.\n\n\n* en/fast-import-parsing-fix (2019-04-01) 5 commits\n - fast-import: fix erroneous handling of get-mark with empty orphan commits\n - fast-import: only allow cat-blob requests where it makes sense\n - fast-import: check most prominent commands first\n - git-fast-import.txt: fix wording about where ls command can appear\n - t9300: demonstrate bug with get-mark and empty orphan commits\n\n \"git fast-import\" update.\n\n Will merge to 'next'.\n\n\n* jh/midx-verify-too-many-packs (2019-03-22) 4 commits\n - midx: during verify group objects by packfile to speed verification\n - midx: add progress indicators in multi-pack-index verify\n - trace2:data: add trace2 data to midx\n - progress: add sparse mode to force 100% complete message\n\n \"git multi-pack-index verify\" did not scale well with the number of\n packfiles, which is being improved.\n\n Will merge to 'next'.\n\n\n* jh/trace2-sid-fix (2019-04-01) 7 commits\n - trace2: make SIDs more unique\n - trace2: clarify UTC datetime formatting\n - trace2: report peak memory usage of the process\n - trace2: use system config for default trace2 settings\n - trace2: find exec-dir before trace2 initialization\n - trace2: add absolute elapsed time to start event\n - trace2: refactor setting process starting time\n\n Polishing of the new trace2 facility continues.  The system-level\n configuration can specify site-wide trace2 settings (which would be\n loved by big-brother types ;-).\n\n Getting closer but still being discussed.\n cf. <20190403000032.GA190454@google.com>\n\n\n* jk/http-walker-status-fix (2019-03-24) 3 commits\n - http: use normalize_curl_result() instead of manual conversion\n - http: normalize curl results for dumb loose and alternates fetches\n - http: factor out curl result code normalization\n\n dumb-http walker has been updated to share more error recovery\n strategy with the normal codepath.\n\n Will merge to 'next'.\n\n\n* jk/refs-double-abort (2019-03-22) 2 commits\n - refs/files-backend: don't look at an aborted transaction\n - refs/files-backend: handle packed transaction prepare failure\n\n A corner case bug in the refs API has been corrected.\n\n Will merge to 'next'.\n\n\n* js/spell-out-options-in-tests (2019-04-02) 8 commits\n - tests: disallow the use of abbreviated options (by default)\n - tests (pack-objects): use the full, unabbreviated `--revs` option\n - tests (status): spell out the `--find-renames` option in full\n - tests (push): do not abbreviate the `--follow-tags` option\n - t5531: avoid using an abbreviated option\n - t7810: do not abbreviate `--no-exclude-standard` nor `--invert-match`\n - tests (rebase): spell out the `--force-rebase` option\n - tests (rebase): spell out the `--keep-empty` option\n\n The tests have been updated not to rely on the abbreviated option\n names the parse-options API offers, to protect us from an\n abbreviated form of an option that used to be unique within the\n command getting non-unique when a new option that share the same\n prefix is added.\n\n Will merge to 'next'.\n\n\n* js/trace2-to-directory (2019-03-22) 1 commit\n - trace2: write to directory targets\n\n The trace2 tracing facility learned to auto-generate a filename\n when told to log to a directory.\n\n Will merge to 'next'.\n\n\n* jt/batch-fetch-blobs-in-diff (2019-04-01) 2 commits\n - diff: batch fetching of missing blobs\n - sha1-file: support OBJECT_INFO_FOR_PREFETCH\n\n While running \"git diff\" in a lazy clone, we can upfront know which\n missing blobs we will need, instead of waiting for the on-demand\n machinery to discover them one by one.  Aim to achieve better\n performance by batching the request for these promised blobs.\n\n Will merge to 'next'.\n\n\n* jt/fetch-no-update-shallow-in-proto-v2 (2019-04-01) 3 commits\n - fetch-pack: respect --no-update-shallow in v2\n - fetch-pack: call prepare_shallow_info only if v0\n - Merge branch 'jt/test-protocol-version' into jt/fetch-no-update-shallow-in-proto-v2\n (this branch uses jt/test-protocol-version.)\n\n Fix for protocol v2 support in \"git fetch-pack\" of shallow clones.\n\n Will merge to 'next'.\n\n\n* jt/fetch-pack-wanted-refs-optim (2019-04-01) 1 commit\n - fetch-pack: binary search when storing wanted-refs\n\n Performance fix around \"git fetch\" that grabs many refs.\n\n Will merge to 'next'.\n\n\n* jt/t5551-protocol-v2-does-not-have-half-auth (2019-03-24) 1 commit\n - t5551: mark half-auth no-op fetch test as v0-only\n\n Test update.\n\n Will merge to 'next'.\n\n\n\n* km/empty-repo-is-still-a-repo (2019-04-03) 4 commits\n - dir: do not traverse repositories with no commits\n - t3009: test that ls-files -o traverses bogus repo\n - t3000: move non-submodule repo test to separate file\n - submodule: refuse to add repository with no commits\n\n Running \"git add\" on a repository created inside the current\n repository is an explicit indication that the user wants to add it\n as a submodule, but when the HEAD of the inner repository is on an\n unborn branch, it cannot be added as a submodule.  Worse, the files\n in its working tree can be added as if they are a part of the outer\n repository, which is not what the user wants.  These problems are\n being addressed.\n\n Getting there.\n cf. <87bm1mbua4.fsf@kyleam.com>\n\n\n* nd/checkout-m (2019-03-24) 4 commits\n - checkout: prevent losing staged changes with --merge\n - read-tree: add --quiet\n - unpack-trees: rename \"gently\" flag to \"quiet\"\n - unpack-trees: keep gently check inside add_rejected_path\n\n \"git checkout -m <other>\" was about carrying the differences\n between HEAD and the working-tree files forward while checking out\n another branch, and ignored the differences between HEAD and the\n index.  The command has been taught to abort when the index and the\n HEAD are different.\n\n Will merge to 'next'.\n\n\n* nd/checkout-m-doc-update (2019-03-21) 1 commit\n - checkout.txt: note about losing staged changes with --merge\n\n Doc about the above.\n\n Will merge to 'next'.\n\n\n* nd/commit-a-with-paths-msg-update (2019-03-22) 1 commit\n - commit: improve error message in \"-a <paths>\" case\n\n The message given when \"git commit -a <paths>\" errors out has been\n updated.\n\n Will merge to 'next'.\n\n\n* nd/diff-parseopt-4 (2019-03-24) 20 commits\n - am: avoid diff_opt_parse()\n - diff --no-index: use parse_options() instead of diff_opt_parse()\n - range-diff: use parse_options() instead of diff_opt_parse()\n - diff.c: allow --no-color-moved-ws\n - diff-parseopt: convert --color-moved-ws\n - diff-parseopt: convert --[no-]color-moved\n - diff-parseopt: convert --inter-hunk-context\n - diff-parseopt: convert --no-prefix\n - diff-parseopt: convert --line-prefix\n - diff-parseopt: convert --[src|dst]-prefix\n - diff-parseopt: convert --[no-]abbrev\n - diff-parseopt: convert --diff-filter\n - diff-parseopt: convert --find-object\n - diff-parseopt: convert -O\n - diff-parseopt: convert --pickaxe-all|--pickaxe-regex\n - diff-parseopt: convert -S|-G\n - diff-parseopt: convert -l\n - diff-parseopt: convert -z\n - diff-parseopt: convert --ita-[in]visible-in-index\n - diff-parseopt: convert --ws-error-highlight\n (this branch uses nd/diff-parseopt-3.)\n\n Fourth batch to teach the diff machinery to use the parse-options\n API.\n\n Will merge to 'next'.\n\n\n* nd/include-if-wildmatch (2019-04-01) 1 commit\n - config: correct '**' matching in includeIf patterns\n\n A buglet in configuration parser has been fixed.\n\n Will merge to 'next'.\n\n\n* nd/interpret-trailers-docfix (2019-04-01) 1 commit\n - interpret-trailers.txt: start the desc line with a capital letter\n\n Doc update.\n\n Will merge to 'next'.\n\n\n\n* nd/precious (2019-04-01) 1 commit\n - Introduce \"precious\" file concept\n\n \"git clean\" learned to pay attention to the 'precious' attributes\n and keep untracked paths with the attribute instead of removing.\n\n Will merge to 'next'.\n\n\n* nd/read-tree-reset-doc (2019-04-02) 1 commit\n - read-tree.txt: clarify --reset and worktree changes\n\n The documentation for \"git read-tree --reset -u\" has been updated.\n\n Will merge to 'next'.\n\n\n* nd/sha1-name-c-wo-the-repository (2019-04-02) 31 commits\n - sha1-name.c: remove the_repo from get_oid_mb()\n - sha1-name.c: remove the_repo from other get_oid_*\n - sha1-name.c: remove the_repo from maybe_die_on_misspelt_object_name\n - submodule-config.c: use repo_get_oid for reading .gitmodules\n - sha1-name.c: add repo_get_oid()\n - sha1-name.c: remove the_repo from get_oid_with_context_1()\n - sha1-name.c: remove the_repo from resolve_relative_path()\n - sha1-name.c: remove the_repo from diagnose_invalid_index_path()\n - sha1-name.c: remove the_repo from handle_one_ref()\n - sha1-name.c: remove the_repo from get_oid_1()\n - sha1-name.c: remove the_repo from get_oid_basic()\n - sha1-name.c: remove the_repo from get_describe_name()\n - sha1-name.c: remove the_repo from get_oid_oneline()\n - sha1-name.c: add repo_interpret_branch_name()\n - sha1-name.c: remove the_repo from interpret_branch_mark()\n - sha1-name.c: remove the_repo from interpret_nth_prior_checkout()\n - sha1-name.c: remove the_repo from get_short_oid()\n - sha1-name.c: add repo_for_each_abbrev()\n - sha1-name.c: store and use repo in struct disambiguate_state\n - sha1-name.c: add repo_find_unique_abbrev_r()\n - sha1-name.c: remove the_repo from find_abbrev_len_packed()\n - sha1-name.c: remove the_repo from sort_ambiguous()\n - commit.c: add repo_get_commit_tree()\n - refs.c: remove the_repo from read_ref_at()\n - refs.c: add repo_dwim_log()\n - refs.c: add repo_dwim_ref()\n - refs.c: remove the_repo from expand_ref()\n - refs.c: remove the_repo from substitute_branch_name()\n - refs.c: add refs_shorten_unambiguous_ref()\n - refs.c: add refs_ref_exists()\n - packfile.c: add repo_approximate_object_count()\n\n\n* pw/rebase-i-internal-rfc (2019-03-21) 12 commits\n - rebase -i: run without forking rebase--interactive\n - rebase: use a common action enum\n - rebase -i: use struct rebase_options in do_interactive_rebase()\n - rebase -i: use struct rebase_options to parse args\n - rebase -i: use struct object_id for squash_onto\n - rebase -i: use struct commit when parsing options\n - rebase -i: remove duplication\n - rebase -i: combine rebase--interactive.c with rebase.c\n - rebase: use OPT_RERERE_AUTOUPDATE()\n - rebase: rename write_basic_state()\n - sequencer: always discard index after checkout\n - Merge branch 'ag/sequencer-reduce-rewriting-todo' into pw/rebase-i-internal-rfc\n (this branch uses ag/sequencer-reduce-rewriting-todo.)\n\n The internal implementation of \"git rebase -i\" has been updated to\n avoid forking a separate \"rebase--interactive\" process.\n\n\n* sg/asciidoctor-in-ci (2019-04-01) 6 commits\n - ci: fix AsciiDoc/Asciidoctor stderr check in the documentation build job\n - ci: stick with Asciidoctor v1.5.8 for now\n - ci: install Asciidoctor in 'ci/install-dependencies.sh'\n - Documentation/technical/protocol-v2.txt: fix formatting\n - Documentation/technical/api-config.txt: fix formatting\n - Documentation/git-diff-tree.txt: fix formatting\n\n Update our support to format documentation in the CI environment,\n either with AsciiDoc ro Asciidoctor.\n\n Will merge to 'next'.\n\n\n* sg/index-pack-progress (2019-04-01) 1 commit\n - index-pack: show progress while checking objects\n\n size_t???\n\n\n* sg/overlong-progress-fix (2019-04-02) 4 commits\n - progress: break too long progress bar lines\n - progress: clear previous progress update dynamically\n - progress: assemble percentage and counters in a strbuf before printing\n - progress: make display_progress() return void\n\n Updating the display with progress message has been cleaned up to\n deal better with overlong messages.\n\n Will merge to 'next'.\n\n\n* sg/t5318-cleanup (2019-03-24) 1 commit\n - t5318-commit-graph: remove unused variable\n\n Code cleanup.\n\n Will merge to 'next'.\n\n\n* tz/asciidoctor-fixes (2019-04-01) 2 commits\n - Documentation/git-status: fix titles in porcelain v2 section\n - Documentation/rev-list-options: wrap --date=<format> block with \"--\"\n\n Doc updates.\n\n Will merge to 'next'.\n\n--------------------------------------------------\n[Stalled]\n\n* js/add-i-coalesce-after-editing-hunk (2018-08-28) 1 commit\n - add -p: coalesce hunks before testing applicability\n\n Applicability check after a patch is edited in a \"git add -i/p\"\n session has been improved.\n\n Will hold.\n cf. <e5b2900a-0558-d3bf-8ea1-d526b078bbc2@talktalk.net>\n\n\n* ds/midx-expire-repack (2019-01-27) 10 commits\n - midx: add test that 'expire' respects .keep files\n - multi-pack-index: test expire while adding packs\n - midx: implement midx_repack()\n - multi-pack-index: prepare 'repack' subcommand\n - multi-pack-index: implement 'expire' subcommand\n - midx: refactor permutation logic and pack sorting\n - midx: simplify computation of pack name lengths\n - multi-pack-index: prepare for 'expire' subcommand\n - Docs: rearrange subcommands for multi-pack-index\n - repack: refactor pack deletion for future use\n\n \"git multi-pack-index expire/repack\" are new subcommands that\n consult midx file and are used to drop unused pack files and\n coalesce small pack files that are still in use.\n\n Comments?\n\n\n* js/protocol-advertise-multi (2018-12-28) 1 commit\n - protocol: advertise multiple supported versions\n\n The transport layer has been updated so that the protocol version\n used can be negotiated between the parties, by the initiator\n listing the protocol versions it is willing to talk, and the other\n side choosing from one of them.\n\n Expecting a reroll.\n cf. <CANq=j3u-zdb_FvNJGPCmygNMScseav63GhVvBX3NcVS4f7TejA@mail.gmail.com>\n\n\n* mk/use-size-t-in-zlib (2018-10-15) 1 commit\n - zlib.c: use size_t for size\n\n The wrapper to call into zlib followed our long tradition to use\n \"unsigned long\" for sizes of regions in memory, which have been\n updated to use \"size_t\".\n\n\n* dl/remote-save-to-push (2018-12-11) 1 commit\n - remote: add --save-to-push option to git remote set-url\n\n \"git remote set-url\" learned a new option that moves existing value\n of the URL field to pushURL field of the remote before replacing\n the URL field with a new value.\n\n Anybody who wants to champion this topic?\n I am personally not yet quite convinced if this is worth pursuing.\n\n--------------------------------------------------\n[Cooking]\n\n* nb/branch-show-other-worktrees-head (2019-03-18) 3 commits\n - branch: add worktree info on verbose output\n - branch: update output to include worktree info\n - ref-filter: add worktreepath atom\n\n \"git branch --list\" learned to show branches that are checked out\n in other worktrees connected to the same repository prefixed with\n '+', similar to the way the currently checked out branch is shown\n with '*' in front.\n\n Getting there...\n cf. <20190316013807.38756-1-nbelakovski@gmail.com> (v9)\n cf. <20190318121054.GC24175@szeder.dev>\n\n\n* dl/ignore-docs (2019-03-08) 2 commits\n  (merged to 'next' on 2019-03-20 at f1f50c07ef)\n + docs: move core.excludesFile from git-add to gitignore\n + git-clean.txt: clarify ignore pattern files\n\n Doc update.\n\n Will merge to 'master'.\n\n\n* jh/resize-convert-scratch-buffer (2019-03-08) 1 commit\n  (merged to 'next' on 2019-03-20 at 92a24b29ed)\n + convert: avoid malloc of original file size\n\n When the \"clean\" filter can reduce the size of a huge file in the\n working tree down to a small \"token\" (a la Git LFS), there is no\n point in allocating a huge scratch area upfront, but the buffer is\n sized based on the original file size.  The convert mechanism now\n allocates very minimum and reallocates as it receives the output\n from the clean filter process.\n\n Will merge to 'master'.\n\n\n* jk/line-log-with-patch (2019-03-11) 2 commits\n  (merged to 'next' on 2019-03-20 at 21afea908c)\n + line-log: detect unsupported formats\n + line-log: suppress diff output with \"-s\"\n\n \"git log -L<from>,<to>:<path>\" with \"-s\" did not suppress the patch\n output as it should.  This has been corrected.\n\n Will merge to 'master'.\n\n\n* js/rebase-deprecate-preserve-merges (2019-03-12) 1 commit\n  (merged to 'next' on 2019-03-20 at 32baac3acd)\n + rebase: deprecate --preserve-merges\n\n \"git rebase --rebase-merges\" replaces its old \"--preserve-merges\"\n option; the latter is now marked as deprecated.\n\n Will merge to 'master'.\n\n\n* js/init-db-update-for-mingw (2019-03-12) 1 commit\n - mingw: respect core.hidedotfiles = false in git-init again\n\n \"git init\" forgot to read platform-specific repository\n configuration, which made Windows port to ignore settings of\n core.hidedotfiles, for example.\n\n Will merge to 'next'.\n\n\n* js/stash-in-c-pathspec-fix (2019-03-12) 3 commits\n  (merged to 'next' on 2019-03-20 at e81d08af7a)\n + stash: pass pathspec as pointer\n + built-in stash: handle :(glob) pathspecs again\n + legacy stash: fix \"rudimentary backport of -q\"\n (this branch uses ps/stash-in-c; is tangled with tb/stash-in-c-unused-param-fix and tg/stash-in-c-show-default-to-p-fix.)\n\n Further fixes to \"git stash\" reimplemented in C.\n\n Will cook in 'next'.\n\n\n* nd/rewritten-ref-is-per-worktree (2019-03-08) 3 commits\n  (merged to 'next' on 2019-03-20 at 5369a2e1f6)\n + Make sure refs/rewritten/ is per-worktree\n + files-backend.c: reduce duplication in add_per_worktree_entries_to_dir()\n + files-backend.c: factor out per-worktree code in loose_fill_ref_dir()\n\n \"git rebase\" uses the refs/rewritten/ hierarchy to store its\n intermediate states, which inherently makes the hierarchy per\n worktree, but it didn't quite work well.\n\n Will merge to 'master'.\n\n\n* js/remote-curl-i18n (2019-03-06) 1 commit\n - remote-curl: mark all error messages for translation\n (this branch uses js/anonymize-remote-curl-diag.)\n\n Error messages given from the http transport have been updated so\n that they can be localized.\n\n Will merge to 'next'.\n\n\n* ma/asciidoctor-fixes-more (2019-03-07) 5 commits\n - Documentation: turn middle-of-line tabs into spaces\n - git-svn.txt: drop escaping '\\' that ends up being rendered\n - git.txt: remove empty line before list continuation\n - config/fsck.txt: avoid starting line with dash\n - config/diff.txt: drop spurious backtick\n\n Documentation mark-up fixes.\n\n Will merge to 'next'.\n\n\n* nd/diff-parseopt-3 (2019-03-07) 20 commits\n  (merged to 'next' on 2019-03-20 at ee79d4924b)\n + diff-parseopt: convert --submodule\n + diff-parseopt: convert --ignore-submodules\n + diff-parseopt: convert --textconv\n + diff-parseopt: convert --ext-diff\n + diff-parseopt: convert --quiet\n + diff-parseopt: convert --exit-code\n + diff-parseopt: convert --color-words\n + diff-parseopt: convert --word-diff-regex\n + diff-parseopt: convert --word-diff\n + diff-parseopt: convert --[no-]color\n + diff-parseopt: convert --[no-]follow\n + diff-parseopt: convert -R\n + diff-parseopt: convert -a|--text\n + diff-parseopt: convert --full-index\n + diff-parseopt: convert --binary\n + diff-parseopt: convert --anchored\n + diff-parseopt: convert --diff-algorithm\n + diff-parseopt: convert --histogram\n + diff-parseopt: convert --patience\n + diff-parseopt: convert --[no-]indent-heuristic\n (this branch is used by nd/diff-parseopt-4.)\n\n Third batch to teach the diff machinery to use the parse-options\n API.\n\n Will merge to 'master'.\n cf. <20190305123026.7266-1-pclouds@gmail.com>\n\n\n* jt/test-protocol-version (2019-03-07) 8 commits\n  (merged to 'next' on 2019-03-20 at 0c97907bdb)\n + t5552: compensate for v2 filtering ref adv.\n + tests: fix protocol version for overspecifications\n + t5700: only run with protocol version 1\n + t5512: compensate for v0 only sending HEAD symrefs\n + t5503: fix overspecification of trace expectation\n + tests: always test fetch of unreachable with v0\n + t5601: check ssh command only with protocol v0\n + tests: define GIT_TEST_PROTOCOL_VERSION\n (this branch is used by jt/fetch-no-update-shallow-in-proto-v2.)\n\n Help developers by making it easier to run most of the tests under\n different versions of over-the-wire protocols.\n\n Will merge to 'master'.\n cf. <cover.1551131153.git.jonathantanmy@google.com>\n\n\n* js/anonymize-remote-curl-diag (2019-03-05) 1 commit\n - curl: anonymize URLs in error messages and warnings\n (this branch is used by js/remote-curl-i18n.)\n\n remote-http transport did not anonymize URLs reported in its error\n messages at places.\n\n Will merge to 'next'.\n\n\n* ma/asciidoctor-fixes (2019-03-11) 3 commits\n - asciidoctor-extensions: fix spurious space after linkgit\n - Documentation/Makefile: add missing dependency on asciidoctor-extensions\n - Documentation/Makefile: add missing xsl dependencies for manpages\n\n Build fix around use of asciidoctor instead of asciidoc\n\n Will merge to 'next'.\n\n\n* nd/worktree-name-sanitization (2019-03-20) 2 commits\n - SQUASH???\n - worktree add: sanitize worktree names\n\n In recent versions of Git, per-worktree refs are exposed in\n refs/worktrees/<wtname>/ hierarchy, which means that worktree names\n must be a valid refname component.  The code now sanitizes the names\n given to worktrees, to make sure these refs are well-formed.\n\n\n* ra/t3600-test-path-funcs (2019-03-08) 3 commits\n  (merged to 'next' on 2019-03-20 at 404110d291)\n + t3600: use helpers to replace test -d/f/e/s <path>\n + t3600: modernize style\n + test functions: add function `test_file_not_empty`\n\n A GSoC micro.\n\n Will merge to 'master'.\n cf. <20190304120801.28763-1-rohit.ashiwal265@gmail.com> (v3)\n\n\n* dl/reset-doc-no-wrt-abbrev (2019-03-06) 1 commit\n  (merged to 'next' on 2019-03-20 at 984b4586c7)\n + git-reset.txt: clarify documentation\n\n Doc update.\n\n Will merge to 'master'.\n\n\n* ja/dir-rename-doc-markup-fix (2019-03-06) 1 commit\n  (merged to 'next' on 2019-03-20 at f3238df381)\n + Doc: fix misleading asciidoc formating\n\n Doc update.\n\n Will merge to 'master'.\n\n\n* bp/post-index-change-hook (2019-02-15) 1 commit\n  (merged to 'next' on 2019-03-11 at cb96d1d7c4)\n + read-cache: add post-index-change hook\n\n Originally merged to 'next' on 2019-02-23\n\n A new hook \"post-index-change\" is called when the on-disk index\n file changes, which can help e.g. a virtualized working tree\n implementation.\n\n Will cook in 'next'.\n\n\n* jc/format-patch-error-check (2019-02-22) 2 commits\n - format-patch: notice failure to open cover letter for writing\n - builtin/log: downcase the beginning of error messages\n (this branch is used by jc/format-patch-noclobber.)\n\n \"git format-patch\" used overwrite an existing patch/cover-letter\n file.  A new \"--no-clobber\" option stops it.\n\n Will merge to 'next'.\n\n\n* jt/fetch-cdn-offload (2019-03-12) 9 commits\n - SQUASH???\n - upload-pack: send part of packfile response as uri\n - fetch-pack: support more than one pack lockfile\n - upload-pack: refactor reading of pack-objects out\n - Documentation: add Packfile URIs design doc\n - Documentation: order protocol v2 sections\n - http-fetch: support fetching packfiles by URL\n - http: improve documentation of http_pack_request\n - http: use --stdin when getting dumb HTTP pack\n\n WIP for allowing a response to \"git fetch\" to instruct the bulk of\n the pack contents to be instead taken from elsewhere (aka CDN).\n\n\n* dl/submodule-set-branch (2019-02-08) 3 commits\n - submodule: teach set-branch subcommand\n - submodule--helper: teach config subcommand --unset\n - git-submodule.txt: \"--branch <branch>\" option defaults to 'master'\n\n \"git submodule\" learns \"set-branch\" subcommand that allows the\n submodule.*.branch settings to be modified.\n\n Needs sign-off on the tip commit; other than that it seems OK to be in 'next'.\n\n\n* dm/some-stdio-functions-are-macro-on-freebsd (2019-02-01) 1 commit\n - http: cast result to FILE *\n\n Variants of BSD define fileno(fh) as a macro, breaking a program\n that passes a \"void *\" to it.\n\n Expecting a reroll.\n cf. <49B9198C-53E5-42BD-8834-B1EDEB3332CB@usask.ca>\n\n\n* ds/commit-graph-format-v2 (2019-01-29) 8 commits\n - SQUASH : misnamed variables and style fix\n - commit-graph: test verifying a corrupt v2 header\n - commit-graph: implement file format version 2\n - commit-graph: add --version=<n> option\n - commit-graph: create new version flags\n - commit-graph: collapse parameters into flags\n - commit-graph: return with errors during write\n - Merge branch 'bc/sha-256' into ds/commit-graph-format-v2\n\n Introduce version 2 of the commit-graph format to correct\n deficiency in the initial version.\n\n Needs update before merging to 'next'.\n\n\n* br/blame-ignore (2019-02-13) 6 commits\n - SQUASH???\n - blame: add tests for ignoring revisions\n - blame: add a config option to mark ignored lines\n - blame: add the ability to ignore commits and their changes\n - blame: use a helper function in blame_chunk()\n - Move init_skiplist() outside of fsck\n\n \"git blame\" learned to \"ignore\" commits in the history, whose\n effects (as well as their presence) get ignored.\n\n Needs update before merging to 'next'.\n\n\n* nd/config-move-to (2019-01-14) 7 commits\n - config.h: fix hdr-check warnings\n - config: add --move-to\n - config: factor out set_config_source_file()\n - config: use OPT_FILENAME()\n - config.c: add repo_config_set_worktree_gently()\n - worktree.c: add get_worktree_config()\n - config.c: avoid git_path() in do_git_config_sequence()\n\n Needs review.\n\n\n* dl/merge-cleanup-scissors-fix (2019-03-21) 11 commits\n - cherry-pick/revert: add scissors line on merge conflict\n - sequencer.c: define describe_cleanup_mode\n - merge: add scissors line on merge conflict\n - merge: cleanup messages like commit\n - sequencer.c: remove duplicate code\n - parse-options.h: extract common --cleanup option\n - commit: extract cleanup_mode functions to sequencer\n - t7502: clean up style\n - t7604: clean up style\n - t3507: clean up style\n - t7600: clean up style\n\n The list of conflicted paths shown in the editor while concluding a\n conflicted merge was shown above the scissors line when the\n clean-up mode is set to \"scissors\", even though it was commented\n out just like the list of updated paths and other information to\n help the user explain the merge better.\n\n Needs review.\n cf. <cover.1553150827.git.liu.denton@gmail.com> (v9)\n\n\n* jn/unknown-index-extensions (2018-11-21) 2 commits\n - index: offer advice for unknown index extensions\n - index: do not warn about unrecognized extensions\n\n A bit too alarming warning given when unknown index extensions\n exist is getting revamped.\n\n Expecting a reroll.\n\n\n* ag/sequencer-reduce-rewriting-todo (2019-03-07) 18 commits\n - rebase--interactive: move transform_todo_file()\n - sequencer: use edit_todo_list() in complete_action()\n - rebase-interactive: rewrite edit_todo_list() to handle the initial edit\n - rebase-interactive: append_todo_help() changes\n - rebase-interactive: use todo_list_write_to_file() in edit_todo_list()\n - sequencer: refactor skip_unnecessary_picks() to work on a todo_list\n - rebase--interactive: move rearrange_squash_in_todo_file()\n - rebase--interactive: move sequencer_add_exec_commands()\n - sequencer: change complete_action() to use the refactored functions\n - sequencer: make sequencer_make_script() write its script to a strbuf\n - sequencer: refactor rearrange_squash() to work on a todo_list\n - sequencer: refactor sequencer_add_exec_commands() to work on a todo_list\n - sequencer: refactor check_todo_list() to work on a todo_list\n - sequencer: introduce todo_list_write_to_file()\n - sequencer: refactor transform_todos() to work on a todo_list\n - sequencer: remove the 'arg' field from todo_item\n - sequencer: make the todo_list structure public\n - sequencer: changes in parse_insn_buffer()\n (this branch is used by pw/rebase-i-internal-rfc.)\n\n The scripted version of \"git rebase -i\" wrote and rewrote the todo\n list many times during a single step of its operation, and the\n recent C-rewrite made a faithful conversion of the logic to C.  The\n implementation has been updated to carry necessary information\n around in-core to avoid rewriting the same file over and over\n unnecessarily.\n\n Will merge to 'next'.\n cf. <20190305191805.13561-1-alban.gruin@gmail.com> (v8)\n\n\n* ps/stash-in-c (2019-03-07) 29 commits\n  (merged to 'next' on 2019-03-11 at f568e3be72)\n + tests: add a special setup where stash.useBuiltin is off\n + stash: optionally use the scripted version again\n + stash: add back the original, scripted `git stash`\n + stash: convert `stash--helper.c` into `stash.c`\n + stash: replace all `write-tree` child processes with API calls\n + stash: optimize `get_untracked_files()` and `check_changes()`\n + stash: convert save to builtin\n + stash: make push -q quiet\n + stash: convert push to builtin\n + stash: convert create to builtin\n + stash: convert store to builtin\n + stash: convert show to builtin\n + stash: convert list to builtin\n + stash: convert pop to builtin\n + stash: convert branch to builtin\n + stash: convert drop and clear to builtin\n + stash: convert apply to builtin\n + stash: mention options in `show` synopsis\n + stash: add tests for `git stash show` config\n + stash: rename test cases to be more descriptive\n + t3903: add test for --intent-to-add file\n + t3903: modernize style\n + stash: improve option parsing test coverage\n + ident: don't require calling prepare_fallback_ident first\n + ident: add the ability to provide a \"fallback identity\"\n + strbuf.c: add `strbuf_insertf()` and `strbuf_vinsertf()`\n + strbuf.c: add `strbuf_join_argv()`\n + sha1-name.c: add `get_oidf()` which acts like `get_oid()`\n + Merge branch 'sd/stash-wo-user-name'\n (this branch is used by js/stash-in-c-pathspec-fix, tb/stash-in-c-unused-param-fix and tg/stash-in-c-show-default-to-p-fix.)\n\n Originally merged to 'next' on 2019-03-07\n\n \"git stash\" rewritten in C.\n\n Will cook in 'next'.\n"},{"id":"373112","messageId":"CACsJy8CmkFNv7Fy+rSY0Q=1DhYSrpSfU=XEpSS6QRLASJtsVew@mail.gmail.com","threadId":"50872","inReplyTo":"xmqqr2aidpxw.fsf@gitster-ct.c.googlers.com","subject":"Re: What's cooking in git.git (Apr 2019, #01; Thu, 4)","fromName":"Duy Nguyen","fromEmail":"pclouds@gmail.com","sentAt":"2019-04-04T11:08:25Z","receivedAt":"2019-04-04T11:08:54Z","isPatch":false,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On Thu, Apr 4, 2019 at 5:29 PM Junio C Hamano <gitster@pobox.com> wrote:\n> * nd/precious (2019-04-01) 1 commit\n>  - Introduce \"precious\" file concept\n>\n>  \"git clean\" learned to pay attention to the 'precious' attributes\n>  and keep untracked paths with the attribute instead of removing.\n>\n>  Will merge to 'next'.\n\nThere was no conclusion from the last thread if I remember correctly\nand I kind of gave up on it. If you want to include anyway, should we\ngo for a more specific attribute (e.g. \"clean\") and leave \"precious\"\nfor later whenever it's better defined?\n-- \nDuy\n"},{"id":"373132","messageId":"xmqqmul5e9y0.fsf@gitster-ct.c.googlers.com","threadId":"50872","inReplyTo":"CACsJy8CmkFNv7Fy+rSY0Q=1DhYSrpSfU=XEpSS6QRLASJtsVew@mail.gmail.com","subject":"Re: What's cooking in git.git (Apr 2019, #01; Thu, 4)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-04-04T21:29:11Z","receivedAt":"2019-04-04T21:29:17Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Duy Nguyen <pclouds@gmail.com> writes:\n\n> On Thu, Apr 4, 2019 at 5:29 PM Junio C Hamano <gitster@pobox.com> wrote:\n>> * nd/precious (2019-04-01) 1 commit\n>>  - Introduce \"precious\" file concept\n>>\n>>  \"git clean\" learned to pay attention to the 'precious' attributes\n>>  and keep untracked paths with the attribute instead of removing.\n>>\n>>  Will merge to 'next'.\n>\n> There was no conclusion from the last thread if I remember correctly\n> and I kind of gave up on it. If you want to include anyway, should we\n> go for a more specific attribute (e.g. \"clean\") and leave \"precious\"\n> for later whenever it's better defined?\n\nI'd rather pick between (1) using the final name for the concept we\nwant to eventually achieve, i.e. \"precious\", and starting small,\ni.e. \"initially, only git-clean knows about it\", or (2) doing\nnothing.  Per-command 'precious-this', 'precious-that' that would be\nleft as interface wart for years is not a pretty sight I want to\nsee.\n"},{"id":"373163","messageId":"20190405010556.GN4047@pobox.com","threadId":"50872","inReplyTo":"xmqqr2aidpxw.fsf@gitster-ct.c.googlers.com","subject":"Re: What's cooking in git.git (Apr 2019, #01; Thu, 4)","fromName":"Todd Zullinger","fromEmail":"tmz@pobox.com","sentAt":"2019-04-05T01:05:56Z","receivedAt":"2019-04-05T01:11:09Z","isPatch":false,"sender":{"key":"tmz@pobox.com","avatar":"https://avatars.githubusercontent.com/u/806319?v=4"},"body":"Hi Junio,\n\nJunio C Hamano wrote:\n> * sg/asciidoctor-in-ci (2019-04-01) 6 commits\n>  - ci: fix AsciiDoc/Asciidoctor stderr check in the documentation build job\n>  - ci: stick with Asciidoctor v1.5.8 for now\n>  - ci: install Asciidoctor in 'ci/install-dependencies.sh'\n>  - Documentation/technical/protocol-v2.txt: fix formatting\n>  - Documentation/technical/api-config.txt: fix formatting\n>  - Documentation/git-diff-tree.txt: fix formatting\n> \n>  Update our support to format documentation in the CI environment,\n>  either with AsciiDoc ro Asciidoctor.\n> \n>  Will merge to 'next'.\n\nMartin mentioned this in reply to the patch thread¹ but it\nlooks like it slipped by unnoticed.  There's some extraneous\ncomments in 28216d13f4 (\"ci: stick with Asciidoctor v1.5.8\nfor now\", 2019-03-29) which would be good to trim before\nthis hits next.\n\n    commit 28216d13f43b07e41bdd83b786ae31c00c657e06\n    Author: SZEDER Gábor <szeder.dev@gmail.com>\n    Date:   Fri Mar 29 20:52:46 2019 +0100\n\n        ci: stick with Asciidoctor v1.5.8 for now\n        \n        On Fri, Mar 29, 2019 at 01:35:19PM +0100, SZEDER Gábor wrote:\n        > The release of Asciidoctor v2.0.0 two days ago broke our documentation\n        \n        Well, what happened \"two days ago\" when I sent v2 is now seven days\n        ago...  Let's just say \"recent\" instead.\n        \n          --- >8 ---\n        \n        Subject: ci: stick with Asciidoctor v1.5.8 for now\n        \n        The recent release of Asciidoctor v2.0.0 broke our documentation\n        ...\n\n¹ <CAN0heSrQrVQ+t3ZH1igU8zZLjjyhzZshFgarLcZOumWMBRN2Tg@mail.gmail.com>\n\nThanks,\n\n-- \nTodd\n"},{"id":"373182","messageId":"xmqqy34pc8kk.fsf@gitster-ct.c.googlers.com","threadId":"50872","inReplyTo":"20190405010556.GN4047@pobox.com","subject":"Re: What's cooking in git.git (Apr 2019, #01; Thu, 4)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-04-05T05:41:47Z","receivedAt":"2019-04-05T05:41:52Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Todd Zullinger <tmz@pobox.com> writes:\n\n> Martin mentioned this in reply to the patch thread¹ but it\n> looks like it slipped by unnoticed.  There's some extraneous\n> comments in 28216d13f4 (\"ci: stick with Asciidoctor v1.5.8\n> for now\", 2019-03-29) which would be good to trim before\n> this hits next.\n\nThanks.\n"},{"id":"373334","messageId":"87h8bb9bmx.fsf@evledraar.gmail.com","threadId":"50872","inReplyTo":"xmqqr2aidpxw.fsf@gitster-ct.c.googlers.com","subject":"Re: What's cooking in git.git (Apr 2019, #01; Thu, 4)","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2019-04-06T19:28:22Z","receivedAt":"2019-04-06T19:30:38Z","isPatch":false,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"\nOn Thu, Apr 04 2019, Junio C Hamano wrote:\n\nJust comments on ab/* stuff:\n\n> * ab/gc-reflog (2019-04-01) 7 commits\n>  - gc: handle & check gc.reflogExpire config\n>  - reflog tests: assert lack of early exit with expiry=\"never\"\n>  - reflog tests: test for the \"points nowhere\" warning\n>  - reflog tests: make use of \"test_config\" idiom\n>  - gc: refactor a \"call me once\" pattern\n>  - gc: convert to using the_hash_algo\n>  - gc: remove redundant check for gc_auto_threshold\n>\n>  Fix various glitches in \"git gc\" around reflog handling.\n>\n>  cf. <20190328161434.19200-1-avarab@gmail.com> (v4)\n\nMissing a \"will...\" note for this one, the \"cf\" is just the cover letter\nfor v4. AFAICT it should be ready to merge down from \"pu\".\n\n> * ab/gc-docs (2019-04-01) 12 commits\n>  - SQAUSH??? fixup! gc docs: include the \"gc.*\" section from \"config\" in \"gc\"\n>  - gc docs: remove incorrect reference to gc.auto=0\n>  - gc docs: clarify that \"gc\" doesn't throw away referenced objects\n>  - gc docs: note \"gc --aggressive\" in \"fast-import\"\n>  - gc docs: downplay the usefulness of --aggressive\n>  - gc docs: note how --aggressive impacts --window & --depth\n>  - gc docs: fix formatting for \"gc.writeCommitGraph\"\n>  - gc docs: re-flow the \"gc.*\" section in \"config\"\n>  - gc docs: include the \"gc.*\" section from \"config\" in \"gc\"\n>  - gc docs: clean grammar for \"gc.bigPackThreshold\"\n>  - gc docs: stop noting \"repack\" flags\n>  - gc docs: modernize the advice for manually running \"gc\"\n\nThat squash makes sense. Will submit another version with it integrated.\n"},{"id":"373336","messageId":"87ef6eaoub.fsf@evledraar.gmail.com","threadId":"50872","inReplyTo":"xmqqr2aidpxw.fsf@gitster-ct.c.googlers.com","subject":"Re: What's cooking in git.git (Apr 2019, #01; Thu, 4)","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2019-04-06T19:57:48Z","receivedAt":"2019-04-06T19:59:42Z","isPatch":false,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"\nOn Thu, Apr 04 2019, Junio C Hamano wrote:\n\n> * dl/rebase-i-keep-base (2019-04-03) 4 commits\n>  - rebase: teach rebase --keep-base\n>  - rebase: fast-forward --onto in more cases\n>  - t3432: test rebase fast-forward behavior\n>  - t3431: add rebase --fork-point tests\n>\n>  \"git rebase --keep-base <upstream>\" tries to find the original base\n>  of the topic being rebased and rebase on top of that same base, which\n>  is useful when running the \"git rebase -i\" (and its limited variant\n>  \"git rebase -x\").\n>\n>  Will merge to 'next'.\n\nStill a bit unclear on whether parts of this are intended or just\nemergent behavior, as noted in\nhttps://public-inbox.org/git/87ftquapfy.fsf@evledraar.gmail.com/\n\n> * jh/trace2-sid-fix (2019-04-01) 7 commits\n>  - trace2: make SIDs more unique\n>  - trace2: clarify UTC datetime formatting\n>  - trace2: report peak memory usage of the process\n>  - trace2: use system config for default trace2 settings\n>  - trace2: find exec-dir before trace2 initialization\n>  - trace2: add absolute elapsed time to start event\n>  - trace2: refactor setting process starting time\n>\n>  Polishing of the new trace2 facility continues.  The system-level\n>  configuration can specify site-wide trace2 settings (which would be\n>  loved by big-brother types ;-).\n>\n>  Getting closer but still being discussed.\n>  cf. <20190403000032.GA190454@google.com>\n\nFWIW also the discussion as of https://public-inbox.org/git/87lg0x9voz.fsf@evledraar.gmail.com/\n\n> * js/trace2-to-directory (2019-03-22) 1 commit\n>  - trace2: write to directory targets\n>\n>  The trace2 tracing facility learned to auto-generate a filename\n>  when told to log to a directory.\n>\n>  Will merge to 'next'.\n\nI had the feedback of effectively \"why retry if we can just make the SID\nunique enough\" in\nhttps://public-inbox.org/git/874l7rcqk9.fsf@evledraar.gmail.com/ on\nMarch 25th.\n\nYou seemed to think so, but after Jeff Hostetler made the SID more\nunique (AFAICT \"actually unique\" in practice) in the parallel in-flight\njh/trace2-sid-fix\n(https://public-inbox.org/git/4352952677a11776a18ec9b6862cf358307cfafd.1553879063.git.gitgitgadget@gmail.com/)\n\nI think it's fine to merge js/trace2-to-directory down as it is, but do\nyou/Josh think that retry logic needs to stay with that sort of SID?\n"},{"id":"373338","messageId":"87d0lyanen.fsf@evledraar.gmail.com","threadId":"50872","inReplyTo":"xmqqmul5e9y0.fsf@gitster-ct.c.googlers.com","subject":"Re: What's cooking in git.git (Apr 2019, #01; Thu, 4)","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2019-04-06T20:28:48Z","receivedAt":"2019-04-06T20:28:54Z","isPatch":false,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"\nOn Thu, Apr 04 2019, Junio C Hamano wrote:\n\n> Duy Nguyen <pclouds@gmail.com> writes:\n>\n>> On Thu, Apr 4, 2019 at 5:29 PM Junio C Hamano <gitster@pobox.com> wrote:\n>>> * nd/precious (2019-04-01) 1 commit\n>>>  - Introduce \"precious\" file concept\n>>>\n>>>  \"git clean\" learned to pay attention to the 'precious' attributes\n>>>  and keep untracked paths with the attribute instead of removing.\n>>>\n>>>  Will merge to 'next'.\n>>\n>> There was no conclusion from the last thread if I remember correctly\n>> and I kind of gave up on it. If you want to include anyway, should we\n>> go for a more specific attribute (e.g. \"clean\") and leave \"precious\"\n>> for later whenever it's better defined?\n>\n> I'd rather pick between (1) using the final name for the concept we\n> want to eventually achieve, i.e. \"precious\", and starting small,\n> i.e. \"initially, only git-clean knows about it\", or (2) doing\n> nothing.  Per-command 'precious-this', 'precious-that' that would be\n> left as interface wart for years is not a pretty sight I want to\n> see.\n\nI think we shouldn't squat \"precious\" in general without seeing where we\nwant to go with it, which I tried to sum up in\nhttps://public-inbox.org/git/87ftsi68ke.fsf@evledraar.gmail.com/\n\nBut aside from that larger discussion, I see no problem with having some\n\"+clean\" or \"-clean\" attribute with basically Duy's current patch in\nnd/precious with the equivalent of \"s/precious/clean/\". Duy suggested\nthis in\nhttps://public-inbox.org/git/CACsJy8C377NmLv9edNYjinKAQf-P1y5+Nwhdj3vRkz_E__x43Q@mail.gmail.com/\n\nI see the desire to keep some untracked stuff you know about as\ndifferent from what amounts to a workaround for merge/checkout\ninadvertently stomping on your checkout and shredding your data, without\n(as noted in my upthread summary) us having the full picture of whether\nthat's even needed as a permanent configurable workaround, or we could\n\"just\" fix that \"bug\".\n\nBut on the subject on the implementation of nd/precious (assuming\ns/precious/clean/) I'm concerned that this \"I want to keep *.o on\n'git-clean'\" use-case leaves us with no way to do what you can now do\nwith:\n\n    git clean -dxff\n\nNow the git-clean documentation promises:\n\n    \"Cleans [...] files that are not under version control\"\n\nAnd, for -x:\n\n    \"Don’t use the [repository's] ignore rules[...]This allows removing\n    all untracked files, including build products\"\n\nExcept now we have a feature that's ostensibly exactly for this \"build\nproducts\" use-case, but doesn't yield to the -x option, which we've\ndocumented as being the escape hatch for exactly that sort of thing.\n\nIn my mind \"clean\" has two fundamentally different use-cases. a) I made\nthis repo and trust its .gitignore file b) I didn't make it/don't trust\nit and/or I just want to be guaranteed to get the exact same checkout a\n\"git clone\" would give me.\n\nNow you can do \"git clean -dxff\" (and if submodules init && ...) for\n\"b\", but the \"precious\" patch in the current form completely breaks \"b\"\nto satisfy a use-case of \"a\".\n\nI think we should at the very least have a \"-xx\" like \"-ff\" now as an\nescape hatch, but more conservatively shouldn't be breaking the\nreasonable assumption a user of \"-x\" could make so far, which is \"ignore\nrepo config, just wipe it all\".\n"},{"id":"373389","messageId":"xmqqimvpb0bd.fsf@gitster-ct.c.googlers.com","threadId":"50872","inReplyTo":"87d0lyanen.fsf@evledraar.gmail.com","subject":"Re: What's cooking in git.git (Apr 2019, #01; Thu, 4)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-04-08T04:14:30Z","receivedAt":"2019-04-08T04:14:35Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:\n\n>> I'd rather pick between (1) using the final name for the concept we\n>> want to eventually achieve, i.e. \"precious\", and starting small,\n>> i.e. \"initially, only git-clean knows about it\", or (2) doing\n>> nothing.  Per-command 'precious-this', 'precious-that' that would be\n>> left as interface wart for years is not a pretty sight I want to\n>> see.\n>\n> I think we shouldn't squat \"precious\" in general without seeing where we\n> want to go with it, which I tried to sum up in\n> https://public-inbox.org/git/87ftsi68ke.fsf@evledraar.gmail.com/\n>\n> But aside from that larger discussion, I see no problem with having some\n> \"+clean\" or \"-clean\" attribute with basically Duy's current patch in\n> nd/precious with the equivalent of \"s/precious/clean/\". Duy suggested\n> this in\n> https://public-inbox.org/git/CACsJy8C377NmLv9edNYjinKAQf-P1y5+Nwhdj3vRkz_E__x43Q@mail.gmail.com/\n\nI know.  I've already said that we do not want proliferation of\nprecious-clean precious-merge precious-yet-another-thing.\n\n> ... shouldn't be breaking the reasonable assumption a user of \"-x\"\n> could make so far, which is \"ignore repo config, just wipe it\n> all\".\n\nYup.  I think that is reasonable.  To paraphrase (so that you can\ntell me that I misunderstood you, if that is the case), if we are\ntold to honor only what the index knows, deliberately ignoring the\n.gitignore file, then we should also ignore .gitattributes that says\nwhich ones are ignored-but-precious, as the \"precious\" attribute is\na mere implementation detail of what _could_ have been part of the\nexclude mechanism (aka \".gitignore\") from day one, if we designed\nthe exclude mechanism to support \"ignored and expendable\" and\n\"ignored and precious\" from day one.  \"clean -x\" would certainly\nhave ignored both kinds.\n\n"},{"id":"373390","messageId":"xmqqef6db041.fsf@gitster-ct.c.googlers.com","threadId":"50872","inReplyTo":"87h8bb9bmx.fsf@evledraar.gmail.com","subject":"Re: What's cooking in git.git (Apr 2019, #01; Thu, 4)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-04-08T04:18:54Z","receivedAt":"2019-04-08T04:18:58Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:\n\n> On Thu, Apr 04 2019, Junio C Hamano wrote:\n>\n> Just comments on ab/* stuff:\n>\n>> * ab/gc-reflog (2019-04-01) 7 commits\n>>  - gc: handle & check gc.reflogExpire config\n>>  - reflog tests: assert lack of early exit with expiry=\"never\"\n>>  - reflog tests: test for the \"points nowhere\" warning\n>>  - reflog tests: make use of \"test_config\" idiom\n>>  - gc: refactor a \"call me once\" pattern\n>>  - gc: convert to using the_hash_algo\n>>  - gc: remove redundant check for gc_auto_threshold\n>>\n>>  Fix various glitches in \"git gc\" around reflog handling.\n>>\n>>  cf. <20190328161434.19200-1-avarab@gmail.com> (v4)\n>\n> Missing a \"will...\" note for this one, the \"cf\" is just the cover letter\n> for v4. AFAICT it should be ready to merge down from \"pu\".\n\nThe former is because I haven't decided and more importantly I\nhaven't seen enough input on the list to make a decision.\n\nThe latter is quite normal.  cf. is literally \"here is one of the\nthings I can look at as a starting point to remind me what this\ntopic was about and what its current state is\", a note left for me.\nIt often is \"don't forget that somebody raised an issue and I should\nnot merge to to 'next' yet\" but it is not limited to objections.\n\nAs I haven't seen enough input on the topic, and I have quite a\nbacklog after being offline for a wee, pointing at a cover to make\nsure I can quickly find out which iteration I happen to have was/is\na logical thing to do.\n\n>> * ab/gc-docs (2019-04-01) 12 commits\n>>  - SQAUSH??? fixup! gc docs: include the \"gc.*\" section from \"config\" in \"gc\"\n>>  - gc docs: remove incorrect reference to gc.auto=0\n>>  - gc docs: clarify that \"gc\" doesn't throw away referenced objects\n>>  - gc docs: note \"gc --aggressive\" in \"fast-import\"\n>>  - gc docs: downplay the usefulness of --aggressive\n>>  - gc docs: note how --aggressive impacts --window & --depth\n>>  - gc docs: fix formatting for \"gc.writeCommitGraph\"\n>>  - gc docs: re-flow the \"gc.*\" section in \"config\"\n>>  - gc docs: include the \"gc.*\" section from \"config\" in \"gc\"\n>>  - gc docs: clean grammar for \"gc.bigPackThreshold\"\n>>  - gc docs: stop noting \"repack\" flags\n>>  - gc docs: modernize the advice for manually running \"gc\"\n>\n> That squash makes sense. Will submit another version with it integrated.\n\nOK, then I won't squash it myself, but instead queue the updated\npatches.\n\nThanks.\n"},{"id":"373391","messageId":"xmqqa7h1aznl.fsf@gitster-ct.c.googlers.com","threadId":"50872","inReplyTo":"87ef6eaoub.fsf@evledraar.gmail.com","subject":"Re: What's cooking in git.git (Apr 2019, #01; Thu, 4)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-04-08T04:28:46Z","receivedAt":"2019-04-08T04:28:51Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:\n\n> unique (AFAICT \"actually unique\" in practice) in the parallel in-flight\n> jh/trace2-sid-fix\n> (https://public-inbox.org/git/4352952677a11776a18ec9b6862cf358307cfafd.1553879063.git.gitgitgadget@gmail.com/)\n>\n> I think it's fine to merge js/trace2-to-directory down as it is, but do\n> you/Josh think that retry logic needs to stay with that sort of SID?\n\nI do not speak for Josh, but I think the only two logical choices\nare to open with (O_CREAT|O_EXCL) and\n\n (1) fallback with .%d suffix, making it clear that we are not\n     willing to lose log files even when SID generation is botched; or\n\n (2) die/BUG when it fails, making it clear that we do rely on the\n     guanateed uniqueness of SID.\n\nA distant third may be to warn when open with O_CREAT|O_EXCL fails,\nbut I am not sure what its value would be to do so---especially if\nwe trust in the \"actually unique in practice\".  Between (1) and (2),\nI have a slight preference to (1) over (2), as that is much easier\nto explain.\n\nThose who want to have a \"fixed width\" thing could just ignore the\nones with suffix---as long as the \"actually unique in practice\"\nclaim holds, doing so will not lose any non-negligible amount of\ninformation anyway.\n\n"},{"id":"373442","messageId":"20190408211850.GJ60888@google.com","threadId":"50872","inReplyTo":"xmqqa7h1aznl.fsf@gitster-ct.c.googlers.com","subject":"Re: What's cooking in git.git (Apr 2019, #01; Thu, 4)","fromName":"Josh Steadmon","fromEmail":"steadmon@google.com","sentAt":"2019-04-08T21:18:50Z","receivedAt":"2019-04-08T21:19:00Z","isPatch":false,"sender":{"key":"steadmon@google.com","avatar":"https://avatars.githubusercontent.com/u/2654920?v=4"},"body":"On 2019.04.08 13:28, Junio C Hamano wrote:\n> Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:\n> \n> > unique (AFAICT \"actually unique\" in practice) in the parallel in-flight\n> > jh/trace2-sid-fix\n> > (https://public-inbox.org/git/4352952677a11776a18ec9b6862cf358307cfafd.1553879063.git.gitgitgadget@gmail.com/)\n> >\n> > I think it's fine to merge js/trace2-to-directory down as it is, but do\n> > you/Josh think that retry logic needs to stay with that sort of SID?\n> \n> I do not speak for Josh, but I think the only two logical choices\n> are to open with (O_CREAT|O_EXCL) and\n> \n>  (1) fallback with .%d suffix, making it clear that we are not\n>      willing to lose log files even when SID generation is botched; or\n> \n>  (2) die/BUG when it fails, making it clear that we do rely on the\n>      guanateed uniqueness of SID.\n> \n> A distant third may be to warn when open with O_CREAT|O_EXCL fails,\n> but I am not sure what its value would be to do so---especially if\n> we trust in the \"actually unique in practice\".  Between (1) and (2),\n> I have a slight preference to (1) over (2), as that is much easier\n> to explain.\n> \n> Those who want to have a \"fixed width\" thing could just ignore the\n> ones with suffix---as long as the \"actually unique in practice\"\n> claim holds, doing so will not lose any non-negligible amount of\n> information anyway.\n\nI prefer (1) as well, although I would be happy to re-write this if the\nlist consensus goes the other way.\n"},{"id":"373476","messageId":"20190409102649.22115-1-pclouds@gmail.com","threadId":"50872","inReplyTo":"xmqqimvpb0bd.fsf@gitster-ct.c.googlers.com","subject":"[PATCH] Introduce \"precious\" file concept","fromName":"Nguyễn Thái Ngọc Duy","fromEmail":"pclouds@gmail.com","sentAt":"2019-04-09T10:26:49Z","receivedAt":"2019-04-09T10:27:00Z","isPatch":true,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"A new attribute \"precious\" is added to indicate that certain files\nhave valuable content and should not be easily discarded even if they\nare ignored or untracked.\n\nSo far there are one part of Git that are made aware of precious files:\n\"git clean\" will leave precious files alone if --keep-precious is\nspecified.\n\nSigned-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\n---\n Here's the replacement patch that keeps \"git clean\" behavior the same\n as before and only checks 'precious' attribute when --keep-precous is\n specified.\n\n Documentation/git-clean.txt     |  6 ++++-\n Documentation/gitattributes.txt | 11 +++++++++\n attr.c                          | 12 ++++++++++\n attr.h                          |  2 ++\n builtin/clean.c                 | 30 +++++++++++++++++++++----\n t/t7300-clean.sh                | 40 +++++++++++++++++++++++++++++++++\n 6 files changed, 96 insertions(+), 5 deletions(-)\n\ndiff --git a/Documentation/git-clean.txt b/Documentation/git-clean.txt\nindex 03056dad0d..7f8c157c90 100644\n--- a/Documentation/git-clean.txt\n+++ b/Documentation/git-clean.txt\n@@ -8,7 +8,7 @@ git-clean - Remove untracked files from the working tree\n SYNOPSIS\n --------\n [verse]\n-'git clean' [-d] [-f] [-i] [-n] [-q] [-e <pattern>] [-x | -X] [--] <path>...\n+'git clean' [<options>] [-d] [-f] [-i] [-n] [-x | -X] [--] <path>...\n \n DESCRIPTION\n -----------\n@@ -71,6 +71,10 @@ OPTIONS\n \tRemove only files ignored by Git.  This may be useful to rebuild\n \teverything from scratch, but keep manually created files.\n \n+--keep-precious::\n+\tDo not remove untracked or ignored files if they have\n+\t`precious` attribute.\n+\n Interactive mode\n ----------------\n When the command enters the interactive mode, it shows the\ndiff --git a/Documentation/gitattributes.txt b/Documentation/gitattributes.txt\nindex bdd11a2ddd..ea3c07db79 100644\n--- a/Documentation/gitattributes.txt\n+++ b/Documentation/gitattributes.txt\n@@ -1192,6 +1192,17 @@ If this attribute is not set or has an invalid value, the value of the\n (See linkgit:git-config[1]).\n \n \n+Precious files\n+~~~~~~~~~~~~~~\n+\n+`precious`\n+^^^^^^^^^^\n+\n+This attribute is set on files to indicate that their content is\n+valuable. Some commands will behave slightly different on precious\n+files. linkgit:git-clean[1] may leave precious files alone.\n+\n+\n USING MACRO ATTRIBUTES\n ----------------------\n \ndiff --git a/attr.c b/attr.c\nindex 93dc16b59c..dc6490510c 100644\n--- a/attr.c\n+++ b/attr.c\n@@ -1157,3 +1157,15 @@ void attr_start(void)\n \tpthread_mutex_init(&g_attr_hashmap.mutex, NULL);\n \tpthread_mutex_init(&check_vector.mutex, NULL);\n }\n+\n+int is_precious_file(struct index_state *istate, const char *path)\n+{\n+\tstatic struct attr_check *check;\n+\tif (!check)\n+\t\tcheck = attr_check_initl(\"precious\", NULL);\n+\tif (!check)\n+\t\treturn 0;\n+\n+\tgit_check_attr(istate, path, check);\n+\treturn ATTR_TRUE(check->items[0].value);\n+}\ndiff --git a/attr.h b/attr.h\nindex b0378bfe5f..b9a9751a66 100644\n--- a/attr.h\n+++ b/attr.h\n@@ -82,4 +82,6 @@ void git_attr_set_direction(enum git_attr_direction new_direction);\n \n void attr_start(void);\n \n+int is_precious_file(struct index_state *istate, const char *path);\n+\n #endif /* ATTR_H */\ndiff --git a/builtin/clean.c b/builtin/clean.c\nindex aaba4af3c2..d2836393c5 100644\n--- a/builtin/clean.c\n+++ b/builtin/clean.c\n@@ -18,19 +18,23 @@\n #include \"color.h\"\n #include \"pathspec.h\"\n #include \"help.h\"\n+#include \"attr.h\"\n \n static int force = -1; /* unset */\n static int interactive;\n+static int keep_precious;\n static struct string_list del_list = STRING_LIST_INIT_DUP;\n static unsigned int colopts;\n \n static const char *const builtin_clean_usage[] = {\n-\tN_(\"git clean [-d] [-f] [-i] [-n] [-q] [-e <pattern>] [-x | -X] [--] <paths>...\"),\n+\tN_(\"git clean [<options>] [-d] [-f] [-i] [-n] [-x | -X] [--] <paths>...\"),\n \tNULL\n };\n \n static const char *msg_remove = N_(\"Removing %s\\n\");\n static const char *msg_would_remove = N_(\"Would remove %s\\n\");\n+static const char *msg_skip_precious = N_(\"Skipping precious file %s\\n\");\n+static const char *msg_would_skip_precious = N_(\"Would skip precious file %s\\n\");\n static const char *msg_skip_git_dir = N_(\"Skipping repository %s\\n\");\n static const char *msg_would_skip_git_dir = N_(\"Would skip repository %s\\n\");\n static const char *msg_warn_remove_failed = N_(\"failed to remove %s\");\n@@ -146,6 +150,11 @@ static int exclude_cb(const struct option *opt, const char *arg, int unset)\n \treturn 0;\n }\n \n+static int skip_precious_file(struct index_state *istate, const char *path)\n+{\n+\treturn keep_precious && is_precious_file(istate, path);\n+}\n+\n static int remove_dirs(struct strbuf *path, const char *prefix, int force_flag,\n \t\tint dry_run, int quiet, int *dir_gone)\n {\n@@ -154,6 +163,7 @@ static int remove_dirs(struct strbuf *path, const char *prefix, int force_flag,\n \tstruct dirent *e;\n \tint res = 0, ret = 0, gone = 1, original_len = path->len, len;\n \tstruct string_list dels = STRING_LIST_INIT_DUP;\n+\tconst char *rel_path;\n \n \t*dir_gone = 1;\n \n@@ -193,9 +203,16 @@ static int remove_dirs(struct strbuf *path, const char *prefix, int force_flag,\n \n \t\tstrbuf_setlen(path, len);\n \t\tstrbuf_addstr(path, e->d_name);\n-\t\tif (lstat(path->buf, &st))\n+\t\tif (lstat(path->buf, &st)) {\n \t\t\t; /* fall thru */\n-\t\telse if (S_ISDIR(st.st_mode)) {\n+\t\t} else if ((!prefix && skip_precious_file(&the_index, path->buf)) ||\n+\t\t\t   (prefix && skip_prefix(path->buf, prefix, &rel_path) &&\n+\t\t\t    skip_precious_file(&the_index, rel_path))) {\n+\t\t\tquote_path_relative(path->buf, prefix, &quoted);\n+\t\t\tprintf(dry_run ? _(msg_would_skip_precious) : _(msg_skip_precious), quoted.buf);\n+\t\t\t*dir_gone = 0;\n+\t\t\tcontinue;\n+\t\t} else if (S_ISDIR(st.st_mode)) {\n \t\t\tif (remove_dirs(path, prefix, force_flag, dry_run, quiet, &gone))\n \t\t\t\tret = 1;\n \t\t\tif (gone) {\n@@ -915,6 +932,8 @@ int cmd_clean(int argc, const char **argv, const char *prefix)\n \t\tOPT_BOOL('x', NULL, &ignored, N_(\"remove ignored files, too\")),\n \t\tOPT_BOOL('X', NULL, &ignored_only,\n \t\t\t\tN_(\"remove only ignored files\")),\n+\t\tOPT_BOOL(0, \"keep-precious\", &keep_precious,\n+\t\t\t N_(\"do not remove files with 'precious' attribute\")),\n \t\tOPT_END()\n \t};\n \n@@ -1019,7 +1038,10 @@ int cmd_clean(int argc, const char **argv, const char *prefix)\n \t\tif (lstat(abs_path.buf, &st))\n \t\t\tcontinue;\n \n-\t\tif (S_ISDIR(st.st_mode)) {\n+\t\tif (skip_precious_file(&the_index, item->string)) {\n+\t\t\tqname = quote_path_relative(item->string, NULL, &buf);\n+\t\t\tprintf(dry_run ? _(msg_would_skip_precious) : _(msg_skip_precious), qname);\n+\t\t} else if (S_ISDIR(st.st_mode)) {\n \t\t\tif (remove_dirs(&abs_path, prefix, rm_flags, dry_run, quiet, &gone))\n \t\t\t\terrors++;\n \t\t\tif (gone && !quiet) {\ndiff --git a/t/t7300-clean.sh b/t/t7300-clean.sh\nindex 7b36954d63..ae600dafb5 100755\n--- a/t/t7300-clean.sh\n+++ b/t/t7300-clean.sh\n@@ -669,4 +669,44 @@ test_expect_success 'git clean -d skips untracked dirs containing ignored files'\n \ttest_path_is_missing foo/b/bb\n '\n \n+test_expect_success 'git clean -xd --keep-precious leaves precious files alone' '\n+\tgit init precious &&\n+\t(\n+\t\tcd precious &&\n+\t\ttest_commit one &&\n+\t\tcat >.gitignore <<-\\EOF &&\n+\t\t*.o\n+\t\t*.mak\n+\t\tEOF\n+\t\tcat >.gitattributes <<-\\EOF &&\n+\t\t*.mak precious\n+\t\t.gitattributes precious\n+\t\t*.precious precious\n+\t\tEOF\n+\t\tmkdir sub &&\n+\t\ttouch one.o sub/two.o one.mak sub/two.mak &&\n+\t\ttouch one.untracked two.precious sub/also.precious &&\n+\t\tgit clean -fdx --keep-precious &&\n+\t\ttest_path_is_missing one.o &&\n+\t\ttest_path_is_missing sub/two.o &&\n+\t\ttest_path_is_missing one.untracked &&\n+\t\ttest_path_is_file .gitattributes &&\n+\t\ttest_path_is_file one.mak &&\n+\t\ttest_path_is_file sub/two.mak &&\n+\t\ttest_path_is_file two.precious &&\n+\t\ttest_path_is_file sub/also.precious\n+\t)\n+'\n+\n+test_expect_success 'git clean -xd still deletes them all' '\n+\ttest_path_is_file precious/one.mak &&\n+\ttest_path_is_file precious/sub/two.mak &&\n+\ttest_path_is_file precious/two.precious &&\n+\ttest_path_is_file precious/sub/also.precious &&\n+\tgit -C precious clean -fdx &&\n+\ttest_path_is_missing precious/one.mak &&\n+\ttest_path_is_missing precious/sub/two.mak &&\n+\ttest_path_is_missing precious/two.precious &&\n+\ttest_path_is_missing precious/sub/also.precious\n+'\n test_done\n-- \n2.21.0.479.g47ac719cd3\n\n"},{"id":"373482","messageId":"xmqqh8b75s9l.fsf@gitster-ct.c.googlers.com","threadId":"50872","inReplyTo":"20190409102649.22115-1-pclouds@gmail.com","subject":"Re: [PATCH] Introduce \"precious\" file concept","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-04-09T11:31:50Z","receivedAt":"2019-04-09T11:31:55Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Nguyễn Thái Ngọc Duy  <pclouds@gmail.com> writes:\n\n> A new attribute \"precious\" is added to indicate that certain files\n> have valuable content and should not be easily discarded even if they\n> are ignored or untracked.\n>\n> So far there are one part of Git that are made aware of precious files:\n\ns/are/is/g\n\n> \"git clean\" will leave precious files alone if --keep-precious is\n> specified.\n>\n> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\n> ---\n>  Here's the replacement patch that keeps \"git clean\" behavior the same\n>  as before and only checks 'precious' attribute when --keep-precous is\n>  specified.\n\nOK.  So this is even gentler introduction, which we could turn into\nthe default once more commands start honoring the attribute and\nwider adoption proves that it is a good feature, while allowing us a\nroom to back out by keeping it an optional feature and eventually\ndeprecate and remove if the experiment did not pan out.\n\n> +--keep-precious::\n> +\tDo not remove untracked or ignored files if they have\n> +\t`precious` attribute.\n\n> +Precious files\n> +~~~~~~~~~~~~~~\n> +\n> +`precious`\n> +^^^^^^^^^^\n> +\n> +This attribute is set on files to indicate that their content is\n> +valuable. Some commands will behave slightly different on precious\n> +files. linkgit:git-clean[1] may leave precious files alone.\n\n\nWhen the second thing that cares about the attribute comes along,\nthe mention of 'git clean' here will become the first item in a\nbullet list, while the second and subsequent ones are listed next to\nit.  It may not be bad to start that enumerated list of count 1 from\nthe get-go, but for now this will do.\n\n> @@ -193,9 +203,16 @@ static int remove_dirs(struct strbuf *path, const char *prefix, int force_flag,\n>  \n>  \t\tstrbuf_setlen(path, len);\n>  \t\tstrbuf_addstr(path, e->d_name);\n> -\t\tif (lstat(path->buf, &st))\n> +\t\tif (lstat(path->buf, &st)) {\n>  \t\t\t; /* fall thru */\n> -\t\telse if (S_ISDIR(st.st_mode)) {\n> +\t\t} else if ((!prefix && skip_precious_file(&the_index, path->buf)) ||\n> +\t\t\t   (prefix && skip_prefix(path->buf, prefix, &rel_path) &&\n> +\t\t\t    skip_precious_file(&the_index, rel_path))) {\n> +\t\t\tquote_path_relative(path->buf, prefix, &quoted);\n> +\t\t\tprintf(dry_run ? _(msg_would_skip_precious) : _(msg_skip_precious), quoted.buf);\n> +\t\t\t*dir_gone = 0;\n> +\t\t\tcontinue;\n\nAn attribute is given to something that can be tracked, and a\ndirectory would not get an attribute, because Git does not track\ndirectories (there is a reason why skip_precious_file() takes\n&the_index that is passed down the callchain to git_check_attr()).\n\nTriggering this logic before excluding S_ISDIR(st.st_mode) feels\niffy.\n\nBut let's assume that being able to say \"this directory and anything\n(recursively) inside are precious\" is a good idea and read on.\n\n> +\t\t} else if (S_ISDIR(st.st_mode)) {\n>  \t\t\tif (remove_dirs(path, prefix, force_flag, dry_run, quiet, &gone))\n>  \t\t\t\tret = 1;\n>  \t\t\tif (gone) {\n> @@ -915,6 +932,8 @@ int cmd_clean(int argc, const char **argv, const char *prefix)\n>  \t\tOPT_BOOL('x', NULL, &ignored, N_(\"remove ignored files, too\")),\n>  \t\tOPT_BOOL('X', NULL, &ignored_only,\n>  \t\t\t\tN_(\"remove only ignored files\")),\n> +\t\tOPT_BOOL(0, \"keep-precious\", &keep_precious,\n> +\t\t\t N_(\"do not remove files with 'precious' attribute\")),\n>  \t\tOPT_END()\n>  \t};\n\nOK.\n\n> @@ -1019,7 +1038,10 @@ int cmd_clean(int argc, const char **argv, const char *prefix)\n>  \t\tif (lstat(abs_path.buf, &st))\n>  \t\t\tcontinue;\n>  \n> -\t\tif (S_ISDIR(st.st_mode)) {\n> +\t\tif (skip_precious_file(&the_index, item->string)) {\n> +\t\t\tqname = quote_path_relative(item->string, NULL, &buf);\n> +\t\t\tprintf(dry_run ? _(msg_would_skip_precious) : _(msg_skip_precious), qname);\n> +\t\t} else if (S_ISDIR(st.st_mode)) {\n>  \t\t\tif (remove_dirs(&abs_path, prefix, rm_flags, dry_run, quiet, &gone))\n\nLikewise.\n\n> diff --git a/t/t7300-clean.sh b/t/t7300-clean.sh\n> index 7b36954d63..ae600dafb5 100755\n> --- a/t/t7300-clean.sh\n> +++ b/t/t7300-clean.sh\n> @@ -669,4 +669,44 @@ test_expect_success 'git clean -d skips untracked dirs containing ignored files'\n>  \ttest_path_is_missing foo/b/bb\n>  '\n>  \n> +test_expect_success 'git clean -xd --keep-precious leaves precious files alone' '\n> +\tgit init precious &&\n> +\t(\n> +\t\tcd precious &&\n> +\t\ttest_commit one &&\n> +\t\tcat >.gitignore <<-\\EOF &&\n> +\t\t*.o\n> +\t\t*.mak\n> +\t\tEOF\n> +\t\tcat >.gitattributes <<-\\EOF &&\n> +\t\t*.mak precious\n> +\t\t.gitattributes precious\n> +\t\t*.precious precious\n\nIf the checking with skip_precious() before S_ISDIR() was\nintentional (I cannot quite tell if it is), then this should also\nhave a pattern that matches a directory and mark it as precious.\n\nOn the other hand, if it was merely a thinko and the change does not\nintend to allow attaching attributes to directories, then this test\nis probably OK as-is.  We also _could_ have a pattern that matches a\ndirectory and attempt to make it precious and then make sure the\ndirectory goes away (i.e. any attribute, including 'precious', on\nthe directory was meaningless).\n\n> +\t\tEOF\n> +\t\tmkdir sub &&\n> +\t\ttouch one.o sub/two.o one.mak sub/two.mak &&\n> +\t\ttouch one.untracked two.precious sub/also.precious &&\n> +\t\tgit clean -fdx --keep-precious &&\n> +\t\ttest_path_is_missing one.o &&\n> +\t\ttest_path_is_missing sub/two.o &&\n> +\t\ttest_path_is_missing one.untracked &&\n> +\t\ttest_path_is_file .gitattributes &&\n> +\t\ttest_path_is_file one.mak &&\n> +\t\ttest_path_is_file sub/two.mak &&\n> +\t\ttest_path_is_file two.precious &&\n> +\t\ttest_path_is_file sub/also.precious\n> +\t)\n> +'\n\n> +test_expect_success 'git clean -xd still deletes them all' '\n\nOK, so this is exactly the same command as above, but without the\n\"--keep-precious\" option.  It is good to test both positive and\nnegative.\n\n> +\ttest_path_is_file precious/one.mak &&\n> +\ttest_path_is_file precious/sub/two.mak &&\n> +\ttest_path_is_file precious/two.precious &&\n> +\ttest_path_is_file precious/sub/also.precious &&\n> +\tgit -C precious clean -fdx &&\n> +\ttest_path_is_missing precious/one.mak &&\n> +\ttest_path_is_missing precious/sub/two.mak &&\n> +\ttest_path_is_missing precious/two.precious &&\n> +\ttest_path_is_missing precious/sub/also.precious\n> +'\n"},{"id":"373523","messageId":"CAPig+cTxWGfCDxH7t=AS0jJqpAeScsvAs3UTPFE2K2V23bErcA@mail.gmail.com","threadId":"50872","inReplyTo":"20190409102649.22115-1-pclouds@gmail.com","subject":"Re: [PATCH] Introduce \"precious\" file concept","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2019-04-09T17:44:40Z","receivedAt":"2019-04-09T17:44:55Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Tue, Apr 9, 2019 at 6:27 AM Nguyễn Thái Ngọc Duy <pclouds@gmail.com> wrote:\n> A new attribute \"precious\" is added to indicate that certain files\n> have valuable content and should not be easily discarded even if they\n> are ignored or untracked.\n> [...]\n> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\n> ---\n> diff --git a/t/t7300-clean.sh b/t/t7300-clean.sh\n> @@ -669,4 +669,44 @@ test_expect_success 'git clean -d skips untracked dirs containing ignored files'\n> +test_expect_success 'git clean -xd still deletes them all' '\n> +       [...]\n> +'\n>  test_done\n\nNit: The blank line before 'test_done' got lost.\n"},{"id":"373574","messageId":"CACsJy8Ct6A7a7FzzH7ZUv9R2+k=G6qhzZ8Yjq8GUDBdTr_QBQA@mail.gmail.com","threadId":"50872","inReplyTo":"xmqqh8b75s9l.fsf@gitster-ct.c.googlers.com","subject":"Re: [PATCH] Introduce \"precious\" file concept","fromName":"Duy Nguyen","fromEmail":"pclouds@gmail.com","sentAt":"2019-04-10T09:36:05Z","receivedAt":"2019-04-10T09:36:34Z","isPatch":true,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On Tue, Apr 9, 2019 at 6:31 PM Junio C Hamano <gitster@pobox.com> wrote:\n> > @@ -193,9 +203,16 @@ static int remove_dirs(struct strbuf *path, const char *prefix, int force_flag,\n> >\n> >               strbuf_setlen(path, len);\n> >               strbuf_addstr(path, e->d_name);\n> > -             if (lstat(path->buf, &st))\n> > +             if (lstat(path->buf, &st)) {\n> >                       ; /* fall thru */\n> > -             else if (S_ISDIR(st.st_mode)) {\n> > +             } else if ((!prefix && skip_precious_file(&the_index, path->buf)) ||\n> > +                        (prefix && skip_prefix(path->buf, prefix, &rel_path) &&\n> > +                         skip_precious_file(&the_index, rel_path))) {\n> > +                     quote_path_relative(path->buf, prefix, &quoted);\n> > +                     printf(dry_run ? _(msg_would_skip_precious) : _(msg_skip_precious), quoted.buf);\n> > +                     *dir_gone = 0;\n> > +                     continue;\n>\n> An attribute is given to something that can be tracked, and a\n> directory would not get an attribute, because Git does not track\n> directories (there is a reason why skip_precious_file() takes\n> &the_index that is passed down the callchain to git_check_attr()).\n>\n> Triggering this logic before excluding S_ISDIR(st.st_mode) feels\n> iffy.\n>\n> But let's assume that being able to say \"this directory and anything\n> (recursively) inside are precious\" is a good idea and read on.\n\nHm... we do allow to set attributes on directories even though we\ndon't track them. I was under the impression that an attribute set on\na directory will be propagated to all files inside anyway, so this is\nmore of an (mis?-)optimization.\n\nBut gitattributes.txt explicitly says that it's wrong. One would need\nto do \"path/** precious\" to achieve the same thing.\n\nSo yeah maybe doing this before S_ISDIR() is wrong. The definition of\n`precious` also only says \"... is set on _files_\". Maybe best to\nignore attributes on directories? At least it looks like that's how\nall other attributes do.\n-- \nDuy\n"},{"id":"373699","messageId":"xmqqbm1c107z.fsf@gitster-ct.c.googlers.com","threadId":"50872","inReplyTo":"CACsJy8Ct6A7a7FzzH7ZUv9R2+k=G6qhzZ8Yjq8GUDBdTr_QBQA@mail.gmail.com","subject":"Re: [PATCH] Introduce \"precious\" file concept","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-04-12T01:28:00Z","receivedAt":"2019-04-12T01:28:05Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Duy Nguyen <pclouds@gmail.com> writes:\n\n> But gitattributes.txt explicitly says that it's wrong. One would need\n> to do \"path/** precious\" to achieve the same thing.\n>\n> So yeah maybe doing this before S_ISDIR() is wrong. The definition of\n> `precious` also only says \"... is set on _files_\". Maybe best to\n> ignore attributes on directories? At least it looks like that's how\n> all other attributes do.\n\nI could be persuaded in the other direction if there are widespread\nuses (or misuses---but once it gets widespread in the wild and turns\nout to be useful, it ceases to be misuses and becomes a feature) of\ngiving an attribute to a directory that affects the treatment of\nthat directory *itself*, but if there is none, I'd prefer to keep\nthe attribute \"what's tracked only\".\n\nWhether it is a good idea to give an attribute to a directory to\naffect the treatement of the directory *itself* (eh, rather,\nespecially if it were a good idea), I'd consider it a misuse as a\nshort-hand for giving all paths within it the same attribute, given\n\"path/**\" is available, as that would make it impossible to say \"I'd\nwant to affect this directory, but not any of the directories or\nfiles in it\".\n\nAnd if that is not clear in the current documentation set that faces\nour developers, perhaps we should make it so.\n\nThanks.\n"},{"id":"373765","messageId":"875zriga8f.fsf@evledraar.gmail.com","threadId":"50872","inReplyTo":"20190409102649.22115-1-pclouds@gmail.com","subject":"Re: [PATCH] Introduce \"precious\" file concept","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2019-04-12T21:54:56Z","receivedAt":"2019-04-12T21:55:02Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"\nOn Tue, Apr 09 2019, Nguyễn Thái Ngọc Duy wrote:\n\n>  Here's the replacement patch that keeps \"git clean\" behavior the same\n>  as before and only checks 'precious' attribute when --keep-precous is\n>  specified.\n\nCool to have the expected interaction with -x. Thanks.\n\n> -'git clean' [-d] [-f] [-i] [-n] [-q] [-e <pattern>] [-x | -X] [--] <path>...\n> +'git clean' [<options>] [-d] [-f] [-i] [-n] [-x | -X] [--] <path>...\n\nFor e.g. git-status(1) we just say:\n\n    git status [<options>...] [--] [<pathspec>...]\n\nAnd for git-add(1) we do:\n\n     git add [--verbose | -v] <very long exhaustive list of options\n                              spanning 4 lines omitted>\n\n\nSeems we should do one or the other here, i.e. either just add\n--keep-precious to the list, or leave it at just:\n\n    git clean [<options>...] [--] [<pathspec>...]\n\n> +This attribute is set on files to indicate that their content is\n> +valuable. Some commands will behave slightly different on precious\n> +files. linkgit:git-clean[1] may leave precious files alone.\n\nAs noted upthread I think it's better to start with \"clean\" and\n\"--keep-noclean\", we can always alias it to \"precious\" later without\nsquatting on that more general term when we (IMO) don't have the full\npicture yet & know if we even want that...\n\nBut anyway, with that out of the way and assuming this is kept-as is\nseems we could document this better if we're going to keep \"precious\",\ne.g. maybe:\n\n    This attribute is set on files to indicate that they're important\n    while not being tracked. This attribute is experimental and subject\n    to future change as more commands are changed to support it.\n\n    Now it's only supported by linkgit:git-clean[1] which'll skip\n    cleaning files marked ith `precious` when given the\n    `--keep-precious` option. This can be useful in combination with\n    linkgit:gitignore[5] to e.g. mark `*.o` build assets as both ignored\n    and precious.\n\nI.e. say it's still early days, that it's \"experimental\" (not insisting\non that phrasing, but somehow signaling to users that if they set this\nnow it may do new/unexpected things in the future), and briefly describe\nhow it works with \"clean\" and what the main intended use-case is.\n\n> +test_expect_success 'git clean -xd --keep-precious leaves precious files alone' '\n> +\tgit init precious &&\n> +\t(\n> +\t\tcd precious &&\n> +\t\ttest_commit one &&\n> +\t\tcat >.gitignore <<-\\EOF &&\n> +\t\t*.o\n> +\t\t*.mak\n> +\t\tEOF\n> +\t\tcat >.gitattributes <<-\\EOF &&\n> +\t\t*.mak precious\n> +\t\t.gitattributes precious\n> +\t\t*.precious precious\n> +\t\tEOF\n> +\t\tmkdir sub &&\n> +\t\ttouch one.o sub/two.o one.mak sub/two.mak &&\n> +\t\ttouch one.untracked two.precious sub/also.precious &&\n> +\t\tgit clean -fdx --keep-precious &&\n> +\t\ttest_path_is_missing one.o &&\n> +\t\ttest_path_is_missing sub/two.o &&\n> +\t\ttest_path_is_missing one.untracked &&\n> +\t\ttest_path_is_file .gitattributes &&\n> +\t\ttest_path_is_file one.mak &&\n> +\t\ttest_path_is_file sub/two.mak &&\n> +\t\ttest_path_is_file two.precious &&\n> +\t\ttest_path_is_file sub/also.precious\n> +\t)\n> +'\n\nAFAICT this is the first attribute intended purely to be set on files\nthat aren't tracked. I wonder if we should test for setting it on files\nthat are tracked, and whether we should e.g. warn about that? Maybe not,\nbut just raising it since I don't think it was discussed already...\n"},{"id":"373792","messageId":"CACsJy8AEZ-Lz6zgEsuNukvphB9TTa9FAC1gK05fhnie2xtfc9w@mail.gmail.com","threadId":"50872","inReplyTo":"875zriga8f.fsf@evledraar.gmail.com","subject":"Re: [PATCH] Introduce \"precious\" file concept","fromName":"Duy Nguyen","fromEmail":"pclouds@gmail.com","sentAt":"2019-04-13T10:19:47Z","receivedAt":"2019-04-13T10:20:15Z","isPatch":true,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"I've had enough. Please drop this nd/precious. I'm not updating it anymore.\n\nOn Sat, Apr 13, 2019 at 4:54 AM Ævar Arnfjörð Bjarmason\n<avarab@gmail.com> wrote:\n>\n>\n> On Tue, Apr 09 2019, Nguyễn Thái Ngọc Duy wrote:\n>\n> >  Here's the replacement patch that keeps \"git clean\" behavior the same\n> >  as before and only checks 'precious' attribute when --keep-precous is\n> >  specified.\n>\n> Cool to have the expected interaction with -x. Thanks.\n>\n> > -'git clean' [-d] [-f] [-i] [-n] [-q] [-e <pattern>] [-x | -X] [--] <path>...\n> > +'git clean' [<options>] [-d] [-f] [-i] [-n] [-x | -X] [--] <path>...\n>\n> For e.g. git-status(1) we just say:\n>\n>     git status [<options>...] [--] [<pathspec>...]\n>\n> And for git-add(1) we do:\n>\n>      git add [--verbose | -v] <very long exhaustive list of options\n>                               spanning 4 lines omitted>\n>\n>\n> Seems we should do one or the other here, i.e. either just add\n> --keep-precious to the list, or leave it at just:\n>\n>     git clean [<options>...] [--] [<pathspec>...]\n>\n> > +This attribute is set on files to indicate that their content is\n> > +valuable. Some commands will behave slightly different on precious\n> > +files. linkgit:git-clean[1] may leave precious files alone.\n>\n> As noted upthread I think it's better to start with \"clean\" and\n> \"--keep-noclean\", we can always alias it to \"precious\" later without\n> squatting on that more general term when we (IMO) don't have the full\n> picture yet & know if we even want that...\n>\n> But anyway, with that out of the way and assuming this is kept-as is\n> seems we could document this better if we're going to keep \"precious\",\n> e.g. maybe:\n>\n>     This attribute is set on files to indicate that they're important\n>     while not being tracked. This attribute is experimental and subject\n>     to future change as more commands are changed to support it.\n>\n>     Now it's only supported by linkgit:git-clean[1] which'll skip\n>     cleaning files marked ith `precious` when given the\n>     `--keep-precious` option. This can be useful in combination with\n>     linkgit:gitignore[5] to e.g. mark `*.o` build assets as both ignored\n>     and precious.\n>\n> I.e. say it's still early days, that it's \"experimental\" (not insisting\n> on that phrasing, but somehow signaling to users that if they set this\n> now it may do new/unexpected things in the future), and briefly describe\n> how it works with \"clean\" and what the main intended use-case is.\n>\n> > +test_expect_success 'git clean -xd --keep-precious leaves precious files alone' '\n> > +     git init precious &&\n> > +     (\n> > +             cd precious &&\n> > +             test_commit one &&\n> > +             cat >.gitignore <<-\\EOF &&\n> > +             *.o\n> > +             *.mak\n> > +             EOF\n> > +             cat >.gitattributes <<-\\EOF &&\n> > +             *.mak precious\n> > +             .gitattributes precious\n> > +             *.precious precious\n> > +             EOF\n> > +             mkdir sub &&\n> > +             touch one.o sub/two.o one.mak sub/two.mak &&\n> > +             touch one.untracked two.precious sub/also.precious &&\n> > +             git clean -fdx --keep-precious &&\n> > +             test_path_is_missing one.o &&\n> > +             test_path_is_missing sub/two.o &&\n> > +             test_path_is_missing one.untracked &&\n> > +             test_path_is_file .gitattributes &&\n> > +             test_path_is_file one.mak &&\n> > +             test_path_is_file sub/two.mak &&\n> > +             test_path_is_file two.precious &&\n> > +             test_path_is_file sub/also.precious\n> > +     )\n> > +'\n>\n> AFAICT this is the first attribute intended purely to be set on files\n> that aren't tracked. I wonder if we should test for setting it on files\n> that are tracked, and whether we should e.g. warn about that? Maybe not,\n> but just raising it since I don't think it was discussed already...\n\n\n\n-- \nDuy\n"}]}