threads / discuss / 50872

What's cooking in git.git (Apr 2019, #01; Thu, 4)

Subject: What's cooking in git.git (Apr 2019, #01; Thu, 4)

## tl;dr

19 messages between Apr 4, 2019 and Apr 13, 2019.

replies: 18people: 6as markdown or json

Junio C Hamano· Apr 4, 2019, 10:28 UTC · lore

What's cooking in git.git (Apr 2019, #01; Thu, 4) --------------------------------------------------

Here are the topics that have been cooking. Commits prefixed with '-' are only in 'pu' (proposed updates) while commits prefixed with '+' are in 'next'. The ones marked with '.' do not appear in any of the integration branches, but I am still holding onto them.

So, ... while I was offline for a week, there seems to have been quite a lot of activities around here. Hopefully everybody had fun in the meantime ;-)

I think I'm mostly caught up by now (except for an inevitable "fell thru the cracks" topic or three) and here is what I collected so far, thinking that they may be worth looking at. I haven't given any deep thought to many topics yet, so the topic description may be either totally lacking or completely incorrect, and their assessment may be stale and not reflect the already-reached list concensus. As always, help in updating them would be grately appreciated.

You can find the changes described here in the integration branches of the repositories listed at

    http://git-blame.blogspot.com/p/git-public-repositories.html

-------------------------------------------------- [Graduated to "master"]

* ab/makefile-help-devs-more (2019-02-24) 6 commits
  (merged to 'next' on 2019-03-11 at 898f5f44bc)
 + Makefile: allow for combining DEVELOPER=1 and CFLAGS="..."
 + Makefile: move the setting of *FLAGS closer to "include"
 + Makefile: Move *_LIBS assignment into its own section
 + Makefile: add/remove comments at top and tweak whitespace
 + Makefile: move "strip" assignment down from flags
 + Makefile: remove an out-of-date comment
 Originally merged to 'next' on 2019-03-07
 CFLAGS now can be tweaked when invoking Make while using
 DEVELOPER=YesPlease; this did not work well before.
* br/commit-tree-parseopt (2019-03-08) 1 commit
  (merged to 'next' on 2019-03-11 at e1228ef04f)
 + commit-tree: utilize parse-options api
 Originally merged to 'next' on 2019-03-08
 The command line parser of "git commit-tree" has been rewritten to
 use the parse-options API.
* jk/bisect-final-output (2019-03-01) 3 commits
  (merged to 'next' on 2019-03-11 at dea599eb04)
 + bisect: make diff-tree output prettier
 + bisect: fix internal diff-tree config loading
 + bisect: use string arguments to feed internal diff-tree
 Originally merged to 'next' on 2019-03-07
 The final report from "git bisect" used to show the suspected
 culprit using a raw "diff-tree", with which there is no output for
 a merge commit.  This has been updated to use a more modern and
 human readable output that still is concise enough.
* jk/config-type-color-ends-with-lf (2019-03-07) 1 commit
  (merged to 'next' on 2019-03-11 at 810b269d1a)
 + config: document --type=color output is a complete line
 Originally merged to 'next' on 2019-03-07
 "git config --type=color ..." is meant to replace "git config --get-color"
 but there is a slight difference that wasn't documented, which is
 now fixed.
* jk/fsck-doc (2019-03-05) 2 commits
  (merged to 'next' on 2019-03-11 at 5cd610f73e)
 + fsck: always compute USED flags for unreachable objects
 + doc/fsck: clarify --connectivity-only behavior
 Originally merged to 'next' on 2019-03-07
 "git fsck --connectivity-only" omits computation necessary to sift
 the objects that are not reachable from any of the refs into
 unreachable and dangling.  This is now enabled when dangling
 objects are requested (which is done by default, but can be
 overridden with the "--no-dangling" option).
* jk/no-sigpipe-during-network-transport (2019-03-05) 2 commits
  (merged to 'next' on 2019-03-11 at 25900acd0d)
 + fetch: ignore SIGPIPE during network operation
 + fetch: avoid calling write_or_die()
 Originally merged to 'next' on 2019-03-07
 On platforms where "git fetch" is killed with SIGPIPE (e.g. OSX),
 the upload-pack that runs on the other end that hangs up after
 detecting an error could cause "git fetch" to die with a signal,
 which led to a flakey test.  "git fetch" now ignores SIGPIPE during
 the network portion of its operation (this is not a problem as we
 check the return status from our write(2)s).
* jk/virtual-objects-do-exist (2019-03-05) 1 commit
  (merged to 'next' on 2019-03-11 at 748c79a1f0)
 + rev-list: allow cached objects in existence check
 Originally merged to 'next' on 2019-03-07
 A recent update broke "is this object available to us?" check for
 well-known objects like an empty tree (which should yield "yes",
 even when there is no on-disk object for an empty tree), which has
 been corrected.
* js/rebase-orig-head-fix (2019-03-04) 4 commits
  (merged to 'next' on 2019-03-11 at 4b1b19d391)
 + built-in rebase: set ORIG_HEAD just once, before the rebase
 + built-in rebase: demonstrate that ORIG_HEAD is not set correctly
 + built-in rebase: use the correct reflog when switching branches
 + built-in rebase: no need to check out `onto` twice
 Originally merged to 'next' on 2019-03-07
 "git rebase" that was reimplemented in C did not set ORIG_HEAD
 correctly, which has been corrected.
* js/stress-test-ui-tweak (2019-03-04) 2 commits
  (merged to 'next' on 2019-03-11 at 223afded1c)
 + tests: introduce --stress-jobs=<N>
 + tests: let --stress-limit=<N> imply --stress
 Originally merged to 'next' on 2019-03-07
 Dev support.
* ma/clear-repository-format (2019-03-01) 2 commits
  (merged to 'next' on 2019-03-11 at f3db1c278f)
 + setup: fix memory leaks with `struct repository_format`
 + setup: free old value before setting `work_tree`
 Originally merged to 'next' on 2019-03-07
 The setup code has been cleaned up to avoid leaks around the
 repository_format structure.
* sx/evolve (2019-02-15) 8 commits
 . evolve: add the git change list command
 . evolve: implement the git change command
 . evolve: add support for writing metacommits
 . evolve: add the change-table structure
 . evolve: add support for parsing metacommits
 . ref-filter: add the metas namespace to ref-filter
 . sha1-array: implement oid_array_readonly_contains
 . technical doc: add a design doc for the evolve command
 The beginning of "hg evolve" mimicry.

-------------------------------------------------- [New Topics]

* ms/worktree-add-atomic-mkdir (2019-03-12) 1 commit
  (merged to 'next' on 2019-03-20 at ded442ed02)
 + worktree: fix worktree add race
 "git worktree add" used to do a "find an available name with stat
 and then mkdir", which is race-prone.  This has been fixed by using
 mkdir and reacting to EEXIST in a loop.
 Will merge to 'master'.
* tb/stash-in-c-unused-param-fix (2019-03-11) 1 commit
  (merged to 'next' on 2019-03-20 at 5ccac5f80d)
 + stash: drop unused parameter
 (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.)
 Code clean-up.
 Will cook in 'next'.
* dl/subtree-limit-to-one-rev (2019-03-12) 1 commit
 - contrib/subtree: ensure only one rev is provided
 "git subtree" (in contrib/) update.
 Will merge to 'next'.
* ar/t4150-remove-cruft (2019-03-13) 1 commit
  (merged to 'next' on 2019-03-20 at a0106a8d5c)
 + t4150: remove unused variable
 Test cleanup.
 Will merge to 'master'.
* cb/doco-mono (2019-03-13) 2 commits
 - doc: format pathnames and URLs as monospace.
 - doc/CodingGuidelines: URLs and paths as monospace
 Clean-up markup in the documentation suite.
 Will merge to 'next'.
* cc/multi-promisor (2019-04-02) 11 commits
 - remote: add promisor and partial clone config to the doc
 - partial-clone: add multiple remotes in the doc
 - t0410: test fetching from many promisor remotes
 - builtin/fetch: remove unique promisor remote limitation
 - promisor-remote: parse remote.*.partialclonefilter
 - Use promisor_remote_get_direct() and has_promisor_remote()
 - promisor-remote: use repository_format_partial_clone
 - promisor-remote: add promisor_remote_reinit()
 - promisor-remote: implement promisor_remote_get_direct()
 - Add initial support for many promisor remotes
 - fetch-object: make functions return an error code
 Breaks 'pu'.
* jk/promote-ggg (2019-03-13) 1 commit
  (merged to 'next' on 2019-03-20 at 3db7d2566d)
 + point pull requesters to GitGitGadget
 Suggest GitGitGadget instead of submitGit as a way to submit
 patches based on GitHub PR to us.
 Will merge to 'master'.
* jk/sha1dc (2019-03-13) 1 commit
  (merged to 'next' on 2019-03-20 at 969280e8e5)
 + Makefile: fix unaligned loads in sha1dc with UBSan
 Build update for SHA-1 with collision detection.
 Will merge to 'master'.
* jt/submodule-fetch-errmsg (2019-03-14) 1 commit
  (merged to 'next' on 2019-03-20 at a6b0efa76f)
 + submodule: explain first attempt failure clearly
 Error message update.
 Will merge to 'master'.
 cf. <20190313175738.252961-1-jonathantanmy@google.com> (v2)
* nd/switch-and-restore (2019-04-02) 39 commits
 - doc: promote "git restore"
 - completion: support restore
 - SQUASH??? move -p test to 2071 from 2070
 - t: add tests for restore
 - restore: support --patch
 - restore: default to --source=HEAD when only --index is specified
 - restore: add --worktree and --index
 - checkout: factor out worktree checkout code
 - restore: disable overlay mode by default
 - restore: make pathspec mandatory
 - restore: take tree-ish from --source option instead
 - checkout: split part of it to new command 'restore'
 - doc: promote "git switch"
 - completion: support switch
 - t: add tests for switch
 - switch: make --orphan switch to an empty tree
 - switch: reject if some operation is in progress
 - switch: no worktree status unless real branch switch happens
 - switch: implicit dwim, use --no-guess to disable it
 - switch: add short option for --detach
 - switch: only allow explicit detached HEAD
 - switch: reject "do nothing" case
 - switch: stop accepting pathspec
 - switch: remove -l
 - switch: add --discard-changes
 - switch: better names for -b and -B
 - checkout: split part of it to new command 'switch'
 - checkout: split options[] array in three pieces
 - checkout: move 'confict_style' and 'dwim_..' to checkout_opts
 - checkout: make "opts" in cmd_checkout() a pointer
 - checkout: factor out some code in parse_branchname_arg()
 - checkout: keep most #include sorted
 - checkout: inform the user when removing branch state
 - checkout: advice how to get out of detached HEAD mode
 - t: rename t2014-switch.sh to t2014-checkout-switch.sh
 - git-checkout.txt: fix monospace typeset
 - doc: document --overwrite-ignore
 - git-checkout.txt: fix one syntax line
 - git-checkout.txt: spell out --no-option
 Two new commands "git switch" and "git restore" are introduced to
 split "checking out a branch to work on advancing its history" and
 "checking out paths out of the index and/or a tree-ish to work on
 advancing the current history" out of the single "git checkout"
 command.
 cf. <20190329103919.15642-1-pclouds@gmail.com> (switch v6)
 cf. <20190308101655.9767-1-pclouds@gmail.com> (restore v1)
* ab/doc-misc-typofixes (2019-03-18) 1 commit
 - doc: fix typos in man pages
 Typofixes.
 Will merge to 'next'.
* ab/drop-scripted-rebase (2019-03-20) 1 commit
 - rebase: remove the rebase.useBuiltin setting
 Retire scripted "git rebase" implementation.
 Will merge to 'next'.
* ab/gc-reflog (2019-04-01) 7 commits
 - gc: handle & check gc.reflogExpire config
 - reflog tests: assert lack of early exit with expiry="never"
 - reflog tests: test for the "points nowhere" warning
 - reflog tests: make use of "test_config" idiom
 - gc: refactor a "call me once" pattern
 - gc: convert to using the_hash_algo
 - gc: remove redundant check for gc_auto_threshold
 Fix various glitches in "git gc" around reflog handling.
 cf. <20190328161434.19200-1-avarab@gmail.com> (v4)
* ew/repack-with-bitmaps-by-default (2019-03-18) 3 commits
 - pack-objects: default to writing bitmap hash-cache
 - t5310: correctly remove bitmaps for jgit test
 - repack: enable bitmaps by default on bare repos
 The connectivity bitmaps are created by default in bare
 repositories now; also the pathname hash-cache is created by
 default to avoid making crappy deltas when repacking.
 Will merge to 'next'.
* jk/perf-lib-tee (2019-03-18) 1 commit
 - perf-lib.sh: rely on test-lib.sh for --tee handling
 Code cleanup in the test framework.
 Will merge to 'next'.
* js/check-docs-exe (2019-04-01) 5 commits
 - check-docs: fix for setups where executables have an extension
 - check-docs: do not expect guide pages to correspond to commands
 - check-docs: really look at the documented commands again
 - docs: do not document the `git remote-testgit` command
 - docs: move gitremote-helpers into section 7
 Dev support update.
 Will merge to 'next'.
* js/difftool-no-index (2019-03-18) 3 commits
 - difftool: allow running outside Git worktrees with --no-index
 - parse-options: make OPT_ARGUMENT() more useful
 - difftool: remove obsolete (and misleading) comment
 "git difftool" can now run outside a repository.
 Will merge to 'next'.
* js/get-short-oid-drop-cache (2019-03-14) 4 commits
 - get_oid(): when an object was not found, try harder
 - sequencer: move stale comment into correct location
 - sequencer: improve error message when an OID could not be parsed
 - rebase -i: demonstrate obscure loose object cache bug
 A corner-case object name ambiguity while the sequencer machinery
 is working (e.g. "rebase -i -x") has been (half) fixed.
 Will merge to 'next'.
* ma/doc-diff-doc-vs-doctor-comparison (2019-03-18) 4 commits
 - doc-diff: add `--cut-header-footer`
 - doc-diff: support diffing from/to AsciiDoc(tor)
 - doc-diff: let `render_tree()` take an explicit directory name
 - Doc: auto-detect changed build flags
 Dev support update to make it easier to compare two formatted
 results from our documentation.
 Will merge to 'next'.
 cf. <20190319031412.GC6173@sigill.intra.peff.net>
* mh/pack-protocol-doc-fix (2019-03-18) 1 commit
 - fix pack protocol example client/server communication
 Docfix.
 Will merge to 'next'.
* nd/checkout-f-while-conflicted-fix (2019-03-21) 1 commit
 - unpack-trees: fix oneway_merge accidentally carry over stage index
 "git checkout -f <branch>" while the index has an unmerged path
 incorrectly left some paths in an unmerged state, which has been
 corrected.
 Will merge to 'next'.
* pw/cherry-pick-continue (2019-03-18) 3 commits
 - cherry-pick --continue: remember options
 - cherry-pick: demonstrate option amnesia
 - sequencer: break some long lines
 "git cherry-pick --options A..B", after giving control back to the
 user to ask help resolving a conflicted step, did not honor the
 options it originally received, which has been corrected.
 Will merge to 'next'.
* pw/rerere-autoupdate (2019-03-18) 2 commits
 - merge: tweak --rerere-autoupdate documentation
 - am/cherry-pick/rebase/revert: document --rerere-autoupdate
 Doc updates.
 Will merge to 'next'.
* sg/test-atexit (2019-03-14) 11 commits
 - t9811-git-p4-label-import: fix pipeline negation
 - git p4 test: disable '-x' tracing in the p4d watchdog loop
 - git p4 test: simplify timeout handling
 - git p4 test: clean up the p4d cleanup functions
 - git p4 test: use 'test_atexit' to kill p4d and the watchdog process
 - t0301-credential-cache: use 'test_atexit' to stop the credentials helper
 - tests: use 'test_atexit' to stop httpd
 - git-daemon: use 'test_atexit` to stop 'git-daemon'
 - test-lib: introduce 'test_atexit'
 - t/lib-git-daemon: make sure to kill the 'git-daemon' process
 - test-lib: fix interrupt handling with 'dash' and '--verbose-log -x'
 Test framework update to more robustly clean up leftover files and
 processes after tests are done.
 Will merge to 'next'.
* tb/trace2-va-list-fix (2019-03-20) 1 commit
 - trace2: NULL is not allowed for va_list
 Fix some code that passed a NULL when a va_list was expected.
 Will merge to 'next'.
* tg/glossary-overlay (2019-03-18) 1 commit
 - glossary: add definition for overlay
 Doc update.
 Will merge to 'next'.
* tg/stash-in-c-show-default-to-p-fix (2019-03-21) 1 commit
 - stash: setup default diff output format if necessary
 (this branch uses ps/stash-in-c; is tangled with js/stash-in-c-pathspec-fix and tb/stash-in-c-unused-param-fix.)
 A regression fix.
 Will merge to 'next'.
* tz/completion (2019-03-21) 4 commits
 - completion: use __git when calling --list-cmds
 - completion: fix multiple command removals
 - t9902: test multiple removals via completion.commands
 - git: read local config in --list-cmds
 The completion helper code now pays attention to repository-local
 configuration (when available), which allows --list-cmds to honour
 a repository specific setting of completion.commands, for example.
 Will merge to 'next'.
 cf. <20190320180329.22280-1-tmz@pobox.com> (v3)
* tz/t4038-bash-redirect-target-workaround (2019-03-18) 1 commit
 - t4038-diff-combined: quote paths with whitespace
 Work-around extra warning from bash in our tests.
 Will merge to 'next'.
* jc/format-patch-noclobber (2019-02-22) 1 commit
 - format-patch: --no-clobber refrains from overwriting output files
 (this branch uses jc/format-patch-error-check.)
* jk/unused-params-even-more (2019-03-21) 13 commits
 - parse_opt_ref_sorting: always use with NONEG flag
 - pretty: drop unused strbuf from parse_padding_placeholder()
 - pretty: drop unused "type" parameter in needs_rfc2047_encoding()
 - parse-options: drop unused ctx parameter from show_gitcomp()
 - fetch_pack(): drop unused parameters
 - report_path_error(): drop unused prefix parameter
 - unpack-trees: drop unused error_type parameters
 - unpack-trees: drop name_entry from traverse_by_cache_tree()
 - test-date: drop unused "now" parameter from parse_dates()
 - update-index: drop unused prefix_length parameter from do_reupdate()
 - log: drop unused "len" from show_tagger()
 - log: drop unused rev_info from early output
 - revision: drop some unused "revs" parameters
 Code cleanup
 Will merge to 'next'.
* ab/commit-graph-fixes (2019-04-01) 8 commits
 - commit-graph: improve & i18n error messages
 - commit-graph write: don't die if the existing graph is corrupt
 - commit-graph verify: detect inability to read the graph
 - commit-graph: don't pass filename to load_commit_graph_one_fd_st()
 - commit-graph: don't early exit(1) on e.g. "git status"
 - commit-graph: fix segfault on e.g. "git status"
 - commit-graph tests: test a graph that's too small
 - commit-graph tests: split up corrupt_graph_and_verify()
 Code cleanup with more careful error checking before using data
 read from the commit-graph file.
 Will merge to 'next'.
* ab/gc-docs (2019-04-01) 12 commits
 - SQAUSH??? fixup! gc docs: include the "gc.*" section from "config" in "gc"
 - gc docs: remove incorrect reference to gc.auto=0
 - gc docs: clarify that "gc" doesn't throw away referenced objects
 - gc docs: note "gc --aggressive" in "fast-import"
 - gc docs: downplay the usefulness of --aggressive
 - gc docs: note how --aggressive impacts --window & --depth
 - gc docs: fix formatting for "gc.writeCommitGraph"
 - gc docs: re-flow the "gc.*" section in "config"
 - gc docs: include the "gc.*" section from "config" in "gc"
 - gc docs: clean grammar for "gc.bigPackThreshold"
 - gc docs: stop noting "repack" flags
 - gc docs: modernize the advice for manually running "gc"
* ab/test-lib-pass-trace2-env (2019-04-01) 1 commit
 - test-lib: whitelist GIT_TR2_* in the environment
 Allow tracing of Git executable while running out tests.
 Will merge to 'next'.
* am/p4-branches-excludes (2019-04-02) 8 commits
 - git-p4: respect excluded paths when detecting branches
 - git-p4: add failing test for "git-p4: respect excluded paths when detecting branches"
 - git-p4: don't exclude other files with same prefix
 - git-p4: add failing test for "don't exclude other files with same prefix"
 - git-p4: don't groom exclude path list on every commit
 - git-p4: match branches case insensitively if configured
 - git-p4: add failing test for "git-p4: match branches case insensitively if configured"
 - git-p4: detect/prevent infinite loop in gitCommitByP4Change()
 "git p4" update.
* bb/unicode-12 (2019-03-22) 1 commit
 - unicode: update the width tables to Unicode 12
 Unicode update.
 Will merge to 'next'.
* bc/hash-transition-16 (2019-04-01) 35 commits
 - gitweb: make hash size independent
 - Git.pm: make hash size independent
 - read-cache: read data in a hash-independent way
 - dir: make untracked cache extension hash size independent
 - builtin/difftool: use parse_oid_hex
 - refspec: make hash size independent
 - archive: convert struct archiver_args to object_id
 - builtin/get-tar-commit-id: make hash size independent
 - get-tar-commit-id: parse comment record
 - hash: add a function to lookup hash algorithm by length
 - remote-curl: make hash size independent
 - http: replace sha1_to_hex
 - http: compute hash of downloaded objects using the_hash_algo
 - http: replace hard-coded constant with the_hash_algo
 - http-walker: replace sha1_to_hex
 - http-push: remove remaining uses of sha1_to_hex
 - http-backend: allow 64-character hex names
 - http-push: convert to use the_hash_algo
 - builtin/pull: make hash-size independent
 - builtin/am: make hash size independent
 - fast-import: replace sha1_to_hex
 - fast-import: make hash-size independent
 - builtin/name-rev: make hash-size independent
 - object-store: rename and expand packed_git's sha1 member
 - notes: replace sha1_to_hex
 - notes: make hash size independent
 - notes-merge: switch to use the_hash_algo
 - submodule: avoid hard-coded constants
 - pack-bitmap: switch hash tables to use struct object_id
 - pack-bitmap: switch hard-coded constants to the_hash_algo
 - pack-bitmap: replace sha1_to_hex
 - pack-bitmap: convert struct stored_bitmap to object_id
 - pack-bitmap: make bitmap header handling hash agnostic
 - khash: move oid hash table definition
 - t/lib-submodule-update: use appropriate length constant
 Conversion from unsigned char[20] to struct object_id continues.
 Will merge to 'next'.
* cc/replace-graft-peel-tags (2019-04-01) 4 commits
 - replace: fix --graft when passing a tag first
 - replace: fix --graft when passing a tag as parent
 - t6050: redirect expected error output to a file
 - t6050: use test_line_count instead of wc -l
 When given a tag that points at a commit-ish, "git replace --graft"
 failed to peel the tag before writing a replace ref, which did not
 make sense because the old graft mechanism the feature wants to
 mimick only allowed to replace one commit object with another.
 This has been fixed.
 The title of the top two commits are fairly useless and does not
 say how the issue was fixed, but the fix is to peel the given tag
 ourselves down to the underlying commit object.
 Will merge to 'next'.
* dk/blame-keep-origin-blob (2019-04-03) 1 commit
 - blame.c: don't drop origin blobs as eagerly
 Performance fix around "git blame", especially in a linear history
 (which is the norm we should optimize for).
 Will merge to 'next'.
* dl/forbid-tagging-a-tag (2019-04-03) 3 commits
 - SQUASH???
 - tag: prevent nested tags
 - tag: fix formatting
 "git tag $newtag $obj", when $obj is another tag, now aborts,
 requiring a new --allow-nested-tag option, even though an
 invocation with $obj that is a blob or a tree is silently allowed,
 which does not make much sense.
 
 Will discard.
* dl/rebase-i-keep-base (2019-04-03) 4 commits
 - rebase: teach rebase --keep-base
 - rebase: fast-forward --onto in more cases
 - t3432: test rebase fast-forward behavior
 - t3431: add rebase --fork-point tests
 "git rebase --keep-base <upstream>" tries to find the original base
 of the topic being rebased and rebase on top of that same base, which
 is useful when running the "git rebase -i" (and its limited variant
 "git rebase -x").
 Will merge to 'next'.
* en/fast-import-parsing-fix (2019-04-01) 5 commits
 - fast-import: fix erroneous handling of get-mark with empty orphan commits
 - fast-import: only allow cat-blob requests where it makes sense
 - fast-import: check most prominent commands first
 - git-fast-import.txt: fix wording about where ls command can appear
 - t9300: demonstrate bug with get-mark and empty orphan commits
 "git fast-import" update.
 Will merge to 'next'.
* jh/midx-verify-too-many-packs (2019-03-22) 4 commits
 - midx: during verify group objects by packfile to speed verification
 - midx: add progress indicators in multi-pack-index verify
 - trace2:data: add trace2 data to midx
 - progress: add sparse mode to force 100% complete message
 "git multi-pack-index verify" did not scale well with the number of
 packfiles, which is being improved.
 Will merge to 'next'.
* jh/trace2-sid-fix (2019-04-01) 7 commits
 - trace2: make SIDs more unique
 - trace2: clarify UTC datetime formatting
 - trace2: report peak memory usage of the process
 - trace2: use system config for default trace2 settings
 - trace2: find exec-dir before trace2 initialization
 - trace2: add absolute elapsed time to start event
 - trace2: refactor setting process starting time
 Polishing of the new trace2 facility continues.  The system-level
 configuration can specify site-wide trace2 settings (which would be
 loved by big-brother types ;-).
 Getting closer but still being discussed.
 cf. <20190403000032.GA190454@google.com>
* jk/http-walker-status-fix (2019-03-24) 3 commits
 - http: use normalize_curl_result() instead of manual conversion
 - http: normalize curl results for dumb loose and alternates fetches
 - http: factor out curl result code normalization
 dumb-http walker has been updated to share more error recovery
 strategy with the normal codepath.
 Will merge to 'next'.
* jk/refs-double-abort (2019-03-22) 2 commits
 - refs/files-backend: don't look at an aborted transaction
 - refs/files-backend: handle packed transaction prepare failure
 A corner case bug in the refs API has been corrected.
 Will merge to 'next'.
* js/spell-out-options-in-tests (2019-04-02) 8 commits
 - tests: disallow the use of abbreviated options (by default)
 - tests (pack-objects): use the full, unabbreviated `--revs` option
 - tests (status): spell out the `--find-renames` option in full
 - tests (push): do not abbreviate the `--follow-tags` option
 - t5531: avoid using an abbreviated option
 - t7810: do not abbreviate `--no-exclude-standard` nor `--invert-match`
 - tests (rebase): spell out the `--force-rebase` option
 - tests (rebase): spell out the `--keep-empty` option
 The tests have been updated not to rely on the abbreviated option
 names the parse-options API offers, to protect us from an
 abbreviated form of an option that used to be unique within the
 command getting non-unique when a new option that share the same
 prefix is added.
 Will merge to 'next'.
* js/trace2-to-directory (2019-03-22) 1 commit
 - trace2: write to directory targets
 The trace2 tracing facility learned to auto-generate a filename
 when told to log to a directory.
 Will merge to 'next'.
* jt/batch-fetch-blobs-in-diff (2019-04-01) 2 commits
 - diff: batch fetching of missing blobs
 - sha1-file: support OBJECT_INFO_FOR_PREFETCH
 While running "git diff" in a lazy clone, we can upfront know which
 missing blobs we will need, instead of waiting for the on-demand
 machinery to discover them one by one.  Aim to achieve better
 performance by batching the request for these promised blobs.
 Will merge to 'next'.
* jt/fetch-no-update-shallow-in-proto-v2 (2019-04-01) 3 commits
 - fetch-pack: respect --no-update-shallow in v2
 - fetch-pack: call prepare_shallow_info only if v0
 - Merge branch 'jt/test-protocol-version' into jt/fetch-no-update-shallow-in-proto-v2
 (this branch uses jt/test-protocol-version.)
 Fix for protocol v2 support in "git fetch-pack" of shallow clones.
 Will merge to 'next'.
* jt/fetch-pack-wanted-refs-optim (2019-04-01) 1 commit
 - fetch-pack: binary search when storing wanted-refs
 Performance fix around "git fetch" that grabs many refs.
 Will merge to 'next'.
* jt/t5551-protocol-v2-does-not-have-half-auth (2019-03-24) 1 commit
 - t5551: mark half-auth no-op fetch test as v0-only
 Test update.
 Will merge to 'next'.
* km/empty-repo-is-still-a-repo (2019-04-03) 4 commits
 - dir: do not traverse repositories with no commits
 - t3009: test that ls-files -o traverses bogus repo
 - t3000: move non-submodule repo test to separate file
 - submodule: refuse to add repository with no commits
 Running "git add" on a repository created inside the current
 repository is an explicit indication that the user wants to add it
 as a submodule, but when the HEAD of the inner repository is on an
 unborn branch, it cannot be added as a submodule.  Worse, the files
 in its working tree can be added as if they are a part of the outer
 repository, which is not what the user wants.  These problems are
 being addressed.
 Getting there.
 cf. <87bm1mbua4.fsf@kyleam.com>
* nd/checkout-m (2019-03-24) 4 commits
 - checkout: prevent losing staged changes with --merge
 - read-tree: add --quiet
 - unpack-trees: rename "gently" flag to "quiet"
 - unpack-trees: keep gently check inside add_rejected_path
 "git checkout -m <other>" was about carrying the differences
 between HEAD and the working-tree files forward while checking out
 another branch, and ignored the differences between HEAD and the
 index.  The command has been taught to abort when the index and the
 HEAD are different.
 Will merge to 'next'.
* nd/checkout-m-doc-update (2019-03-21) 1 commit
 - checkout.txt: note about losing staged changes with --merge
 Doc about the above.
 Will merge to 'next'.
* nd/commit-a-with-paths-msg-update (2019-03-22) 1 commit
 - commit: improve error message in "-a <paths>" case
 The message given when "git commit -a <paths>" errors out has been
 updated.
 Will merge to 'next'.
* nd/diff-parseopt-4 (2019-03-24) 20 commits
 - am: avoid diff_opt_parse()
 - diff --no-index: use parse_options() instead of diff_opt_parse()
 - range-diff: use parse_options() instead of diff_opt_parse()
 - diff.c: allow --no-color-moved-ws
 - diff-parseopt: convert --color-moved-ws
 - diff-parseopt: convert --[no-]color-moved
 - diff-parseopt: convert --inter-hunk-context
 - diff-parseopt: convert --no-prefix
 - diff-parseopt: convert --line-prefix
 - diff-parseopt: convert --[src|dst]-prefix
 - diff-parseopt: convert --[no-]abbrev
 - diff-parseopt: convert --diff-filter
 - diff-parseopt: convert --find-object
 - diff-parseopt: convert -O
 - diff-parseopt: convert --pickaxe-all|--pickaxe-regex
 - diff-parseopt: convert -S|-G
 - diff-parseopt: convert -l
 - diff-parseopt: convert -z
 - diff-parseopt: convert --ita-[in]visible-in-index
 - diff-parseopt: convert --ws-error-highlight
 (this branch uses nd/diff-parseopt-3.)
 Fourth batch to teach the diff machinery to use the parse-options
 API.
 Will merge to 'next'.
* nd/include-if-wildmatch (2019-04-01) 1 commit
 - config: correct '**' matching in includeIf patterns
 A buglet in configuration parser has been fixed.
 Will merge to 'next'.
* nd/interpret-trailers-docfix (2019-04-01) 1 commit
 - interpret-trailers.txt: start the desc line with a capital letter
 Doc update.
 Will merge to 'next'.
* nd/precious (2019-04-01) 1 commit
 - Introduce "precious" file concept
 "git clean" learned to pay attention to the 'precious' attributes
 and keep untracked paths with the attribute instead of removing.
 Will merge to 'next'.
* nd/read-tree-reset-doc (2019-04-02) 1 commit
 - read-tree.txt: clarify --reset and worktree changes
 The documentation for "git read-tree --reset -u" has been updated.
 Will merge to 'next'.
* nd/sha1-name-c-wo-the-repository (2019-04-02) 31 commits
 - sha1-name.c: remove the_repo from get_oid_mb()
 - sha1-name.c: remove the_repo from other get_oid_*
 - sha1-name.c: remove the_repo from maybe_die_on_misspelt_object_name
 - submodule-config.c: use repo_get_oid for reading .gitmodules
 - sha1-name.c: add repo_get_oid()
 - sha1-name.c: remove the_repo from get_oid_with_context_1()
 - sha1-name.c: remove the_repo from resolve_relative_path()
 - sha1-name.c: remove the_repo from diagnose_invalid_index_path()
 - sha1-name.c: remove the_repo from handle_one_ref()
 - sha1-name.c: remove the_repo from get_oid_1()
 - sha1-name.c: remove the_repo from get_oid_basic()
 - sha1-name.c: remove the_repo from get_describe_name()
 - sha1-name.c: remove the_repo from get_oid_oneline()
 - sha1-name.c: add repo_interpret_branch_name()
 - sha1-name.c: remove the_repo from interpret_branch_mark()
 - sha1-name.c: remove the_repo from interpret_nth_prior_checkout()
 - sha1-name.c: remove the_repo from get_short_oid()
 - sha1-name.c: add repo_for_each_abbrev()
 - sha1-name.c: store and use repo in struct disambiguate_state
 - sha1-name.c: add repo_find_unique_abbrev_r()
 - sha1-name.c: remove the_repo from find_abbrev_len_packed()
 - sha1-name.c: remove the_repo from sort_ambiguous()
 - commit.c: add repo_get_commit_tree()
 - refs.c: remove the_repo from read_ref_at()
 - refs.c: add repo_dwim_log()
 - refs.c: add repo_dwim_ref()
 - refs.c: remove the_repo from expand_ref()
 - refs.c: remove the_repo from substitute_branch_name()
 - refs.c: add refs_shorten_unambiguous_ref()
 - refs.c: add refs_ref_exists()
 - packfile.c: add repo_approximate_object_count()
* pw/rebase-i-internal-rfc (2019-03-21) 12 commits
 - rebase -i: run without forking rebase--interactive
 - rebase: use a common action enum
 - rebase -i: use struct rebase_options in do_interactive_rebase()
 - rebase -i: use struct rebase_options to parse args
 - rebase -i: use struct object_id for squash_onto
 - rebase -i: use struct commit when parsing options
 - rebase -i: remove duplication
 - rebase -i: combine rebase--interactive.c with rebase.c
 - rebase: use OPT_RERERE_AUTOUPDATE()
 - rebase: rename write_basic_state()
 - sequencer: always discard index after checkout
 - Merge branch 'ag/sequencer-reduce-rewriting-todo' into pw/rebase-i-internal-rfc
 (this branch uses ag/sequencer-reduce-rewriting-todo.)
 The internal implementation of "git rebase -i" has been updated to
 avoid forking a separate "rebase--interactive" process.
* sg/asciidoctor-in-ci (2019-04-01) 6 commits
 - ci: fix AsciiDoc/Asciidoctor stderr check in the documentation build job
 - ci: stick with Asciidoctor v1.5.8 for now
 - ci: install Asciidoctor in 'ci/install-dependencies.sh'
 - Documentation/technical/protocol-v2.txt: fix formatting
 - Documentation/technical/api-config.txt: fix formatting
 - Documentation/git-diff-tree.txt: fix formatting
 Update our support to format documentation in the CI environment,
 either with AsciiDoc ro Asciidoctor.
 Will merge to 'next'.
* sg/index-pack-progress (2019-04-01) 1 commit
 - index-pack: show progress while checking objects
 size_t???
* sg/overlong-progress-fix (2019-04-02) 4 commits
 - progress: break too long progress bar lines
 - progress: clear previous progress update dynamically
 - progress: assemble percentage and counters in a strbuf before printing
 - progress: make display_progress() return void
 Updating the display with progress message has been cleaned up to
 deal better with overlong messages.
 Will merge to 'next'.
* sg/t5318-cleanup (2019-03-24) 1 commit
 - t5318-commit-graph: remove unused variable
 Code cleanup.
 Will merge to 'next'.
* tz/asciidoctor-fixes (2019-04-01) 2 commits
 - Documentation/git-status: fix titles in porcelain v2 section
 - Documentation/rev-list-options: wrap --date=<format> block with "--"
 Doc updates.
 Will merge to 'next'.

-------------------------------------------------- [Stalled]

* js/add-i-coalesce-after-editing-hunk (2018-08-28) 1 commit
 - add -p: coalesce hunks before testing applicability
 Applicability check after a patch is edited in a "git add -i/p"
 session has been improved.
 Will hold.
 cf. <e5b2900a-0558-d3bf-8ea1-d526b078bbc2@talktalk.net>
* ds/midx-expire-repack (2019-01-27) 10 commits
 - midx: add test that 'expire' respects .keep files
 - multi-pack-index: test expire while adding packs
 - midx: implement midx_repack()
 - multi-pack-index: prepare 'repack' subcommand
 - multi-pack-index: implement 'expire' subcommand
 - midx: refactor permutation logic and pack sorting
 - midx: simplify computation of pack name lengths
 - multi-pack-index: prepare for 'expire' subcommand
 - Docs: rearrange subcommands for multi-pack-index
 - repack: refactor pack deletion for future use
 "git multi-pack-index expire/repack" are new subcommands that
 consult midx file and are used to drop unused pack files and
 coalesce small pack files that are still in use.
 Comments?
* js/protocol-advertise-multi (2018-12-28) 1 commit
 - protocol: advertise multiple supported versions
 The transport layer has been updated so that the protocol version
 used can be negotiated between the parties, by the initiator
 listing the protocol versions it is willing to talk, and the other
 side choosing from one of them.
 Expecting a reroll.
 cf. <CANq=j3u-zdb_FvNJGPCmygNMScseav63GhVvBX3NcVS4f7TejA@mail.gmail.com>
* mk/use-size-t-in-zlib (2018-10-15) 1 commit
 - zlib.c: use size_t for size
 The wrapper to call into zlib followed our long tradition to use
 "unsigned long" for sizes of regions in memory, which have been
 updated to use "size_t".
* dl/remote-save-to-push (2018-12-11) 1 commit
 - remote: add --save-to-push option to git remote set-url
 "git remote set-url" learned a new option that moves existing value
 of the URL field to pushURL field of the remote before replacing
 the URL field with a new value.
 Anybody who wants to champion this topic?
 I am personally not yet quite convinced if this is worth pursuing.

-------------------------------------------------- [Cooking]

* nb/branch-show-other-worktrees-head (2019-03-18) 3 commits
 - branch: add worktree info on verbose output
 - branch: update output to include worktree info
 - ref-filter: add worktreepath atom
 "git branch --list" learned to show branches that are checked out
 in other worktrees connected to the same repository prefixed with
 '+', similar to the way the currently checked out branch is shown
 with '*' in front.
 Getting there...
 cf. <20190316013807.38756-1-nbelakovski@gmail.com> (v9)
 cf. <20190318121054.GC24175@szeder.dev>
* dl/ignore-docs (2019-03-08) 2 commits
  (merged to 'next' on 2019-03-20 at f1f50c07ef)
 + docs: move core.excludesFile from git-add to gitignore
 + git-clean.txt: clarify ignore pattern files
 Doc update.
 Will merge to 'master'.
* jh/resize-convert-scratch-buffer (2019-03-08) 1 commit
  (merged to 'next' on 2019-03-20 at 92a24b29ed)
 + convert: avoid malloc of original file size
 When the "clean" filter can reduce the size of a huge file in the
 working tree down to a small "token" (a la Git LFS), there is no
 point in allocating a huge scratch area upfront, but the buffer is
 sized based on the original file size.  The convert mechanism now
 allocates very minimum and reallocates as it receives the output
 from the clean filter process.
 Will merge to 'master'.
* jk/line-log-with-patch (2019-03-11) 2 commits
  (merged to 'next' on 2019-03-20 at 21afea908c)
 + line-log: detect unsupported formats
 + line-log: suppress diff output with "-s"
 "git log -L<from>,<to>:<path>" with "-s" did not suppress the patch
 output as it should.  This has been corrected.
 Will merge to 'master'.
* js/rebase-deprecate-preserve-merges (2019-03-12) 1 commit
  (merged to 'next' on 2019-03-20 at 32baac3acd)
 + rebase: deprecate --preserve-merges
 "git rebase --rebase-merges" replaces its old "--preserve-merges"
 option; the latter is now marked as deprecated.
 Will merge to 'master'.
* js/init-db-update-for-mingw (2019-03-12) 1 commit
 - mingw: respect core.hidedotfiles = false in git-init again
 "git init" forgot to read platform-specific repository
 configuration, which made Windows port to ignore settings of
 core.hidedotfiles, for example.
 Will merge to 'next'.
* js/stash-in-c-pathspec-fix (2019-03-12) 3 commits
  (merged to 'next' on 2019-03-20 at e81d08af7a)
 + stash: pass pathspec as pointer
 + built-in stash: handle :(glob) pathspecs again
 + legacy stash: fix "rudimentary backport of -q"
 (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.)
 Further fixes to "git stash" reimplemented in C.
 Will cook in 'next'.
* nd/rewritten-ref-is-per-worktree (2019-03-08) 3 commits
  (merged to 'next' on 2019-03-20 at 5369a2e1f6)
 + Make sure refs/rewritten/ is per-worktree
 + files-backend.c: reduce duplication in add_per_worktree_entries_to_dir()
 + files-backend.c: factor out per-worktree code in loose_fill_ref_dir()
 "git rebase" uses the refs/rewritten/ hierarchy to store its
 intermediate states, which inherently makes the hierarchy per
 worktree, but it didn't quite work well.
 Will merge to 'master'.
* js/remote-curl-i18n (2019-03-06) 1 commit
 - remote-curl: mark all error messages for translation
 (this branch uses js/anonymize-remote-curl-diag.)
 Error messages given from the http transport have been updated so
 that they can be localized.
 Will merge to 'next'.
* ma/asciidoctor-fixes-more (2019-03-07) 5 commits
 - Documentation: turn middle-of-line tabs into spaces
 - git-svn.txt: drop escaping '\' that ends up being rendered
 - git.txt: remove empty line before list continuation
 - config/fsck.txt: avoid starting line with dash
 - config/diff.txt: drop spurious backtick
 Documentation mark-up fixes.
 Will merge to 'next'.
* nd/diff-parseopt-3 (2019-03-07) 20 commits
  (merged to 'next' on 2019-03-20 at ee79d4924b)
 + diff-parseopt: convert --submodule
 + diff-parseopt: convert --ignore-submodules
 + diff-parseopt: convert --textconv
 + diff-parseopt: convert --ext-diff
 + diff-parseopt: convert --quiet
 + diff-parseopt: convert --exit-code
 + diff-parseopt: convert --color-words
 + diff-parseopt: convert --word-diff-regex
 + diff-parseopt: convert --word-diff
 + diff-parseopt: convert --[no-]color
 + diff-parseopt: convert --[no-]follow
 + diff-parseopt: convert -R
 + diff-parseopt: convert -a|--text
 + diff-parseopt: convert --full-index
 + diff-parseopt: convert --binary
 + diff-parseopt: convert --anchored
 + diff-parseopt: convert --diff-algorithm
 + diff-parseopt: convert --histogram
 + diff-parseopt: convert --patience
 + diff-parseopt: convert --[no-]indent-heuristic
 (this branch is used by nd/diff-parseopt-4.)
 Third batch to teach the diff machinery to use the parse-options
 API.
 Will merge to 'master'.
 cf. <20190305123026.7266-1-pclouds@gmail.com>
* jt/test-protocol-version (2019-03-07) 8 commits
  (merged to 'next' on 2019-03-20 at 0c97907bdb)
 + t5552: compensate for v2 filtering ref adv.
 + tests: fix protocol version for overspecifications
 + t5700: only run with protocol version 1
 + t5512: compensate for v0 only sending HEAD symrefs
 + t5503: fix overspecification of trace expectation
 + tests: always test fetch of unreachable with v0
 + t5601: check ssh command only with protocol v0
 + tests: define GIT_TEST_PROTOCOL_VERSION
 (this branch is used by jt/fetch-no-update-shallow-in-proto-v2.)
 Help developers by making it easier to run most of the tests under
 different versions of over-the-wire protocols.
 Will merge to 'master'.
 cf. <cover.1551131153.git.jonathantanmy@google.com>
* js/anonymize-remote-curl-diag (2019-03-05) 1 commit
 - curl: anonymize URLs in error messages and warnings
 (this branch is used by js/remote-curl-i18n.)
 remote-http transport did not anonymize URLs reported in its error
 messages at places.
 Will merge to 'next'.
* ma/asciidoctor-fixes (2019-03-11) 3 commits
 - asciidoctor-extensions: fix spurious space after linkgit
 - Documentation/Makefile: add missing dependency on asciidoctor-extensions
 - Documentation/Makefile: add missing xsl dependencies for manpages
 Build fix around use of asciidoctor instead of asciidoc
 Will merge to 'next'.
* nd/worktree-name-sanitization (2019-03-20) 2 commits
 - SQUASH???
 - worktree add: sanitize worktree names
 In recent versions of Git, per-worktree refs are exposed in
 refs/worktrees/<wtname>/ hierarchy, which means that worktree names
 must be a valid refname component.  The code now sanitizes the names
 given to worktrees, to make sure these refs are well-formed.
* ra/t3600-test-path-funcs (2019-03-08) 3 commits
  (merged to 'next' on 2019-03-20 at 404110d291)
 + t3600: use helpers to replace test -d/f/e/s <path>
 + t3600: modernize style
 + test functions: add function `test_file_not_empty`
 A GSoC micro.
 Will merge to 'master'.
 cf. <20190304120801.28763-1-rohit.ashiwal265@gmail.com> (v3)
* dl/reset-doc-no-wrt-abbrev (2019-03-06) 1 commit
  (merged to 'next' on 2019-03-20 at 984b4586c7)
 + git-reset.txt: clarify documentation
 Doc update.
 Will merge to 'master'.
* ja/dir-rename-doc-markup-fix (2019-03-06) 1 commit
  (merged to 'next' on 2019-03-20 at f3238df381)
 + Doc: fix misleading asciidoc formating
 Doc update.
 Will merge to 'master'.
* bp/post-index-change-hook (2019-02-15) 1 commit
  (merged to 'next' on 2019-03-11 at cb96d1d7c4)
 + read-cache: add post-index-change hook
 Originally merged to 'next' on 2019-02-23
 A new hook "post-index-change" is called when the on-disk index
 file changes, which can help e.g. a virtualized working tree
 implementation.
 Will cook in 'next'.
* jc/format-patch-error-check (2019-02-22) 2 commits
 - format-patch: notice failure to open cover letter for writing
 - builtin/log: downcase the beginning of error messages
 (this branch is used by jc/format-patch-noclobber.)
 "git format-patch" used overwrite an existing patch/cover-letter
 file.  A new "--no-clobber" option stops it.
 Will merge to 'next'.
* jt/fetch-cdn-offload (2019-03-12) 9 commits
 - SQUASH???
 - upload-pack: send part of packfile response as uri
 - fetch-pack: support more than one pack lockfile
 - upload-pack: refactor reading of pack-objects out
 - Documentation: add Packfile URIs design doc
 - Documentation: order protocol v2 sections
 - http-fetch: support fetching packfiles by URL
 - http: improve documentation of http_pack_request
 - http: use --stdin when getting dumb HTTP pack
 WIP for allowing a response to "git fetch" to instruct the bulk of
 the pack contents to be instead taken from elsewhere (aka CDN).
* dl/submodule-set-branch (2019-02-08) 3 commits
 - submodule: teach set-branch subcommand
 - submodule--helper: teach config subcommand --unset
 - git-submodule.txt: "--branch <branch>" option defaults to 'master'
 "git submodule" learns "set-branch" subcommand that allows the
 submodule.*.branch settings to be modified.
 Needs sign-off on the tip commit; other than that it seems OK to be in 'next'.
* dm/some-stdio-functions-are-macro-on-freebsd (2019-02-01) 1 commit
 - http: cast result to FILE *
 Variants of BSD define fileno(fh) as a macro, breaking a program
 that passes a "void *" to it.
 Expecting a reroll.
 cf. <49B9198C-53E5-42BD-8834-B1EDEB3332CB@usask.ca>
* ds/commit-graph-format-v2 (2019-01-29) 8 commits
 - SQUASH : misnamed variables and style fix
 - commit-graph: test verifying a corrupt v2 header
 - commit-graph: implement file format version 2
 - commit-graph: add --version=<n> option
 - commit-graph: create new version flags
 - commit-graph: collapse parameters into flags
 - commit-graph: return with errors during write
 - Merge branch 'bc/sha-256' into ds/commit-graph-format-v2
 Introduce version 2 of the commit-graph format to correct
 deficiency in the initial version.
 Needs update before merging to 'next'.
* br/blame-ignore (2019-02-13) 6 commits
 - SQUASH???
 - blame: add tests for ignoring revisions
 - blame: add a config option to mark ignored lines
 - blame: add the ability to ignore commits and their changes
 - blame: use a helper function in blame_chunk()
 - Move init_skiplist() outside of fsck
 "git blame" learned to "ignore" commits in the history, whose
 effects (as well as their presence) get ignored.
 Needs update before merging to 'next'.
* nd/config-move-to (2019-01-14) 7 commits
 - config.h: fix hdr-check warnings
 - config: add --move-to
 - config: factor out set_config_source_file()
 - config: use OPT_FILENAME()
 - config.c: add repo_config_set_worktree_gently()
 - worktree.c: add get_worktree_config()
 - config.c: avoid git_path() in do_git_config_sequence()
 Needs review.
* dl/merge-cleanup-scissors-fix (2019-03-21) 11 commits
 - cherry-pick/revert: add scissors line on merge conflict
 - sequencer.c: define describe_cleanup_mode
 - merge: add scissors line on merge conflict
 - merge: cleanup messages like commit
 - sequencer.c: remove duplicate code
 - parse-options.h: extract common --cleanup option
 - commit: extract cleanup_mode functions to sequencer
 - t7502: clean up style
 - t7604: clean up style
 - t3507: clean up style
 - t7600: clean up style
 The list of conflicted paths shown in the editor while concluding a
 conflicted merge was shown above the scissors line when the
 clean-up mode is set to "scissors", even though it was commented
 out just like the list of updated paths and other information to
 help the user explain the merge better.
 Needs review.
 cf. <cover.1553150827.git.liu.denton@gmail.com> (v9)
* jn/unknown-index-extensions (2018-11-21) 2 commits
 - index: offer advice for unknown index extensions
 - index: do not warn about unrecognized extensions
 A bit too alarming warning given when unknown index extensions
 exist is getting revamped.
 Expecting a reroll.
* ag/sequencer-reduce-rewriting-todo (2019-03-07) 18 commits
 - rebase--interactive: move transform_todo_file()
 - sequencer: use edit_todo_list() in complete_action()
 - rebase-interactive: rewrite edit_todo_list() to handle the initial edit
 - rebase-interactive: append_todo_help() changes
 - rebase-interactive: use todo_list_write_to_file() in edit_todo_list()
 - sequencer: refactor skip_unnecessary_picks() to work on a todo_list
 - rebase--interactive: move rearrange_squash_in_todo_file()
 - rebase--interactive: move sequencer_add_exec_commands()
 - sequencer: change complete_action() to use the refactored functions
 - sequencer: make sequencer_make_script() write its script to a strbuf
 - sequencer: refactor rearrange_squash() to work on a todo_list
 - sequencer: refactor sequencer_add_exec_commands() to work on a todo_list
 - sequencer: refactor check_todo_list() to work on a todo_list
 - sequencer: introduce todo_list_write_to_file()
 - sequencer: refactor transform_todos() to work on a todo_list
 - sequencer: remove the 'arg' field from todo_item
 - sequencer: make the todo_list structure public
 - sequencer: changes in parse_insn_buffer()
 (this branch is used by pw/rebase-i-internal-rfc.)
 The scripted version of "git rebase -i" wrote and rewrote the todo
 list many times during a single step of its operation, and the
 recent C-rewrite made a faithful conversion of the logic to C.  The
 implementation has been updated to carry necessary information
 around in-core to avoid rewriting the same file over and over
 unnecessarily.
 Will merge to 'next'.
 cf. <20190305191805.13561-1-alban.gruin@gmail.com> (v8)
* ps/stash-in-c (2019-03-07) 29 commits
  (merged to 'next' on 2019-03-11 at f568e3be72)
 + tests: add a special setup where stash.useBuiltin is off
 + stash: optionally use the scripted version again
 + stash: add back the original, scripted `git stash`
 + stash: convert `stash--helper.c` into `stash.c`
 + stash: replace all `write-tree` child processes with API calls
 + stash: optimize `get_untracked_files()` and `check_changes()`
 + stash: convert save to builtin
 + stash: make push -q quiet
 + stash: convert push to builtin
 + stash: convert create to builtin
 + stash: convert store to builtin
 + stash: convert show to builtin
 + stash: convert list to builtin
 + stash: convert pop to builtin
 + stash: convert branch to builtin
 + stash: convert drop and clear to builtin
 + stash: convert apply to builtin
 + stash: mention options in `show` synopsis
 + stash: add tests for `git stash show` config
 + stash: rename test cases to be more descriptive
 + t3903: add test for --intent-to-add file
 + t3903: modernize style
 + stash: improve option parsing test coverage
 + ident: don't require calling prepare_fallback_ident first
 + ident: add the ability to provide a "fallback identity"
 + strbuf.c: add `strbuf_insertf()` and `strbuf_vinsertf()`
 + strbuf.c: add `strbuf_join_argv()`
 + sha1-name.c: add `get_oidf()` which acts like `get_oid()`
 + Merge branch 'sd/stash-wo-user-name'
 (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.)
 Originally merged to 'next' on 2019-03-07
 "git stash" rewritten in C.
 Will cook in 'next'.
Duy Nguyen· Apr 4, 2019, 11:08 UTC · re: Junio C Hamano · lore

Re: What's cooking in git.git (Apr 2019, #01; Thu, 4)

On Thu, Apr 4, 2019 at 5:29 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 7 quoted lines
> * nd/precious (2019-04-01) 1 commit
>  - Introduce "precious" file concept
>
>  "git clean" learned to pay attention to the 'precious' attributes
>  and keep untracked paths with the attribute instead of removing.
>
>  Will merge to 'next'.

There was no conclusion from the last thread if I remember correctly and I kind of gave up on it. If you want to include anyway, should we go for a more specific attribute (e.g. "clean") and leave "precious" for later whenever it's better defined?

-- 
Duy
Junio C Hamano· Apr 4, 2019, 21:29 UTC · re: Duy Nguyen · lore

Re: What's cooking in git.git (Apr 2019, #01; Thu, 4)

Duy Nguyen <pclouds@gmail.com> writes:
Show 13 quoted lines
> On Thu, Apr 4, 2019 at 5:29 PM Junio C Hamano <gitster@pobox.com> wrote:
>> * nd/precious (2019-04-01) 1 commit
>>  - Introduce "precious" file concept
>>
>>  "git clean" learned to pay attention to the 'precious' attributes
>>  and keep untracked paths with the attribute instead of removing.
>>
>>  Will merge to 'next'.
>
> There was no conclusion from the last thread if I remember correctly
> and I kind of gave up on it. If you want to include anyway, should we
> go for a more specific attribute (e.g. "clean") and leave "precious"
> for later whenever it's better defined?

I'd rather pick between (1) using the final name for the concept we want to eventually achieve, i.e. "precious", and starting small, i.e. "initially, only git-clean knows about it", or (2) doing nothing. Per-command 'precious-this', 'precious-that' that would be left as interface wart for years is not a pretty sight I want to see.

Ævar Arnfjörð Bjarmason· Apr 6, 2019, 20:28 UTC · re: Junio C Hamano · lore

Re: What's cooking in git.git (Apr 2019, #01; Thu, 4)

On Thu, Apr 04 2019, Junio C Hamano wrote:
Show 22 quoted lines
> Duy Nguyen <pclouds@gmail.com> writes:
>
>> On Thu, Apr 4, 2019 at 5:29 PM Junio C Hamano <gitster@pobox.com> wrote:
>>> * nd/precious (2019-04-01) 1 commit
>>>  - Introduce "precious" file concept
>>>
>>>  "git clean" learned to pay attention to the 'precious' attributes
>>>  and keep untracked paths with the attribute instead of removing.
>>>
>>>  Will merge to 'next'.
>>
>> There was no conclusion from the last thread if I remember correctly
>> and I kind of gave up on it. If you want to include anyway, should we
>> go for a more specific attribute (e.g. "clean") and leave "precious"
>> for later whenever it's better defined?
>
> I'd rather pick between (1) using the final name for the concept we
> want to eventually achieve, i.e. "precious", and starting small,
> i.e. "initially, only git-clean knows about it", or (2) doing
> nothing.  Per-command 'precious-this', 'precious-that' that would be
> left as interface wart for years is not a pretty sight I want to
> see.

I think we shouldn't squat "precious" in general without seeing where we want to go with it, which I tried to sum up in https://public-inbox.org/git/87ftsi68ke.fsf@evledraar.gmail.com/

But aside from that larger discussion, I see no problem with having some "+clean" or "-clean" attribute with basically Duy's current patch in nd/precious with the equivalent of "s/precious/clean/". Duy suggested this in https://public-inbox.org/git/CACsJy8C377NmLv9edNYjinKAQf-P1y5+Nwhdj3vRkz_E__x43Q@mail.gmail.com/

I see the desire to keep some untracked stuff you know about as different from what amounts to a workaround for merge/checkout inadvertently stomping on your checkout and shredding your data, without (as noted in my upthread summary) us having the full picture of whether that's even needed as a permanent configurable workaround, or we could "just" fix that "bug".

But on the subject on the implementation of nd/precious (assuming s/precious/clean/) I'm concerned that this "I want to keep *.o on 'git-clean'" use-case leaves us with no way to do what you can now do with:

    git clean -dxff
Now the git-clean documentation promises:
    "Cleans [...] files that are not under version control"
And, for -x:
    "Don’t use the [repository's] ignore rules[...]This allows removing
    all untracked files, including build products"

Except now we have a feature that's ostensibly exactly for this "build products" use-case, but doesn't yield to the -x option, which we've documented as being the escape hatch for exactly that sort of thing.

In my mind "clean" has two fundamentally different use-cases. a) I made this repo and trust its .gitignore file b) I didn't make it/don't trust it and/or I just want to be guaranteed to get the exact same checkout a "git clone" would give me.

Now you can do "git clean -dxff" (and if submodules init && ...) for "b", but the "precious" patch in the current form completely breaks "b" to satisfy a use-case of "a".

I think we should at the very least have a "-xx" like "-ff" now as an escape hatch, but more conservatively shouldn't be breaking the reasonable assumption a user of "-x" could make so far, which is "ignore repo config, just wipe it all".

Junio C Hamano· Apr 8, 2019, 04:14 UTC · re: Ævar Arnfjörð Bjarmason · lore

Re: What's cooking in git.git (Apr 2019, #01; Thu, 4)

Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
Show 16 quoted lines
>> I'd rather pick between (1) using the final name for the concept we
>> want to eventually achieve, i.e. "precious", and starting small,
>> i.e. "initially, only git-clean knows about it", or (2) doing
>> nothing.  Per-command 'precious-this', 'precious-that' that would be
>> left as interface wart for years is not a pretty sight I want to
>> see.
>
> I think we shouldn't squat "precious" in general without seeing where we
> want to go with it, which I tried to sum up in
> https://public-inbox.org/git/87ftsi68ke.fsf@evledraar.gmail.com/
>
> But aside from that larger discussion, I see no problem with having some
> "+clean" or "-clean" attribute with basically Duy's current patch in
> nd/precious with the equivalent of "s/precious/clean/". Duy suggested
> this in
> https://public-inbox.org/git/CACsJy8C377NmLv9edNYjinKAQf-P1y5+Nwhdj3vRkz_E__x43Q@mail.gmail.com/

I know. I've already said that we do not want proliferation of precious-clean precious-merge precious-yet-another-thing.

> ... shouldn't be breaking the reasonable assumption a user of "-x"
> could make so far, which is "ignore repo config, just wipe it
> all".

Yup. I think that is reasonable. To paraphrase (so that you can tell me that I misunderstood you, if that is the case), if we are told to honor only what the index knows, deliberately ignoring the .gitignore file, then we should also ignore .gitattributes that says which ones are ignored-but-precious, as the "precious" attribute is a mere implementation detail of what _could_ have been part of the exclude mechanism (aka ".gitignore") from day one, if we designed the exclude mechanism to support "ignored and expendable" and "ignored and precious" from day one. "clean -x" would certainly have ignored both kinds.

Nguyễn Thái Ngọc Duy· Apr 9, 2019, 10:26 UTC · re: Junio C Hamano · lore

[PATCH] Introduce "precious" file concept

A new attribute "precious" is added to indicate that certain files have valuable content and should not be easily discarded even if they are ignored or untracked.

So far there are one part of Git that are made aware of precious files: "git clean" will leave precious files alone if --keep-precious is specified.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
 Here's the replacement patch that keeps "git clean" behavior the same
 as before and only checks 'precious' attribute when --keep-precous is
 specified.
 Documentation/git-clean.txt     |  6 ++++-
 Documentation/gitattributes.txt | 11 +++++++++
 attr.c                          | 12 ++++++++++
 attr.h                          |  2 ++
 builtin/clean.c                 | 30 +++++++++++++++++++++----
 t/t7300-clean.sh                | 40 +++++++++++++++++++++++++++++++++
 6 files changed, 96 insertions(+), 5 deletions(-)
diff --git a/Documentation/git-clean.txt b/Documentation/git-clean.txt
index 03056dad0d..7f8c157c90 100644
--- a/Documentation/git-clean.txt
+++ b/Documentation/git-clean.txt
@@ -8,7 +8,7 @@ git-clean - Remove untracked files from the working tree
 SYNOPSIS
 --------
 [verse]
-'git clean' [-d] [-f] [-i] [-n] [-q] [-e <pattern>] [-x | -X] [--] <path>...
+'git clean' [<options>] [-d] [-f] [-i] [-n] [-x | -X] [--] <path>...
 
 DESCRIPTION
 -----------
@@ -71,6 +71,10 @@ OPTIONS
 	Remove only files ignored by Git.  This may be useful to rebuild
 	everything from scratch, but keep manually created files.
 
+--keep-precious::
+	Do not remove untracked or ignored files if they have
+	`precious` attribute.
+
 Interactive mode
 ----------------
 When the command enters the interactive mode, it shows the
diff --git a/Documentation/gitattributes.txt b/Documentation/gitattributes.txt
index bdd11a2ddd..ea3c07db79 100644
--- a/Documentation/gitattributes.txt
+++ b/Documentation/gitattributes.txt
@@ -1192,6 +1192,17 @@ If this attribute is not set or has an invalid value, the value of the
 (See linkgit:git-config[1]).
 
 
+Precious files
+~~~~~~~~~~~~~~
+
+`precious`
+^^^^^^^^^^
+
+This attribute is set on files to indicate that their content is
+valuable. Some commands will behave slightly different on precious
+files. linkgit:git-clean[1] may leave precious files alone.
+
+
 USING MACRO ATTRIBUTES
 ----------------------
 
diff --git a/attr.c b/attr.c
index 93dc16b59c..dc6490510c 100644
--- a/attr.c
+++ b/attr.c
@@ -1157,3 +1157,15 @@ void attr_start(void)
 	pthread_mutex_init(&g_attr_hashmap.mutex, NULL);
 	pthread_mutex_init(&check_vector.mutex, NULL);
 }
+
+int is_precious_file(struct index_state *istate, const char *path)
+{
+	static struct attr_check *check;
+	if (!check)
+		check = attr_check_initl("precious", NULL);
+	if (!check)
+		return 0;
+
+	git_check_attr(istate, path, check);
+	return ATTR_TRUE(check->items[0].value);
+}
diff --git a/attr.h b/attr.h
index b0378bfe5f..b9a9751a66 100644
--- a/attr.h
+++ b/attr.h
@@ -82,4 +82,6 @@ void git_attr_set_direction(enum git_attr_direction new_direction);
 
 void attr_start(void);
 
+int is_precious_file(struct index_state *istate, const char *path);
+
 #endif /* ATTR_H */
diff --git a/builtin/clean.c b/builtin/clean.c
index aaba4af3c2..d2836393c5 100644
--- a/builtin/clean.c
+++ b/builtin/clean.c
@@ -18,19 +18,23 @@
 #include "color.h"
 #include "pathspec.h"
 #include "help.h"
+#include "attr.h"
 
 static int force = -1; /* unset */
 static int interactive;
+static int keep_precious;
 static struct string_list del_list = STRING_LIST_INIT_DUP;
 static unsigned int colopts;
 
 static const char *const builtin_clean_usage[] = {
-	N_("git clean [-d] [-f] [-i] [-n] [-q] [-e <pattern>] [-x | -X] [--] <paths>..."),
+	N_("git clean [<options>] [-d] [-f] [-i] [-n] [-x | -X] [--] <paths>..."),
 	NULL
 };
 
 static const char *msg_remove = N_("Removing %s\n");
 static const char *msg_would_remove = N_("Would remove %s\n");
+static const char *msg_skip_precious = N_("Skipping precious file %s\n");
+static const char *msg_would_skip_precious = N_("Would skip precious file %s\n");
 static const char *msg_skip_git_dir = N_("Skipping repository %s\n");
 static const char *msg_would_skip_git_dir = N_("Would skip repository %s\n");
 static const char *msg_warn_remove_failed = N_("failed to remove %s");
@@ -146,6 +150,11 @@ static int exclude_cb(const struct option *opt, const char *arg, int unset)
 	return 0;
 }
 
+static int skip_precious_file(struct index_state *istate, const char *path)
+{
+	return keep_precious && is_precious_file(istate, path);
+}
+
 static int remove_dirs(struct strbuf *path, const char *prefix, int force_flag,
 		int dry_run, int quiet, int *dir_gone)
 {
@@ -154,6 +163,7 @@ static int remove_dirs(struct strbuf *path, const char *prefix, int force_flag,
 	struct dirent *e;
 	int res = 0, ret = 0, gone = 1, original_len = path->len, len;
 	struct string_list dels = STRING_LIST_INIT_DUP;
+	const char *rel_path;
 
 	*dir_gone = 1;
 
@@ -193,9 +203,16 @@ static int remove_dirs(struct strbuf *path, const char *prefix, int force_flag,
 
 		strbuf_setlen(path, len);
 		strbuf_addstr(path, e->d_name);
-		if (lstat(path->buf, &st))
+		if (lstat(path->buf, &st)) {
 			; /* fall thru */
-		else if (S_ISDIR(st.st_mode)) {
+		} else if ((!prefix && skip_precious_file(&the_index, path->buf)) ||
+			   (prefix && skip_prefix(path->buf, prefix, &rel_path) &&
+			    skip_precious_file(&the_index, rel_path))) {
+			quote_path_relative(path->buf, prefix, &quoted);
+			printf(dry_run ? _(msg_would_skip_precious) : _(msg_skip_precious), quoted.buf);
+			*dir_gone = 0;
+			continue;
+		} else if (S_ISDIR(st.st_mode)) {
 			if (remove_dirs(path, prefix, force_flag, dry_run, quiet, &gone))
 				ret = 1;
 			if (gone) {
@@ -915,6 +932,8 @@ int cmd_clean(int argc, const char **argv, const char *prefix)
 		OPT_BOOL('x', NULL, &ignored, N_("remove ignored files, too")),
 		OPT_BOOL('X', NULL, &ignored_only,
 				N_("remove only ignored files")),
+		OPT_BOOL(0, "keep-precious", &keep_precious,
+			 N_("do not remove files with 'precious' attribute")),
 		OPT_END()
 	};
 
@@ -1019,7 +1038,10 @@ int cmd_clean(int argc, const char **argv, const char *prefix)
 		if (lstat(abs_path.buf, &st))
 			continue;
 
-		if (S_ISDIR(st.st_mode)) {
+		if (skip_precious_file(&the_index, item->string)) {
+			qname = quote_path_relative(item->string, NULL, &buf);
+			printf(dry_run ? _(msg_would_skip_precious) : _(msg_skip_precious), qname);
+		} else if (S_ISDIR(st.st_mode)) {
 			if (remove_dirs(&abs_path, prefix, rm_flags, dry_run, quiet, &gone))
 				errors++;
 			if (gone && !quiet) {
diff --git a/t/t7300-clean.sh b/t/t7300-clean.sh
index 7b36954d63..ae600dafb5 100755
--- a/t/t7300-clean.sh
+++ b/t/t7300-clean.sh
@@ -669,4 +669,44 @@ test_expect_success 'git clean -d skips untracked dirs containing ignored files'
 	test_path_is_missing foo/b/bb
 '
 
+test_expect_success 'git clean -xd --keep-precious leaves precious files alone' '
+	git init precious &&
+	(
+		cd precious &&
+		test_commit one &&
+		cat >.gitignore <<-\EOF &&
+		*.o
+		*.mak
+		EOF
+		cat >.gitattributes <<-\EOF &&
+		*.mak precious
+		.gitattributes precious
+		*.precious precious
+		EOF
+		mkdir sub &&
+		touch one.o sub/two.o one.mak sub/two.mak &&
+		touch one.untracked two.precious sub/also.precious &&
+		git clean -fdx --keep-precious &&
+		test_path_is_missing one.o &&
+		test_path_is_missing sub/two.o &&
+		test_path_is_missing one.untracked &&
+		test_path_is_file .gitattributes &&
+		test_path_is_file one.mak &&
+		test_path_is_file sub/two.mak &&
+		test_path_is_file two.precious &&
+		test_path_is_file sub/also.precious
+	)
+'
+
+test_expect_success 'git clean -xd still deletes them all' '
+	test_path_is_file precious/one.mak &&
+	test_path_is_file precious/sub/two.mak &&
+	test_path_is_file precious/two.precious &&
+	test_path_is_file precious/sub/also.precious &&
+	git -C precious clean -fdx &&
+	test_path_is_missing precious/one.mak &&
+	test_path_is_missing precious/sub/two.mak &&
+	test_path_is_missing precious/two.precious &&
+	test_path_is_missing precious/sub/also.precious
+'
 test_done
-- 
2.21.0.479.g47ac719cd3
Junio C Hamano· Apr 9, 2019, 11:31 UTC · re: Nguyễn Thái Ngọc Duy · lore

Re: [PATCH] Introduce "precious" file concept

Nguyễn Thái Ngọc Duy  <pclouds@gmail.com> writes:
Show 5 quoted lines
> A new attribute "precious" is added to indicate that certain files
> have valuable content and should not be easily discarded even if they
> are ignored or untracked.
>
> So far there are one part of Git that are made aware of precious files:
s/are/is/g
Show 8 quoted lines
> "git clean" will leave precious files alone if --keep-precious is
> specified.
>
> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
> ---
>  Here's the replacement patch that keeps "git clean" behavior the same
>  as before and only checks 'precious' attribute when --keep-precous is
>  specified.

OK. So this is even gentler introduction, which we could turn into the default once more commands start honoring the attribute and wider adoption proves that it is a good feature, while allowing us a room to back out by keeping it an optional feature and eventually deprecate and remove if the experiment did not pan out.

> +--keep-precious::
> +	Do not remove untracked or ignored files if they have
> +	`precious` attribute.
Show 9 quoted lines
> +Precious files
> +~~~~~~~~~~~~~~
> +
> +`precious`
> +^^^^^^^^^^
> +
> +This attribute is set on files to indicate that their content is
> +valuable. Some commands will behave slightly different on precious
> +files. linkgit:git-clean[1] may leave precious files alone.

When the second thing that cares about the attribute comes along, the mention of 'git clean' here will become the first item in a bullet list, while the second and subsequent ones are listed next to it. It may not be bad to start that enumerated list of count 1 from the get-go, but for now this will do.

Show 15 quoted lines
> @@ -193,9 +203,16 @@ static int remove_dirs(struct strbuf *path, const char *prefix, int force_flag,
>  
>  		strbuf_setlen(path, len);
>  		strbuf_addstr(path, e->d_name);
> -		if (lstat(path->buf, &st))
> +		if (lstat(path->buf, &st)) {
>  			; /* fall thru */
> -		else if (S_ISDIR(st.st_mode)) {
> +		} else if ((!prefix && skip_precious_file(&the_index, path->buf)) ||
> +			   (prefix && skip_prefix(path->buf, prefix, &rel_path) &&
> +			    skip_precious_file(&the_index, rel_path))) {
> +			quote_path_relative(path->buf, prefix, &quoted);
> +			printf(dry_run ? _(msg_would_skip_precious) : _(msg_skip_precious), quoted.buf);
> +			*dir_gone = 0;
> +			continue;

An attribute is given to something that can be tracked, and a directory would not get an attribute, because Git does not track directories (there is a reason why skip_precious_file() takes &the_index that is passed down the callchain to git_check_attr()).

Triggering this logic before excluding S_ISDIR(st.st_mode) feels iffy.

But let's assume that being able to say "this directory and anything (recursively) inside are precious" is a good idea and read on.

Show 12 quoted lines
> +		} else if (S_ISDIR(st.st_mode)) {
>  			if (remove_dirs(path, prefix, force_flag, dry_run, quiet, &gone))
>  				ret = 1;
>  			if (gone) {
> @@ -915,6 +932,8 @@ int cmd_clean(int argc, const char **argv, const char *prefix)
>  		OPT_BOOL('x', NULL, &ignored, N_("remove ignored files, too")),
>  		OPT_BOOL('X', NULL, &ignored_only,
>  				N_("remove only ignored files")),
> +		OPT_BOOL(0, "keep-precious", &keep_precious,
> +			 N_("do not remove files with 'precious' attribute")),
>  		OPT_END()
>  	};
OK.
Show 10 quoted lines
> @@ -1019,7 +1038,10 @@ int cmd_clean(int argc, const char **argv, const char *prefix)
>  		if (lstat(abs_path.buf, &st))
>  			continue;
>  
> -		if (S_ISDIR(st.st_mode)) {
> +		if (skip_precious_file(&the_index, item->string)) {
> +			qname = quote_path_relative(item->string, NULL, &buf);
> +			printf(dry_run ? _(msg_would_skip_precious) : _(msg_skip_precious), qname);
> +		} else if (S_ISDIR(st.st_mode)) {
>  			if (remove_dirs(&abs_path, prefix, rm_flags, dry_run, quiet, &gone))
Likewise.
Show 21 quoted lines
> diff --git a/t/t7300-clean.sh b/t/t7300-clean.sh
> index 7b36954d63..ae600dafb5 100755
> --- a/t/t7300-clean.sh
> +++ b/t/t7300-clean.sh
> @@ -669,4 +669,44 @@ test_expect_success 'git clean -d skips untracked dirs containing ignored files'
>  	test_path_is_missing foo/b/bb
>  '
>  
> +test_expect_success 'git clean -xd --keep-precious leaves precious files alone' '
> +	git init precious &&
> +	(
> +		cd precious &&
> +		test_commit one &&
> +		cat >.gitignore <<-\EOF &&
> +		*.o
> +		*.mak
> +		EOF
> +		cat >.gitattributes <<-\EOF &&
> +		*.mak precious
> +		.gitattributes precious
> +		*.precious precious

If the checking with skip_precious() before S_ISDIR() was intentional (I cannot quite tell if it is), then this should also have a pattern that matches a directory and mark it as precious.

On the other hand, if it was merely a thinko and the change does not intend to allow attaching attributes to directories, then this test is probably OK as-is. We also _could_ have a pattern that matches a directory and attempt to make it precious and then make sure the directory goes away (i.e. any attribute, including 'precious', on the directory was meaningless).

Show 15 quoted lines
> +		EOF
> +		mkdir sub &&
> +		touch one.o sub/two.o one.mak sub/two.mak &&
> +		touch one.untracked two.precious sub/also.precious &&
> +		git clean -fdx --keep-precious &&
> +		test_path_is_missing one.o &&
> +		test_path_is_missing sub/two.o &&
> +		test_path_is_missing one.untracked &&
> +		test_path_is_file .gitattributes &&
> +		test_path_is_file one.mak &&
> +		test_path_is_file sub/two.mak &&
> +		test_path_is_file two.precious &&
> +		test_path_is_file sub/also.precious
> +	)
> +'
> +test_expect_success 'git clean -xd still deletes them all' '

OK, so this is exactly the same command as above, but without the "--keep-precious" option. It is good to test both positive and negative.

Show 10 quoted lines
> +	test_path_is_file precious/one.mak &&
> +	test_path_is_file precious/sub/two.mak &&
> +	test_path_is_file precious/two.precious &&
> +	test_path_is_file precious/sub/also.precious &&
> +	git -C precious clean -fdx &&
> +	test_path_is_missing precious/one.mak &&
> +	test_path_is_missing precious/sub/two.mak &&
> +	test_path_is_missing precious/two.precious &&
> +	test_path_is_missing precious/sub/also.precious
> +'
Duy Nguyen· Apr 10, 2019, 09:36 UTC · re: Junio C Hamano · lore

Re: [PATCH] Introduce "precious" file concept

On Tue, Apr 9, 2019 at 6:31 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 26 quoted lines
> > @@ -193,9 +203,16 @@ static int remove_dirs(struct strbuf *path, const char *prefix, int force_flag,
> >
> >               strbuf_setlen(path, len);
> >               strbuf_addstr(path, e->d_name);
> > -             if (lstat(path->buf, &st))
> > +             if (lstat(path->buf, &st)) {
> >                       ; /* fall thru */
> > -             else if (S_ISDIR(st.st_mode)) {
> > +             } else if ((!prefix && skip_precious_file(&the_index, path->buf)) ||
> > +                        (prefix && skip_prefix(path->buf, prefix, &rel_path) &&
> > +                         skip_precious_file(&the_index, rel_path))) {
> > +                     quote_path_relative(path->buf, prefix, &quoted);
> > +                     printf(dry_run ? _(msg_would_skip_precious) : _(msg_skip_precious), quoted.buf);
> > +                     *dir_gone = 0;
> > +                     continue;
>
> An attribute is given to something that can be tracked, and a
> directory would not get an attribute, because Git does not track
> directories (there is a reason why skip_precious_file() takes
> &the_index that is passed down the callchain to git_check_attr()).
>
> Triggering this logic before excluding S_ISDIR(st.st_mode) feels
> iffy.
>
> But let's assume that being able to say "this directory and anything
> (recursively) inside are precious" is a good idea and read on.

Hm... we do allow to set attributes on directories even though we don't track them. I was under the impression that an attribute set on a directory will be propagated to all files inside anyway, so this is more of an (mis?-)optimization.

But gitattributes.txt explicitly says that it's wrong. One would need to do "path/** precious" to achieve the same thing.

So yeah maybe doing this before S_ISDIR() is wrong. The definition of `precious` also only says "... is set on _files_". Maybe best to ignore attributes on directories? At least it looks like that's how all other attributes do.

-- 
Duy
Junio C Hamano· Apr 12, 2019, 01:28 UTC · re: Duy Nguyen · lore

Re: [PATCH] Introduce "precious" file concept

Duy Nguyen <pclouds@gmail.com> writes:
Show 7 quoted lines
> But gitattributes.txt explicitly says that it's wrong. One would need
> to do "path/** precious" to achieve the same thing.
>
> So yeah maybe doing this before S_ISDIR() is wrong. The definition of
> `precious` also only says "... is set on _files_". Maybe best to
> ignore attributes on directories? At least it looks like that's how
> all other attributes do.

I could be persuaded in the other direction if there are widespread uses (or misuses---but once it gets widespread in the wild and turns out to be useful, it ceases to be misuses and becomes a feature) of giving an attribute to a directory that affects the treatment of that directory *itself*, but if there is none, I'd prefer to keep the attribute "what's tracked only".

Whether it is a good idea to give an attribute to a directory to affect the treatement of the directory *itself* (eh, rather, especially if it were a good idea), I'd consider it a misuse as a short-hand for giving all paths within it the same attribute, given "path/**" is available, as that would make it impossible to say "I'd want to affect this directory, but not any of the directories or files in it".

And if that is not clear in the current documentation set that faces our developers, perhaps we should make it so.

Thanks.
Eric Sunshine· Apr 9, 2019, 17:44 UTC · re: Nguyễn Thái Ngọc Duy · lore

Re: [PATCH] Introduce "precious" file concept

On Tue, Apr 9, 2019 at 6:27 AM Nguyễn Thái Ngọc Duy <pclouds@gmail.com> wrote:
Show 12 quoted lines
> A new attribute "precious" is added to indicate that certain files
> have valuable content and should not be easily discarded even if they
> are ignored or untracked.
> [...]
> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
> ---
> diff --git a/t/t7300-clean.sh b/t/t7300-clean.sh
> @@ -669,4 +669,44 @@ test_expect_success 'git clean -d skips untracked dirs containing ignored files'
> +test_expect_success 'git clean -xd still deletes them all' '
> +       [...]
> +'
>  test_done
Nit: The blank line before 'test_done' got lost.
Ævar Arnfjörð Bjarmason· Apr 12, 2019, 21:54 UTC · re: Nguyễn Thái Ngọc Duy · lore

Re: [PATCH] Introduce "precious" file concept

On Tue, Apr 09 2019, Nguyễn Thái Ngọc Duy wrote:
>  Here's the replacement patch that keeps "git clean" behavior the same
>  as before and only checks 'precious' attribute when --keep-precous is
>  specified.
Cool to have the expected interaction with -x. Thanks.
> -'git clean' [-d] [-f] [-i] [-n] [-q] [-e <pattern>] [-x | -X] [--] <path>...
> +'git clean' [<options>] [-d] [-f] [-i] [-n] [-x | -X] [--] <path>...
For e.g. git-status(1) we just say:
    git status [<options>...] [--] [<pathspec>...]
And for git-add(1) we do:
     git add [--verbose | -v] <very long exhaustive list of options
                              spanning 4 lines omitted>

Seems we should do one or the other here, i.e. either just add --keep-precious to the list, or leave it at just:

    git clean [<options>...] [--] [<pathspec>...]
> +This attribute is set on files to indicate that their content is
> +valuable. Some commands will behave slightly different on precious
> +files. linkgit:git-clean[1] may leave precious files alone.

As noted upthread I think it's better to start with "clean" and "--keep-noclean", we can always alias it to "precious" later without squatting on that more general term when we (IMO) don't have the full picture yet & know if we even want that...

But anyway, with that out of the way and assuming this is kept-as is seems we could document this better if we're going to keep "precious", e.g. maybe:

    This attribute is set on files to indicate that they're important
    while not being tracked. This attribute is experimental and subject
    to future change as more commands are changed to support it.
    Now it's only supported by linkgit:git-clean[1] which'll skip
    cleaning files marked ith `precious` when given the
    `--keep-precious` option. This can be useful in combination with
    linkgit:gitignore[5] to e.g. mark `*.o` build assets as both ignored
    and precious.

I.e. say it's still early days, that it's "experimental" (not insisting on that phrasing, but somehow signaling to users that if they set this now it may do new/unexpected things in the future), and briefly describe how it works with "clean" and what the main intended use-case is.

Show 28 quoted lines
> +test_expect_success 'git clean -xd --keep-precious leaves precious files alone' '
> +	git init precious &&
> +	(
> +		cd precious &&
> +		test_commit one &&
> +		cat >.gitignore <<-\EOF &&
> +		*.o
> +		*.mak
> +		EOF
> +		cat >.gitattributes <<-\EOF &&
> +		*.mak precious
> +		.gitattributes precious
> +		*.precious precious
> +		EOF
> +		mkdir sub &&
> +		touch one.o sub/two.o one.mak sub/two.mak &&
> +		touch one.untracked two.precious sub/also.precious &&
> +		git clean -fdx --keep-precious &&
> +		test_path_is_missing one.o &&
> +		test_path_is_missing sub/two.o &&
> +		test_path_is_missing one.untracked &&
> +		test_path_is_file .gitattributes &&
> +		test_path_is_file one.mak &&
> +		test_path_is_file sub/two.mak &&
> +		test_path_is_file two.precious &&
> +		test_path_is_file sub/also.precious
> +	)
> +'

AFAICT this is the first attribute intended purely to be set on files that aren't tracked. I wonder if we should test for setting it on files that are tracked, and whether we should e.g. warn about that? Maybe not, but just raising it since I don't think it was discussed already...

Duy Nguyen· Apr 13, 2019, 10:19 UTC · re: Ævar Arnfjörð Bjarmason · lore

Re: [PATCH] Introduce "precious" file concept

I've had enough. Please drop this nd/precious. I'm not updating it anymore.

On Sat, Apr 13, 2019 at 4:54 AM Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:

Show 89 quoted lines
>
>
> On Tue, Apr 09 2019, Nguyễn Thái Ngọc Duy wrote:
>
> >  Here's the replacement patch that keeps "git clean" behavior the same
> >  as before and only checks 'precious' attribute when --keep-precous is
> >  specified.
>
> Cool to have the expected interaction with -x. Thanks.
>
> > -'git clean' [-d] [-f] [-i] [-n] [-q] [-e <pattern>] [-x | -X] [--] <path>...
> > +'git clean' [<options>] [-d] [-f] [-i] [-n] [-x | -X] [--] <path>...
>
> For e.g. git-status(1) we just say:
>
>     git status [<options>...] [--] [<pathspec>...]
>
> And for git-add(1) we do:
>
>      git add [--verbose | -v] <very long exhaustive list of options
>                               spanning 4 lines omitted>
>
>
> Seems we should do one or the other here, i.e. either just add
> --keep-precious to the list, or leave it at just:
>
>     git clean [<options>...] [--] [<pathspec>...]
>
> > +This attribute is set on files to indicate that their content is
> > +valuable. Some commands will behave slightly different on precious
> > +files. linkgit:git-clean[1] may leave precious files alone.
>
> As noted upthread I think it's better to start with "clean" and
> "--keep-noclean", we can always alias it to "precious" later without
> squatting on that more general term when we (IMO) don't have the full
> picture yet & know if we even want that...
>
> But anyway, with that out of the way and assuming this is kept-as is
> seems we could document this better if we're going to keep "precious",
> e.g. maybe:
>
>     This attribute is set on files to indicate that they're important
>     while not being tracked. This attribute is experimental and subject
>     to future change as more commands are changed to support it.
>
>     Now it's only supported by linkgit:git-clean[1] which'll skip
>     cleaning files marked ith `precious` when given the
>     `--keep-precious` option. This can be useful in combination with
>     linkgit:gitignore[5] to e.g. mark `*.o` build assets as both ignored
>     and precious.
>
> I.e. say it's still early days, that it's "experimental" (not insisting
> on that phrasing, but somehow signaling to users that if they set this
> now it may do new/unexpected things in the future), and briefly describe
> how it works with "clean" and what the main intended use-case is.
>
> > +test_expect_success 'git clean -xd --keep-precious leaves precious files alone' '
> > +     git init precious &&
> > +     (
> > +             cd precious &&
> > +             test_commit one &&
> > +             cat >.gitignore <<-\EOF &&
> > +             *.o
> > +             *.mak
> > +             EOF
> > +             cat >.gitattributes <<-\EOF &&
> > +             *.mak precious
> > +             .gitattributes precious
> > +             *.precious precious
> > +             EOF
> > +             mkdir sub &&
> > +             touch one.o sub/two.o one.mak sub/two.mak &&
> > +             touch one.untracked two.precious sub/also.precious &&
> > +             git clean -fdx --keep-precious &&
> > +             test_path_is_missing one.o &&
> > +             test_path_is_missing sub/two.o &&
> > +             test_path_is_missing one.untracked &&
> > +             test_path_is_file .gitattributes &&
> > +             test_path_is_file one.mak &&
> > +             test_path_is_file sub/two.mak &&
> > +             test_path_is_file two.precious &&
> > +             test_path_is_file sub/also.precious
> > +     )
> > +'
>
> AFAICT this is the first attribute intended purely to be set on files
> that aren't tracked. I wonder if we should test for setting it on files
> that are tracked, and whether we should e.g. warn about that? Maybe not,
> but just raising it since I don't think it was discussed already...
-- 
Duy
Todd Zullinger· Apr 5, 2019, 01:05 UTC · re: Junio C Hamano · lore

Re: What's cooking in git.git (Apr 2019, #01; Thu, 4)

Hi Junio,
Junio C Hamano wrote:
Show 12 quoted lines
> * sg/asciidoctor-in-ci (2019-04-01) 6 commits
>  - ci: fix AsciiDoc/Asciidoctor stderr check in the documentation build job
>  - ci: stick with Asciidoctor v1.5.8 for now
>  - ci: install Asciidoctor in 'ci/install-dependencies.sh'
>  - Documentation/technical/protocol-v2.txt: fix formatting
>  - Documentation/technical/api-config.txt: fix formatting
>  - Documentation/git-diff-tree.txt: fix formatting
> 
>  Update our support to format documentation in the CI environment,
>  either with AsciiDoc ro Asciidoctor.
> 
>  Will merge to 'next'.

Martin mentioned this in reply to the patch thread¹ but it looks like it slipped by unnoticed. There's some extraneous comments in 28216d13f4 ("ci: stick with Asciidoctor v1.5.8 for now", 2019-03-29) which would be good to trim before this hits next.

    commit 28216d13f43b07e41bdd83b786ae31c00c657e06
    Author: SZEDER Gábor <szeder.dev@gmail.com>
    Date:   Fri Mar 29 20:52:46 2019 +0100
        ci: stick with Asciidoctor v1.5.8 for now
        
        On Fri, Mar 29, 2019 at 01:35:19PM +0100, SZEDER Gábor wrote:
        > The release of Asciidoctor v2.0.0 two days ago broke our documentation
        
        Well, what happened "two days ago" when I sent v2 is now seven days
        ago...  Let's just say "recent" instead.
        
          --- >8 ---
        
        Subject: ci: stick with Asciidoctor v1.5.8 for now
        
        The recent release of Asciidoctor v2.0.0 broke our documentation
        ...
¹ <CAN0heSrQrVQ+t3ZH1igU8zZLjjyhzZshFgarLcZOumWMBRN2Tg@mail.gmail.com>
Thanks,
-- 
Todd
Junio C Hamano· Apr 5, 2019, 05:41 UTC · re: Todd Zullinger · lore

Re: What's cooking in git.git (Apr 2019, #01; Thu, 4)

Todd Zullinger <tmz@pobox.com> writes:
Show 5 quoted lines
> Martin mentioned this in reply to the patch thread¹ but it
> looks like it slipped by unnoticed.  There's some extraneous
> comments in 28216d13f4 ("ci: stick with Asciidoctor v1.5.8
> for now", 2019-03-29) which would be good to trim before
> this hits next.
Thanks.
Ævar Arnfjörð Bjarmason· Apr 6, 2019, 19:28 UTC · re: Junio C Hamano · lore

Re: What's cooking in git.git (Apr 2019, #01; Thu, 4)

On Thu, Apr 04 2019, Junio C Hamano wrote:
Just comments on ab/* stuff:
Show 12 quoted lines
> * ab/gc-reflog (2019-04-01) 7 commits
>  - gc: handle & check gc.reflogExpire config
>  - reflog tests: assert lack of early exit with expiry="never"
>  - reflog tests: test for the "points nowhere" warning
>  - reflog tests: make use of "test_config" idiom
>  - gc: refactor a "call me once" pattern
>  - gc: convert to using the_hash_algo
>  - gc: remove redundant check for gc_auto_threshold
>
>  Fix various glitches in "git gc" around reflog handling.
>
>  cf. <20190328161434.19200-1-avarab@gmail.com> (v4)

Missing a "will..." note for this one, the "cf" is just the cover letter for v4. AFAICT it should be ready to merge down from "pu".

Show 13 quoted lines
> * ab/gc-docs (2019-04-01) 12 commits
>  - SQAUSH??? fixup! gc docs: include the "gc.*" section from "config" in "gc"
>  - gc docs: remove incorrect reference to gc.auto=0
>  - gc docs: clarify that "gc" doesn't throw away referenced objects
>  - gc docs: note "gc --aggressive" in "fast-import"
>  - gc docs: downplay the usefulness of --aggressive
>  - gc docs: note how --aggressive impacts --window & --depth
>  - gc docs: fix formatting for "gc.writeCommitGraph"
>  - gc docs: re-flow the "gc.*" section in "config"
>  - gc docs: include the "gc.*" section from "config" in "gc"
>  - gc docs: clean grammar for "gc.bigPackThreshold"
>  - gc docs: stop noting "repack" flags
>  - gc docs: modernize the advice for manually running "gc"
That squash makes sense. Will submit another version with it integrated.
Junio C Hamano· Apr 8, 2019, 04:18 UTC · re: Ævar Arnfjörð Bjarmason · lore

Re: What's cooking in git.git (Apr 2019, #01; Thu, 4)

Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
Show 19 quoted lines
> On Thu, Apr 04 2019, Junio C Hamano wrote:
>
> Just comments on ab/* stuff:
>
>> * ab/gc-reflog (2019-04-01) 7 commits
>>  - gc: handle & check gc.reflogExpire config
>>  - reflog tests: assert lack of early exit with expiry="never"
>>  - reflog tests: test for the "points nowhere" warning
>>  - reflog tests: make use of "test_config" idiom
>>  - gc: refactor a "call me once" pattern
>>  - gc: convert to using the_hash_algo
>>  - gc: remove redundant check for gc_auto_threshold
>>
>>  Fix various glitches in "git gc" around reflog handling.
>>
>>  cf. <20190328161434.19200-1-avarab@gmail.com> (v4)
>
> Missing a "will..." note for this one, the "cf" is just the cover letter
> for v4. AFAICT it should be ready to merge down from "pu".

The former is because I haven't decided and more importantly I haven't seen enough input on the list to make a decision.

The latter is quite normal. cf. is literally "here is one of the things I can look at as a starting point to remind me what this topic was about and what its current state is", a note left for me. It often is "don't forget that somebody raised an issue and I should not merge to to 'next' yet" but it is not limited to objections.

As I haven't seen enough input on the topic, and I have quite a backlog after being offline for a wee, pointing at a cover to make sure I can quickly find out which iteration I happen to have was/is a logical thing to do.

Show 15 quoted lines
>> * ab/gc-docs (2019-04-01) 12 commits
>>  - SQAUSH??? fixup! gc docs: include the "gc.*" section from "config" in "gc"
>>  - gc docs: remove incorrect reference to gc.auto=0
>>  - gc docs: clarify that "gc" doesn't throw away referenced objects
>>  - gc docs: note "gc --aggressive" in "fast-import"
>>  - gc docs: downplay the usefulness of --aggressive
>>  - gc docs: note how --aggressive impacts --window & --depth
>>  - gc docs: fix formatting for "gc.writeCommitGraph"
>>  - gc docs: re-flow the "gc.*" section in "config"
>>  - gc docs: include the "gc.*" section from "config" in "gc"
>>  - gc docs: clean grammar for "gc.bigPackThreshold"
>>  - gc docs: stop noting "repack" flags
>>  - gc docs: modernize the advice for manually running "gc"
>
> That squash makes sense. Will submit another version with it integrated.

OK, then I won't squash it myself, but instead queue the updated patches.

Thanks.
Ævar Arnfjörð Bjarmason· Apr 6, 2019, 19:57 UTC · re: Junio C Hamano · lore

Re: What's cooking in git.git (Apr 2019, #01; Thu, 4)

On Thu, Apr 04 2019, Junio C Hamano wrote:
Show 12 quoted lines
> * dl/rebase-i-keep-base (2019-04-03) 4 commits
>  - rebase: teach rebase --keep-base
>  - rebase: fast-forward --onto in more cases
>  - t3432: test rebase fast-forward behavior
>  - t3431: add rebase --fork-point tests
>
>  "git rebase --keep-base <upstream>" tries to find the original base
>  of the topic being rebased and rebase on top of that same base, which
>  is useful when running the "git rebase -i" (and its limited variant
>  "git rebase -x").
>
>  Will merge to 'next'.

Still a bit unclear on whether parts of this are intended or just emergent behavior, as noted in https://public-inbox.org/git/87ftquapfy.fsf@evledraar.gmail.com/

Show 15 quoted lines
> * jh/trace2-sid-fix (2019-04-01) 7 commits
>  - trace2: make SIDs more unique
>  - trace2: clarify UTC datetime formatting
>  - trace2: report peak memory usage of the process
>  - trace2: use system config for default trace2 settings
>  - trace2: find exec-dir before trace2 initialization
>  - trace2: add absolute elapsed time to start event
>  - trace2: refactor setting process starting time
>
>  Polishing of the new trace2 facility continues.  The system-level
>  configuration can specify site-wide trace2 settings (which would be
>  loved by big-brother types ;-).
>
>  Getting closer but still being discussed.
>  cf. <20190403000032.GA190454@google.com>
FWIW also the discussion as of https://public-inbox.org/git/87lg0x9voz.fsf@evledraar.gmail.com/
Show 7 quoted lines
> * js/trace2-to-directory (2019-03-22) 1 commit
>  - trace2: write to directory targets
>
>  The trace2 tracing facility learned to auto-generate a filename
>  when told to log to a directory.
>
>  Will merge to 'next'.

I had the feedback of effectively "why retry if we can just make the SID unique enough" in https://public-inbox.org/git/874l7rcqk9.fsf@evledraar.gmail.com/ on March 25th.

You seemed to think so, but after Jeff Hostetler made the SID more unique (AFAICT "actually unique" in practice) in the parallel in-flight jh/trace2-sid-fix (https://public-inbox.org/git/4352952677a11776a18ec9b6862cf358307cfafd.1553879063.git.gitgitgadget@gmail.com/)

I think it's fine to merge js/trace2-to-directory down as it is, but do you/Josh think that retry logic needs to stay with that sort of SID?

Junio C Hamano· Apr 8, 2019, 04:28 UTC · re: Ævar Arnfjörð Bjarmason · lore

Re: What's cooking in git.git (Apr 2019, #01; Thu, 4)

Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
Show 6 quoted lines
> unique (AFAICT "actually unique" in practice) in the parallel in-flight
> jh/trace2-sid-fix
> (https://public-inbox.org/git/4352952677a11776a18ec9b6862cf358307cfafd.1553879063.git.gitgitgadget@gmail.com/)
>
> I think it's fine to merge js/trace2-to-directory down as it is, but do
> you/Josh think that retry logic needs to stay with that sort of SID?

I do not speak for Josh, but I think the only two logical choices are to open with (O_CREAT|O_EXCL) and

 (1) fallback with .%d suffix, making it clear that we are not
     willing to lose log files even when SID generation is botched; or
 (2) die/BUG when it fails, making it clear that we do rely on the
     guanateed uniqueness of SID.

A distant third may be to warn when open with O_CREAT|O_EXCL fails, but I am not sure what its value would be to do so---especially if we trust in the "actually unique in practice". Between (1) and (2), I have a slight preference to (1) over (2), as that is much easier to explain.

Those who want to have a "fixed width" thing could just ignore the ones with suffix---as long as the "actually unique in practice" claim holds, doing so will not lose any non-negligible amount of information anyway.

Josh Steadmon· Apr 8, 2019, 21:18 UTC · re: Junio C Hamano · lore

Re: What's cooking in git.git (Apr 2019, #01; Thu, 4)

On 2019.04.08 13:28, Junio C Hamano wrote:
Show 28 quoted lines
> Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
> 
> > unique (AFAICT "actually unique" in practice) in the parallel in-flight
> > jh/trace2-sid-fix
> > (https://public-inbox.org/git/4352952677a11776a18ec9b6862cf358307cfafd.1553879063.git.gitgitgadget@gmail.com/)
> >
> > I think it's fine to merge js/trace2-to-directory down as it is, but do
> > you/Josh think that retry logic needs to stay with that sort of SID?
> 
> I do not speak for Josh, but I think the only two logical choices
> are to open with (O_CREAT|O_EXCL) and
> 
>  (1) fallback with .%d suffix, making it clear that we are not
>      willing to lose log files even when SID generation is botched; or
> 
>  (2) die/BUG when it fails, making it clear that we do rely on the
>      guanateed uniqueness of SID.
> 
> A distant third may be to warn when open with O_CREAT|O_EXCL fails,
> but I am not sure what its value would be to do so---especially if
> we trust in the "actually unique in practice".  Between (1) and (2),
> I have a slight preference to (1) over (2), as that is much easier
> to explain.
> 
> Those who want to have a "fixed width" thing could just ignore the
> ones with suffix---as long as the "actually unique in practice"
> claim holds, doing so will not lose any non-negligible amount of
> information anyway.

I prefer (1) as well, although I would be happy to re-write this if the list consensus goes the other way.

← back to recent threads