{"thread":{"id":"53240","subject":"What's cooking in git.git (Apr 2020, #01; Wed, 15)","startedAt":"2020-04-15T23:02:08Z","lastAt":"2020-04-18T17:37:24Z","messageCount":18,"participants":["Junio C Hamano","Elijah Newren","Damien Robert","Jeff King","Danh Doan"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"395550","messageId":"xmqqr1wo4alb.fsf@gitster.c.googlers.com","threadId":"53240","inReplyTo":null,"subject":"What's cooking in git.git (Apr 2020, #01; Wed, 15)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-04-15T23:01:52Z","receivedAt":"2020-04-15T23:02:08Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Here are the topics that have been cooking.  Commits prefixed with\n'-' are only in 'pu' (proposed updates) while commits prefixed with\n'+' are in 'next'.  The ones marked with '.' do not appear in any of\nthe integration branches, but I am still holding onto them.\n\nNow the security fix is behind us, let's start merging things down\nto the 'next' branch.  One topic that has been in the \"held\" state\nin 'next' has been reverted, and its replacement started cooking in\n'pu'.  Some topics are marked to be merged to 'next' in this report\nbut have not been actually merged; a bit of knudging (or objection)\nto decide their fate is greatly appreciated, as usual.\n\nYou can find the changes described here in the integration branches\nof the repositories listed at\n\n    http://git-blame.blogspot.com/p/git-public-repositories.html\n\n--------------------------------------------------\n[New Topics]\n\n* jk/use-quick-lookup-in-clone-for-tag-following (2020-04-01) 1 commit\n  (merged to 'next' on 2020-04-15 at 11d6110e99)\n + clone: use \"quick\" lookup while following tags\n\n The logic to auto-follow tags by \"git clone --single-branch\" was\n not careful to avoid lazy-fetching unnecessary tags, which has been\n corrected.\n\n Will merge to 'master'.\n\n\n* ds/commit-graph-expiry-fix (2020-04-01) 1 commit\n - commit-graph: fix buggy --expire-time option\n\n \"git commit-graph write --expire-time=<timestamp>\" did not use the\n given timestamp correctly, which has been corrected.\n\n Will merge to 'next'.\n\n\n* ds/t5319-touch-fix (2020-04-01) 1 commit\n - t5319: replace 'touch -m' with 'test-tool chmtime'\n\n Tests update to use \"test-chmtime\" instead of \"touch -t\".\n\n Will merge to 'next'.\n\n\n* en/sequencer-reflog-action (2020-04-07) 1 commit\n  (merged to 'next' on 2020-04-15 at 6c635bdaa1)\n + sequencer: honor GIT_REFLOG_ACTION\n\n \"git rebase -i\" did not leave the reflog entries correctly.\n\n Will merge to 'master'.\n\n\n* dd/no-gpg-sign (2020-04-03) 6 commits\n  (merged to 'next' on 2020-04-15 at 3a326e99af)\n + Documentation: document merge option --no-gpg-sign\n + Documentation: merge commit-tree --[no-]gpg-sign\n + Documentation: reword commit --no-gpg-sign\n + Documentation: document am --no-gpg-sign\n + cherry-pick/revert: honour --no-gpg-sign in all case\n + rebase.c: honour --no-gpg-sign\n\n \"git rebase\" learned the \"--no-gpg-sign\" option to countermand\n commit.gpgSign the user may have.\n\n Will merge to 'master'.\n\n\n* en/rebase-doc-hooks-called-by-accident (2020-04-05) 1 commit\n - git-rebase.txt: add another hook to the hooks section, and explain more\n\n \"git rebase\" happens to call some hooks meant for \"checkout\" and\n \"commit\" by this was not a designed behaviour than historical\n accident.  This has been documented.\n\n Will merge to 'next'.\n\n\n* jk/fast-import-use-hashmap (2020-04-06) 1 commit\n - fast-import: replace custom hash with hashmap.c\n\n The custom hash function used by \"git fast-import\" has been\n replaced with the one from hashmap.c, which gave us a nice\n performance boost.\n\n Will merge to 'next'.\n\n\n* js/t0007-typofix (2020-04-05) 1 commit\n  (merged to 'next' on 2020-04-15 at ac9f86e08f)\n + t0007: fix a typo\n\n Typofix in a test script.\n\n Will merge to 'master'.\n\n\n* jt/avoid-prefetch-when-able-in-diff (2020-04-07) 4 commits\n - diff: restrict when prefetching occurs\n - diff: refactor object read\n - diff: make diff_populate_filespec_options struct\n - promisor-remote: accept 0 as oid_nr in function\n\n \"git diff\" in a partial clone learned to avoid lazy loading blob\n objects in more casese when they are not needed.\n\n Will merge to 'next'.\n\n\n* lx/submodule-clear-variables (2020-04-02) 1 commit\n - git-submodule.sh: setup uninitialized variables\n\n The \"git submodule\" command did not initialize a few variables it\n internally uses and was affected by variable settings leaked from\n the environment.\n\n Will merge to 'next'.\n\n\n* pb/pull-fetch-doc (2020-04-05) 2 commits\n  (merged to 'next' on 2020-04-15 at cf530f230f)\n + pull doc: correct outdated description of an example\n + pull doc: refer to a specific section in 'fetch' doc\n\n The more aggressive updates to remote-tracking branches we had for\n the past 7 years or so were not reflected in the documentation,\n which has been corrected.\n\n Will merge to 'master'.\n\n\n* dd/ci-swap-azure-pipelines-with-github-actions (2020-04-10) 14 commits\n - ci: let GitHub Actions upload failed tests' directories\n - ci: add a problem matcher for GitHub Actions\n - tests: when run in Bash, annotate test failures with file name/line number\n - ci: retire the Azure Pipelines definition\n - README: add a build badge for the GitHub Actions runs\n - ci: configure GitHub Actions for CI/PR\n - ci: run gem with sudo to install asciidoctor\n - ci: explicit install all required packages\n - ci: fix the `jobname` of the `GETTEXT_POISON` job\n - ci/lib: set TERM environment variable if not exist\n - ci/lib: allow running in GitHub Actions\n - ci/lib: if CI type is unknown, show the environment variables\n - Merge branch 'dd/ci-musl-libc' into HEAD\n - Merge branch 'dd/test-with-busybox' into HEAD\n (this branch uses dd/ci-musl-libc and dd/test-with-busybox.)\n\n Update the CI configuration to use GitHub Actions, retiring the one\n based on Azure Pipelines.\n\n Will merge to 'next'.\n\n\n* eb/format-patch-no-encode-headers (2020-04-07) 1 commit\n  (merged to 'next' on 2020-04-15 at 368840cd6c)\n + format-patch: teach --no-encode-email-headers\n\n The output from \"git format-patch\" uses RFC 2047 encoding for\n non-ASCII letters on From: and Subject: headers, so that it can\n directly be fed to e-mail programs.  A new option has been added\n to produce these headers in raw.\n\n Will merge to 'master'.\n\n\n* js/mingw-fixes (2020-04-10) 3 commits\n  (merged to 'next' on 2020-04-15 at 11a3d39d2b)\n + mingw: help debugging by optionally executing bash with strace\n + mingw: do not treat `COM0` as a reserved file name\n + mingw: use modern strftime implementation if possible\n\n Misc fixes for Windows.\n\n Will merge to 'master'.\n\n\n* js/stash-p-fix (2020-04-08) 2 commits\n - stash -p: (partially) fix bug concerning split hunks\n - t3904: fix incorrect demonstration of a bug\n\n Allowing the user to split a patch hunk while \"git stash -p\" does\n not work well; a band-aid has been added to make this (partially)\n work better.\n\n Will merge to 'next'.\n\n\n* js/subtree-doc-update-to-asciidoctor-2 (2020-04-08) 1 commit\n - subtree: fix build with AsciiDoctor 2\n\n Doc markup update.\n\n Will merge to 'next'.\n\n\n* pw/rebase-i-more-options (2020-04-07) 7 commits\n - SQUASH??? - avoid test numbering crashes\n - t3433: improve coverage\n - Revert \"sequencer: allow callers of read_author_script() to ignore fields\"\n - rebase -i: fix --committer-date-is-author-date\n - t3433: only compare commit dates\n - t3433: remove loops from tests\n - Revert \"Revert \"Merge branch 'ra/rebase-i-more-options'\"\"\n\n \"git rebase -i\" learns a bit more options.\n\n Expecting a reroll.\n cf. <43d06bc0-b2ee-0ae6-f22c-9850e4033d45@gmail.com>\n\n\n* bc/constant-memequal (2020-04-09) 1 commit\n - builtin/receive-pack: use constant-time comparison for HMAC value\n\n Validation of push certificate has been made more robust against\n timing attacks.\n\n Will merge to 'next'.\n\n\n* ds/revision-show-pulls (2020-04-10) 1 commit\n  (merged to 'next' on 2020-04-15 at 89b4d86a3a)\n + revision: --show-pulls adds helpful merges\n\n \"git log\" learned \"--show-pulls\" that helps pathspec limited\n history views; a merge commit that takes the whole change from a\n side branch, which is normally omitted from the output, is shown\n in addition to the commits that introduce real changes.\n\n Will merge to 'master'.\n\n\n* en/rebase-no-keep-empty (2020-04-11) 3 commits\n  (merged to 'next' on 2020-04-15 at 9908cee7c0)\n + rebase: fix an incompatible-options error message\n + rebase: reinstate --no-keep-empty\n + rebase -i: mark commits that begin empty in todo editor\n (this branch is used by jt/rebase-allow-duplicate.)\n\n \"git rebase\" (again) learns to honor \"--no-keep-empty\", which lets\n the user to discard commits that are empty from the beginning (as\n opposed to the ones that become empty because of rebasing).  The\n interactive rebase also marks commits that are empty in the todo.\n\n Will merge to 'master'.\n\n\n* jc/missing-ref-store-fix (2020-04-09) 2 commits\n  (merged to 'next' on 2020-04-15 at 83caf48c7a)\n + repository: mark the \"refs\" pointer as private\n + sha1-name: do not assume that the ref store is initialized\n\n We've left the command line parsing of \"git log :/a/b/\" broken for\n about a full year without anybody noticing, which has been\n corrected.\n\n Will merge to 'master'.\n\n\n* jk/config-use-size-t (2020-04-10) 6 commits\n - config: reject parsing of files over INT_MAX\n - config: use size_t to store parsed variable baselen\n - git_config_parse_key(): return baselen as size_t\n - config: drop useless length variable in write_pair()\n - parse_config_key(): return subsection len as size_t\n - remote: drop auto-strlen behavior of make_branch() and make_rewrite()\n\n The config API made mixed uses of int and size_t types to represent\n length of various pieces of text it parsed, which has been updated\n to use the correct type (i.e. size_t) throughout.\n\n Will merge to 'next'.\n\n\n* js/flush-prompt-before-interative-input (2020-04-10) 2 commits\n  (merged to 'next' on 2020-04-15 at 051407eb3a)\n + interactive: explicitly `fflush` stdout before expecting input\n + interactive: refactor code asking the user for interactive input\n\n The interactive input from various codepaths are consolidated and\n any prompt possibly issued earlier are fflush()ed before we read.\n\n Will merge to 'master'.\n\n\n* js/mingw-is-hidden-test-fix (2020-04-11) 3 commits\n  (merged to 'next' on 2020-04-15 at 1e11f552f7)\n + t: restrict `is_hidden` to be called only on Windows\n + mingw: make test_path_is_hidden more robust\n + t: consolidate the `is_hidden` functions\n\n A Windows-specific test element has been made more robust against\n misuse from both user's environment and programmer's errors.\n\n Will merge to 'master'.\n\n\n* js/mingw-isilon-nfs (2020-04-10) 1 commit\n  (merged to 'next' on 2020-04-15 at 4bac536980)\n + mingw: cope with the Isilon network file system\n\n Will merge to 'master'.\n\n\n* ma/config-doc-fix (2020-04-09) 1 commit\n  (merged to 'next' on 2020-04-15 at 256175ec38)\n + config.txt: move closing \"----\" to cover entire listing\n\n Doc update.\n\n Will merge to 'master'.\n\n\n* ma/simplify-merge-config-parsing (2020-04-11) 1 commit\n  (merged to 'next' on 2020-04-15 at d2915301e4)\n + merge: use skip_prefix to parse config key\n\n Code simplification.\n\n Will merge to 'master'.\n\n\n* ds/blame-on-bloom (2020-04-13) 4 commits\n - blame: use changed-path Bloom filters\n - commit-graph: write commit-graph in more tests\n - commit: write commit-graph with Bloom filters\n - revision: complicated pathspecs disable filters\n (this branch uses gs/commit-graph-path-filter.)\n\n \"git blame\" learns to take advantage of the \"changed-paths\" Bloom\n filter stored in the commit-graph file.\n\n\n* dd/iso-8601-updates (2020-04-15) 2 commits\n - date.c: allow compact version of ISO-8601 datetime\n - date.c: skip fractional second part of ISO-8601\n\n The approxidate parser learns to parse seconds with fraction.\n\n Will merge to 'next'.\n\n\n* ds/log-exclude-decoration-config (2020-04-15) 2 commits\n - SQUASH???\n - log: add log.excludeDecoration config option\n\n The \"--decorate-refs\" and \"--decorate-refs-exclude\" options \"git\n log\" takes have learned a companion configuration variable\n log.excludeDecoration that sits at the lowest priority in the\n family.\n\n Getting there.\n\n\n* jk/credential-parsing-end-of-host-in-URL (2020-04-15) 1 commit\n  (merged to 'next' on 2020-04-15 at 55bc3eb7cb)\n + credential: treat \"?\" and \"#\" in URLs as end of host\n\n Parsing of URL for the credential helper has been corrected.\n\n Will merge to 'master'.\n\n\n* lr/freshen-file-fix (2020-04-15) 1 commit\n - freshen_file(): use NULL `times' for implicit current-time\n\n The code that refreshes the last access and modified time of\n on-disk packfiles and loose object files have been updated.\n\n Will merge to 'next'.\n\n\n* tb/commit-graph-split-strategy (2020-04-15) 7 commits\n - commit-graph.c: introduce '--[no-]check-oids'\n - commit-graph.h: replace 'commit_hex' with 'commits'\n - oidset: introduce 'oidset_size'\n - builtin/commit-graph.c: introduce split strategy 'replace'\n - builtin/commit-graph.c: introduce split strategy 'no-merge'\n - builtin/commit-graph.c: support for '--split[=<strategy>]'\n - t/helper/test-read-graph.c: support commit-graph chains\n\n \"git commit-graph write\" learned different ways to write out split\n files.\n\n--------------------------------------------------\n[Stalled]\n\n* mk/use-size-t-in-zlib (2018-10-15) 1 commit\n - zlib.c: use size_t for size\n\n The wrapper to call into zlib followed our long tradition to use\n \"unsigned long\" for sizes of regions in memory, which have been\n updated to use \"size_t\".\n\n--------------------------------------------------\n[Cooking]\n\n* gs/commit-graph-path-filter (2020-04-09) 16 commits\n - bloom: ignore renames when computing changed paths\n - commit-graph: add GIT_TEST_COMMIT_GRAPH_CHANGED_PATHS test flag\n - t4216: add end to end tests for git log with Bloom filters\n - revision.c: add trace2 stats around Bloom filter usage\n - revision.c: use Bloom filters to speed up path based revision walks\n - commit-graph: add --changed-paths option to write subcommand\n - commit-graph: reuse existing Bloom filters during write\n - commit-graph: write Bloom filters to commit graph file\n - commit-graph: examine commits by generation number\n - commit-graph: examine changed-path objects in pack order\n - commit-graph: compute Bloom filters for changed paths\n - diff: halt tree-diff early after max_changes\n - bloom.c: core Bloom filter implementation for changed paths.\n - bloom.c: introduce core Bloom filter constructs\n - bloom.c: add the murmur3 hash implementation\n - commit-graph: define and use MAX_NUM_CHUNKS\n (this branch is used by ds/blame-on-bloom.)\n\n Introduce an extension to the commit-graph to make it efficient to\n check for the paths that were modified at each commit using Bloom\n filters.\n\n Getting there.\n\n\n* ag/rebase-merge-allow-ff-under-abbrev-command (2020-03-30) 2 commits\n  (merged to 'next' on 2020-04-15 at b4679f7c7c)\n + t3432: test `--merge' with `rebase.abbreviateCommands = true', too\n + sequencer: don't abbreviate a command if it doesn't have a short form\n\n \"git rebase\" with the merge backend did not work well when the\n rebase.abbreviateCommands configuration was set.\n\n Will merge to 'master'.\n\n\n* jk/oid-array-cleanups (2020-03-30) 7 commits\n  (merged to 'next' on 2020-04-15 at d6155cd023)\n + oidset: stop referring to sha1-array\n + ref-filter: stop referring to \"sha1 array\"\n + bisect: stop referring to sha1_array\n + test-tool: rename sha1-array to oid-array\n + oid_array: rename source file from sha1-array\n + oid_array: use size_t for iteration\n + oid_array: use size_t for count and allocation\n\n Code cleanup.\n\n Will merge to 'master'.\n\n\n* jx/proc-receive-hook (2020-04-15) 8 commits\n - SQUASH???\n - doc: add documentation for the proc-receive hook\n - receive-pack: new config receive.procReceiveRefs\n - refs.c: refactor to reuse ref_is_hidden()\n - send-pack: extension for client-side status report\n - receive-pack: add new proc-receive hook\n - connect: export parse_feature_value()\n - transport: not report a non-head push as a branch\n\n \"git receive-pack\" that accepts requests by \"git push\" learned to\n outsource most of the ref updates to the new \"proc-receive\" hook.\n\n\n* dr/midx-avoid-int-underflow (2020-03-28) 1 commit\n  (merged to 'next' on 2020-04-15 at eb2343a5eb)\n + midx.c: fix an integer underflow\n\n When fed a midx that records no objects, some codepaths tried to\n loop from 0 through (num_objects-1), which, due to integer\n arithmetic wrapping around, made it nonsense operation with out of\n bounds array accesses.  The code has been corrected to reject such\n an midx file.\n\n Will merge to 'master'.\n\n\n* ak/run-command-on-cygwin-fix (2020-03-27) 1 commit\n  (merged to 'next' on 2020-04-15 at 9e98b82a7f)\n + run-command: trigger PATH lookup properly on Cygwin\n\n Utitiles run via the run_command() API were not spawned correctly\n on Cygwin, when the paths to them are given as a full path with\n backslashes.\n\n Will merge to 'master'.\n\n\n* dd/ci-musl-libc (2020-04-06) 6 commits\n - travis: build and test on Linux with musl libc and busybox\n - ci/linux32: libify install-dependencies step\n - ci: refactor docker runner script\n - ci/linux32: parameterise command to switch arch\n - ci/lib-docker: preserve required environment variables\n - ci: make MAKEFLAGS available inside the Docker container in the Linux32 job\n (this branch is used by dd/ci-swap-azure-pipelines-with-github-actions.)\n\n A new CI job to build and run test suite on linux with musl libc\n has been added.\n\n Will merge to 'next'.\n\n\n* dr/doc-recurse-submodules (2020-04-06) 5 commits\n - doc: --recurse-submodules mostly applies to active submodules\n - doc: be more precise on (fetch|push).recurseSubmodules\n - doc: explain how to deactivate submodule.recurse completely\n - doc: document --recurse-submodules for reset and restore\n - doc: list all commands affected by submodule.recurse\n\n Documentation updates around the \"--recurse-submodules\" option.\n\n Will merge to 'next'.\n\n\n* dr/push-remoteref-fix (2020-04-06) 2 commits\n  (merged to 'next' on 2020-04-15 at ecf60dc488)\n + remote.c: fix handling of %(push:remoteref)\n + remote.c: fix %(push) for triangular workflows\n\n The \"%(push:remoteref)\" placeholder in the \"--format=\" argument of\n \"git format-patch\" (and friends) only showed what got explicitly\n configured, not what ref at the receiving end would be updated when\n \"git push\" was used, as it ignored the default behaviour (e.g. update\n the same ref as the source).\n\n Will merge to 'master'.\n\n\n* jc/doc-test-leaving-early (2020-03-29) 1 commit\n - t/README: suggest how to leave test early with failure\n\n Document the recommended way to abort a failing test early (e.g. by\n exiting a loop), which is to say \"return 1\".\n\n Will merge to 'next'.\n\n\n* jk/build-with-right-curl (2020-04-05) 3 commits\n - Makefile: avoid running curl-config unnecessarily\n - Makefile: use curl-config --cflags\n - Makefile: avoid running curl-config multiple times\n\n The build procedure did not use the libcurl library and its include\n files correctly for a custom-built installation.\n\n On hold.\n cf. <20200404145829.GB679473@coredump.intra.peff.net>\n\n\n* jk/harden-protocol-v2-delim-handling (2020-03-29) 3 commits\n  (merged to 'next' on 2020-04-15 at c983535405)\n + test-lib-functions: simplify packetize() stdin code\n + upload-pack: handle unexpected delim packets\n + test-lib-functions: make packetize() more efficient\n\n The server-end of the v2 protocol to serve \"git clone\" and \"git\n fetch\" was not prepared to see a delim packets at unexpected\n places, which led to a crash.\n\n Will merge to 'master'.\n\n\n* jk/p5310-drop-non-bitmap-timing (2020-03-27) 1 commit\n  (merged to 'next' on 2020-04-15 at 7aac76cab2)\n + p5310: stop timing non-bitmap pack-to-disk\n\n Perf-test update.\n\n Will merge to 'master'.\n\n\n* jk/test-cleanup (2020-03-27) 2 commits\n  (merged to 'next' on 2020-04-15 at bce8b2d5ed)\n + t/lib-*.sh: drop executable bit\n + t/lib-credential.sh: drop shebang line\n\n Test cleanup.\n\n Will merge to 'master'.\n\n\n* ps/transactional-update-ref-stdin (2020-04-02) 9 commits\n - update-ref: implement interactive transaction handling\n - update-ref: read commands in a line-wise fashion\n - update-ref: move transaction handling into `update_refs_stdin()`\n - update-ref: pass end pointer instead of strbuf\n - update-ref: drop unused argument for `parse_refname`\n - update-ref: organize commands in an array\n - strbuf: provide function to append whole lines\n - git-update-ref.txt: add missing word\n - refs: fix segfault when aborting empty transaction\n\n \"git update-ref --stdin\" learned a handful of new verbs to let the\n user control ref update transactions more explicitly, which helps\n as an ingredient to implement two-phase commit-style atomic\n ref-updates across multiple repositories.\n\n Will merge to 'next'.\n\n\n* ag/sequencer-i18n-messages (2020-03-28) 1 commit\n  (merged to 'next' on 2020-04-15 at d6b38d12cf)\n + sequencer: mark messages for translation\n\n Message fix.\n\n Will merge to 'master'.\n\n\n* dl/wrapper-fix-indentation (2020-03-28) 1 commit\n  (merged to 'next' on 2020-04-15 at e6b9c16b1b)\n + wrapper: indent with tabs\n\n Coding style fix.\n\n Will merge to 'master'.\n\n\n* en/pull-do-not-rebase-after-fast-forwarding (2020-03-27) 1 commit\n  (merged to 'next' on 2020-04-15 at 3aa725ff45)\n + pull: avoid running both merge and rebase\n\n \"git pull --rebase\" tried to run a rebase even after noticing that\n the pull results in a fast-forward and no rebase is needed nor\n sensible, for the past few years due to a mistake nobody noticed.\n\n Will merge to 'master'.\n\n\n* jc/allow-strlen-substitution-in-shell-scripts (2020-03-29) 1 commit\n  (merged to 'next' on 2020-04-15 at 262424efdc)\n + CodingGuidelines: allow ${#posix} == strlen($posix)\n\n Coding guideline update.\n\n Will merge to 'master'.\n\n\n* jm/gitweb-fastcgi-utf8 (2020-03-29) 1 commit\n  (merged to 'next' on 2020-04-15 at adb7f2373a)\n + gitweb: fix UTF-8 encoding when using CGI::Fast\n\n Gitweb update.\n\n Will merge to 'master'.\n\n\n* js/walk-doc-optim (2020-03-30) 1 commit\n  (merged to 'next' on 2020-04-15 at ca36c04a23)\n + MyFirstObjectWalk: remove unnecessary conditional statement\n\n Code cleanup.\n\n Will merge to 'master'.\n\n\n* jx/atomic-push (2020-03-29) 4 commits\n - transport-helper: new method reject_atomic_push()\n - transport-helper: mark failure for atomic push\n - send-pack: mark failure of atomic push properly\n - t5543: never report what we do not push\n\n \"git push --atomic\" used to show failures for refs that weren't\n even pushed, which has been corrected.\n\n Will merge to 'next'.\n\n\n* ma/doc-discard-docbook-xsl-1.73 (2020-03-31) 7 commits\n - user-manual.conf: don't specify [listingblock]\n - INSTALL: drop support for docbook-xsl before 1.74\n - manpage-normal.xsl: fold in manpage-base.xsl\n - manpage-bold-literal.xsl: stop using git.docbook.backslash\n - Doc: drop support for docbook-xsl before 1.73.0\n - Doc: drop support for docbook-xsl before 1.72.0\n - Doc: drop support for docbook-xsl before 1.71.1\n\n Raise the minimum required version of docbook-xsl package to 1.74,\n as 1.74.0 was from late 2008, which is more than 10 years old, and\n drop compatibility cruft from our documentation suite.\n\n Will merge to 'next'.\n\n\n* pb/rebase-doc-typofix (2020-03-28) 1 commit\n  (merged to 'next' on 2020-04-15 at 8cd8422990)\n + git-rebase.txt: fix typo\n\n Typofix.\n\n Will merge to 'master'.\n\n\n* rs/pull-options-sync-code-and-doc (2020-03-28) 2 commits\n  (merged to 'next' on 2020-04-15 at d743f43034)\n + pull: pass documented fetch options on\n + pull: remove --update-head-ok from documentation\n\n \"git pull\" shares many options with underlying \"git fetch\", but\n some of them were not documented and some of those that would make\n sense to pass down were not passed down.\n\n Will merge to 'master'.\n\n\n* en/fill-directory-exponential (2020-04-01) 12 commits\n - completion: fix 'git add' on paths under an untracked directory\n - Fix error-prone fill_directory() API; make it only return matches\n - dir: replace double pathspec matching with single in treat_directory()\n - dir: include DIR_KEEP_UNTRACKED_CONTENTS handling in treat_directory()\n - dir: replace exponential algorithm with a linear one\n - dir: refactor treat_directory to clarify control flow\n - dir: fix confusion based on variable tense\n - dir: fix broken comment\n - dir: consolidate treat_path() and treat_one_path()\n - dir: fix simple typo in comment\n - t3000: add more testcases testing a variety of ls-files issues\n - t7063: more thorough status checking\n\n The directory traversal code had redundant recursive calls which\n made its performance characteristics exponential with respect to\n the depth of the tree, which was corrected.\n\n Is this ready for 'next'?\n\n\n* dd/test-with-busybox (2020-03-26) 8 commits\n  (merged to 'next' on 2020-04-15 at 8177191066)\n + t5703: feed raw data into test-tool unpack-sideband\n + t4124: tweak test so that non-compliant diff(1) can also be used\n + t7063: drop non-POSIX argument \"-ls\" from find(1)\n + t5616: use rev-parse instead to get HEAD's object_id\n + t5003: skip conversion test if unzip -a is unavailable\n + t5003: drop the subshell in test_lazy_prereq\n + test-lib-functions: test_cmp: eval $GIT_TEST_CMP\n + t4061: use POSIX compliant regex(7)\n (this branch is used by dd/ci-swap-azure-pipelines-with-github-actions.)\n\n Various tests have been updated to work around issues found with\n shell utilities that come with busybox etc.\n\n Will merge to 'master'.\n\n\n* dl/libify-a-few (2020-03-24) 2 commits\n - Lib-ify prune-packed\n - Lib-ify fmt-merge-msg\n\n Code in builtin/*, i.e. those can only be called from within\n built-in subcommands, that implements bulk of a couple of\n subcommands have been moved to libgit.a so that they could be used\n by others.\n\n Will merge to 'next'.\n\n\n* dl/test-must-fail-fixes-3 (2020-03-27) 8 commits\n  (merged to 'next' on 2020-04-15 at dd0130c158)\n + t5801: teach compare_refs() to accept !\n + t5612: stop losing return codes of git commands\n + t5612: don't use `test_must_fail test_cmp`\n + t5607: reorder `nongit test_must_fail`\n + t5550: simplify no matching line check\n + t5512: stop losing return codes of git commands\n + t5512: stop losing git exit code in here-docs\n + t5512: don't use `test_must_fail test_cmp`\n\n Test clean-up continues.\n\n Will merge to 'master'.\n\n\n* en/sparse-checkout (2020-03-27) 18 commits\n  (merged to 'next' on 2020-04-15 at 3e295e445d)\n + sparse-checkout: provide a new reapply subcommand\n + unpack-trees: failure to set SKIP_WORKTREE bits always just a warning\n + unpack-trees: provide warnings on sparse updates for unmerged paths too\n + unpack-trees: make sparse path messages sound like warnings\n + unpack-trees: split display_error_msgs() into two\n + unpack-trees: rename ERROR_* fields meant for warnings to WARNING_*\n + unpack-trees: move ERROR_WOULD_LOSE_SUBMODULE earlier\n + sparse-checkout: use improved unpack_trees porcelain messages\n + sparse-checkout: use new update_sparsity() function\n + unpack-trees: add a new update_sparsity() function\n + unpack-trees: pull sparse-checkout pattern reading into a new function\n + unpack-trees: do not mark a dirty path with SKIP_WORKTREE\n + unpack-trees: allow check_updates() to work on a different index\n + t1091: make some tests a little more defensive against failures\n + unpack-trees: simplify pattern_list freeing\n + unpack-trees: simplify verify_absent_sparse()\n + unpack-trees: remove unused error type\n + unpack-trees: fix minor typo in comment\n\n \"sparse-checkout\" UI improvements.\n\n Will merge to 'master'.\n\n\n* js/import-tars-do-not-make-phony-files-from-pax-headers (2020-03-24) 1 commit\n  (merged to 'next' on 2020-04-15 at 408afae2c9)\n + import-tars: ignore the global PAX header\n\n The import-tars importer (in contrib/fast-import/) used to create\n phony files at the top-level of the repository when the archive\n contains global PAX headers, which made its own logic to detect and\n omit the common leading directory ineffective, which has been\n corrected.\n\n Will merge to 'master'.\n\n\n* js/test-junit-finalization-fix (2020-03-23) 1 commit\n  (merged to 'next' on 2020-04-15 at 0d6a975146)\n + tests(junit-xml): avoid invalid XML\n\n Test fix.\n\n Will merge to 'master'.\n\n\n* js/tests-gpg-integration-on-windows (2020-03-26) 5 commits\n  (merged to 'next' on 2020-04-15 at 48a13eb0b2)\n + tests: increase the verbosity of the GPG-related prereqs\n + tests: turn GPG, GPGSM and RFC1991 into lazy prereqs\n + tests: do not let lazy prereqs inside `test_expect_*` turn off tracing\n + t/lib-gpg.sh: stop pretending to be a stand-alone script\n + tests(gpg): allow the gpg-agent to start on Windows\n\n Enable tests that require GnuPG on Windows.\n\n Will merge to 'master'.\n\n\n* dl/merge-autostash (2020-04-10) 22 commits\n - pull: pass --autostash to merge\n - t5520: make test_pull_autostash() accept expect_parent_num\n - merge: teach --autostash option\n - sequencer: implement apply_autostash_oid()\n - sequencer: implement save_autostash()\n - sequencer: unlink autostash in apply_autostash()\n - sequencer: extract perform_autostash() from rebase\n - rebase: generify create_autostash()\n - rebase: extract create_autostash()\n - reset: extract reset_head() from rebase\n - rebase: generify reset_head()\n - rebase: use apply_autostash() from sequencer.c\n - sequencer: rename stash_sha1 to stash_oid\n - sequencer: make apply_autostash() accept a path\n - rebase: use read_oneliner()\n - sequencer: make read_oneliner() extern\n - sequencer: configurably warn on non-existent files\n - sequencer: make read_oneliner() accept flags\n - sequencer: make file exists check more efficient\n - sequencer: stop leaking buf\n - t7600: use test_write_lines()\n - Makefile: ASCII-sort += lists\n\n \"git merge\" learns the \"--autostash\" option.\n\n Will merge to 'next'.\n\n\n* js/trace2-env-vars (2020-03-23) 1 commit\n  (merged to 'next' on 2020-04-15 at 1aad0adfa0)\n + trace2: teach Git to log environment variables\n\n Trace2 enhancement to allow logging of the environment variables.\n\n Will merge to 'master'.\n\n\n* ar/test-style-fixes (2020-03-22) 2 commits\n  (merged to 'next' on 2020-04-15 at 50ed75bccf)\n + t: fix whitespace around &&\n + t9500: remove spaces after redirect operators\n\n Style fixes.\n\n Will merge to 'master'.\n\n\n* ds/doc-clone-filter (2020-03-22) 1 commit\n  (merged to 'next' on 2020-04-15 at 16276689b3)\n + clone: document --filter options\n\n Doc update.\n\n Will merge to 'master'.\n\n\n* jk/t3419-drop-expensive-tests (2020-03-22) 1 commit\n  (merged to 'next' on 2020-04-15 at a17ac8f996)\n + t3419: drop EXPENSIVE tests\n\n Test update.\n\n Will merge to 'master'.\n\n\n* jt/connectivity-check-optim-in-partial-clone (2020-03-29) 1 commit\n  (merged to 'next' on 2020-04-15 at 1b3692b7fb)\n + connected: always use partial clone optimization\n\n Simplify the commit ancestry connectedness check in a partial clone\n repository in which \"promised\" objects are assumed to be obtainable\n lazily on-demand from promisor remote repositories.\n\n Will merge to 'master'.\n\n\n* mt/test-lib-bundled-short-options (2020-03-25) 1 commit\n  (merged to 'next' on 2020-04-15 at 7fa0c56d91)\n + test-lib: allow short options to be bundled\n\n Minor test usability improvement.\n\n Will merge to 'master'.\n\n\n* bk/p4-pre-edit-changelist (2020-02-14) 7 commits\n  (merged to 'next' on 2020-04-15 at 3e7cecd445)\n + git-p4: add RCS keyword status message\n + git-p4: add p4 submit hooks\n + git-p4: restructure code in submit\n + git-p4: add --no-verify option\n + git-p4: add p4-pre-submit exit text\n + git-p4: create new function run_git_hook\n + git-p4: rewrite prompt to be Windows compatible\n\n \"git p4\" learned four new hooks and also \"--no-verify\" option to\n bypass them (and the existing \"p4-pre-submit\" hook).\n\n Will merge to 'master'.\n\n\n* jt/rebase-allow-duplicate (2020-04-11) 1 commit\n  (merged to 'next' on 2020-04-15 at 56a9d83adf)\n + rebase --merge: optionally skip upstreamed commits\n (this branch uses en/rebase-no-keep-empty.)\n\n Allow \"git rebase\" to reapply all local commits, even if the may be\n already in the upstream, without checking first.\n\n Will merge to 'master'.\n\n\n* bc/faq (2020-03-30) 1 commit\n  (merged to 'next' on 2020-04-15 at 2d4c46ca7a)\n + docs: add a FAQ\n\n Doc update.\n\n Will merge to 'master'.\n\n\n* jc/log-no-mailmap (2020-03-16) 3 commits\n - log: give --[no-]use-mailmap a more sensible synonym --[no-]mailmap\n - clone: reorder --recursive/--recurse-submodules\n - parse-options: teach \"git cmd -h\" to show alias as alias\n\n \"git log\" learns \"--[no-]mailmap\" as a synonym to \"--[no-]use-mailmap\"\n\n Will merge to 'next'.\n\n\n* hn/reftable (2020-04-09) 11 commits\n - SQUASH??? - whitespace errors\n - SQUASH??? - do not forget to clean reftable library\n - Reftable support for git-core\n - Add reftable library\n - reftable: clarify how empty tables should be written\n - reftable: define version 2 of the spec to accomodate SHA256\n - reftable: file format documentation\n - Add .gitattributes for the reftable/ directory\n - refs: document how ref_iterator_advance_fn should handle symrefs\n - create .git/refs in files-backend.c\n - refs.h: clarify reflog iteration order\n\n A new refs backend \"reftable\" to replace the traditional\n combination of packed-refs files and one-file-per-ref loose refs\n has been implemented and integrated for improved performance and\n atomicity.\n\n At v8.\n cf. <pull.539.v8.git.1585740538.gitgitgadget@gmail.com>\n\n\n* es/bugreport (2020-04-06) 5 commits\n - bugreport: add compiler info\n - bugreport: add uname info\n - bugreport: gather git version and build info\n - bugreport: add tool to generate debugging info\n - help: move list_config_help to builtin/help\n\n The \"bugreport\" tool.\n\n Will merge to 'next'.\n\n--------------------------------------------------\n[Discarded]\n\n* jc/rebase-backend-keep-old-default (2020-03-10) 1 commit\n . rebase: do not switch the default to 'merge' just yet\n\n The \"merge\" backend of \"git rebase\" still has a few bugs and\n unexpected behaviour that need to be ironed out before it becomes\n the default.  Let's switch the default back to the \"apply\" backend\n for now.\n\n\n* vn/reset-deleted-ita (2019-07-26) 1 commit\n . reset: unstage empty deleted ita files\n\n \"git reset HEAD [<pathspec>]\" did not reset an empty file that was\n added with the intent-to-add bit.\n\n\n* tb/commit-graph-split-merge (2020-03-24) 3 commits\n  (merged to 'next' on 2020-03-31 at 2183baf09c)\n + builtin/commit-graph.c: support '--input=graphed'\n + builtin/commit-graph.c: introduce '--input=<source>'\n + builtin/commit-graph.c: support '--split[=<strategy>]'\n\n The code to write out the commit-graph has been taught a few\n options to control if the resulting graph chains should be merged\n or a single new incremental graph is created.\n\n Discarded---tb/commit-graph-split-strategy supersedes this.\n"},{"id":"395596","messageId":"CABPp-BE6xrKLA26Xn4apW-MReCeeyPKu=UMkgr4DsPW0vH4kDw@mail.gmail.com","threadId":"53240","inReplyTo":"xmqqr1wo4alb.fsf@gitster.c.googlers.com","subject":"Re: What's cooking in git.git (Apr 2020, #01; Wed, 15)","fromName":"Elijah Newren","fromEmail":"newren@gmail.com","sentAt":"2020-04-16T15:28:02Z","receivedAt":"2020-04-16T15:28:27Z","isPatch":false,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"On Wed, Apr 15, 2020 at 6:13 PM Junio C Hamano <gitster@pobox.com> wrote:\n\n> * en/fill-directory-exponential (2020-04-01) 12 commits\n>  - completion: fix 'git add' on paths under an untracked directory\n>  - Fix error-prone fill_directory() API; make it only return matches\n>  - dir: replace double pathspec matching with single in treat_directory()\n>  - dir: include DIR_KEEP_UNTRACKED_CONTENTS handling in treat_directory()\n>  - dir: replace exponential algorithm with a linear one\n>  - dir: refactor treat_directory to clarify control flow\n>  - dir: fix confusion based on variable tense\n>  - dir: fix broken comment\n>  - dir: consolidate treat_path() and treat_one_path()\n>  - dir: fix simple typo in comment\n>  - t3000: add more testcases testing a variety of ls-files issues\n>  - t7063: more thorough status checking\n>\n>  The directory traversal code had redundant recursive calls which\n>  made its performance characteristics exponential with respect to\n>  the depth of the tree, which was corrected.\n>\n>  Is this ready for 'next'?\n\nI think it's as ready as it's going to get.  I'm not aware of any\ncurrent issues, am not planning further work barring a report or\nfurther review, and I'm feeling much better about it than when I first\nsubmitted it with a bunch of big warnings (though the big warnings it\ncontains in that one commit message are still justified).  I'm glad it\nspent a good long while in pu.  My biggest worry with this series is\nthat it might get merged just slightly before a release; I hope it\neither spends an average amount of time in next and then merges down\nquickly or else sits in next for a long time and merges at the\nbeginning of the 2.28 cycle.\n\nEither way, at $DAYJOB I got a minor victory by getting many\nvolunteers who will take newish git versions (as opposed to the old\n\"please install at least git>=2.20.0), and I'm currently trying to set\nup a pipeline for them to get new versions easily.  This series will\nbe one of the things I include, in order generate more real-world\ntesting.\n"},{"id":"395607","messageId":"xmqqwo6fz8rs.fsf@gitster.c.googlers.com","threadId":"53240","inReplyTo":"CABPp-BE6xrKLA26Xn4apW-MReCeeyPKu=UMkgr4DsPW0vH4kDw@mail.gmail.com","subject":"Re: What's cooking in git.git (Apr 2020, #01; Wed, 15)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-04-16T16:37:43Z","receivedAt":"2020-04-16T16:37:52Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Elijah Newren <newren@gmail.com> writes:\n\n> I think it's as ready as it's going to get.  I'm not aware of any\n> current issues, am not planning further work barring a report or\n> further review, and I'm feeling much better about it than when I first\n> submitted it with a bunch of big warnings (though the big warnings it\n> contains in that one commit message are still justified).  I'm glad it\n> spent a good long while in pu.\n\nThanks, let's mark it for 'next' then.\n\nBy the way, I merged quite a large number of topics to 'next'\nyesterday.  Those who want to polish their own topics further may\nwant to check the status, so that they can switch to update\nincrementally from now on for topics that are already in 'next'.\n\nThanks.\n"},{"id":"395624","messageId":"20200416211208.xqnnrkvcl2jw3ejr@doriath","threadId":"53240","inReplyTo":"xmqqr1wo4alb.fsf@gitster.c.googlers.com","subject":"Re: What's cooking in git.git (Apr 2020, #01; Wed, 15)","fromName":"Damien Robert","fromEmail":"damien.olivier.robert@gmail.com","sentAt":"2020-04-16T21:12:08Z","receivedAt":"2020-04-16T21:12:20Z","isPatch":false,"sender":{"key":"damien.olivier.robert@gmail.com","avatar":null},"body":"From Junio C Hamano, Wed 15 Apr 2020 at 16:01:52 (-0700) :\n> * dr/push-remoteref-fix (2020-04-06) 2 commits\n>   (merged to 'next' on 2020-04-15 at ecf60dc488)\n>  + remote.c: fix handling of %(push:remoteref)\n>  + remote.c: fix %(push) for triangular workflows\n\nHi Junio,\n\nI just sent a new version of this series, which drop the second patch for\nnow. As outlined in my cover letter in\nhttps://public-inbox.org/git/20200406175648.25737-1-damien.olivier.robert+git@gmail.com/\nthe triangular workflow patch still leaves some corner cases (and for now\nis missing reviews).\n\nI'd prefer to fix all of them at once, rather than have an almost working\npatch. Jeff seems to be of the same opinion in\nhttps://public-inbox.org/git/20200406214607.GA1251506@coredump.intra.peff.net/\n"},{"id":"395631","messageId":"20200416213009.GA1721147@coredump.intra.peff.net","threadId":"53240","inReplyTo":"20200416211208.xqnnrkvcl2jw3ejr@doriath","subject":"Re: What's cooking in git.git (Apr 2020, #01; Wed, 15)","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2020-04-16T21:30:09Z","receivedAt":"2020-04-16T21:30:28Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Apr 16, 2020 at 11:12:08PM +0200, Damien Robert wrote:\n\n> From Junio C Hamano, Wed 15 Apr 2020 at 16:01:52 (-0700) :\n> > * dr/push-remoteref-fix (2020-04-06) 2 commits\n> >   (merged to 'next' on 2020-04-15 at ecf60dc488)\n> >  + remote.c: fix handling of %(push:remoteref)\n> >  + remote.c: fix %(push) for triangular workflows\n> \n> Hi Junio,\n> \n> I just sent a new version of this series, which drop the second patch for\n> now. As outlined in my cover letter in\n> https://public-inbox.org/git/20200406175648.25737-1-damien.olivier.robert+git@gmail.com/\n> the triangular workflow patch still leaves some corner cases (and for now\n> is missing reviews).\n> \n> I'd prefer to fix all of them at once, rather than have an almost working\n> patch. Jeff seems to be of the same opinion in\n> https://public-inbox.org/git/20200406214607.GA1251506@coredump.intra.peff.net/\n\nYeah, I'm sorry I haven't looked at the latest revision of the series.\nThe security fix and some other stuff has been keeping me busy. If\nsomebody else has time to review, please don't wait one me. But\notherwise, it is on my list and I'll get to it eventually.\n\n-Peff\n"},{"id":"395632","messageId":"xmqqh7xjxeew.fsf@gitster.c.googlers.com","threadId":"53240","inReplyTo":"20200416213009.GA1721147@coredump.intra.peff.net","subject":"Re: What's cooking in git.git (Apr 2020, #01; Wed, 15)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-04-16T22:18:47Z","receivedAt":"2020-04-16T22:18:57Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> On Thu, Apr 16, 2020 at 11:12:08PM +0200, Damien Robert wrote:\n>\n>> From Junio C Hamano, Wed 15 Apr 2020 at 16:01:52 (-0700):\n>> > * dr/push-remoteref-fix (2020-04-06) 2 commits\n>> >   (merged to 'next' on 2020-04-15 at ecf60dc488)\n>> >  + remote.c: fix handling of %(push:remoteref)\n>> >  + remote.c: fix %(push) for triangular workflows\n>> \n>> Hi Junio,\n>> \n>> I just sent a new version of this series, which drop the second patch for\n>> now. As outlined in my cover letter in\n>> https://public-inbox.org/git/20200406175648.25737-1-damien.olivier.robert+git@gmail.com/\n>> the triangular workflow patch still leaves some corner cases (and for now\n>> is missing reviews).\n>> \n>> I'd prefer to fix all of them at once, rather than have an almost working\n>> patch. Jeff seems to be of the same opinion in\n>> https://public-inbox.org/git/20200406214607.GA1251506@coredump.intra.peff.net/\n>\n> Yeah, I'm sorry I haven't looked at the latest revision of the series.\n> The security fix and some other stuff has been keeping me busy. If\n> somebody else has time to review, please don't wait one me. But\n> otherwise, it is on my list and I'll get to it eventually.\n\nThanks.  In any case, they already are in 'next', so please update\nincrementally.  In an early part of the development cycle of a\ntopic, we tend to avoid building a topic from a horribly broken\nstate and fix things up with pile of \"oops, that was wrong, and here\nis a band-aid\" patches, but once the patches become reviewable shape,\nthe remaining \"issues\" tend to be the ones that are not found without\ncareful reviewing and thinking things through, and it often is easier\nfor later history inspection if the fixes are separate.\n\nThanks.\n"},{"id":"395635","messageId":"20200416224708.zr4dlrz4hpaqsz2s@doriath","threadId":"53240","inReplyTo":"xmqqh7xjxeew.fsf@gitster.c.googlers.com","subject":"Re: What's cooking in git.git (Apr 2020, #01; Wed, 15)","fromName":"Damien Robert","fromEmail":"damien.olivier.robert@gmail.com","sentAt":"2020-04-16T22:47:08Z","receivedAt":"2020-04-16T22:47:16Z","isPatch":false,"sender":{"key":"damien.olivier.robert@gmail.com","avatar":null},"body":"From Junio C Hamano, Thu 16 Apr 2020 at 15:18:47 (-0700) :\n> Thanks.  In any case, they already are in 'next', so please update\n> incrementally.  In an early part of the development cycle of a topic, we\n> tend to avoid building a topic from a horribly broken state and fix\n> things up with pile of \"oops, that was wrong, and here is a band-aid\"\n> patches, but once the patches become reviewable shape, the remaining\n> \"issues\" tend to be the ones that are not found without careful reviewing\n> and thinking things through, and it often is easier for later history\n> inspection if the fixes are separate.\n\nI am a bit confused because in next you picked both the original patch\nfixing the fallback to default %(push:remoteref) behavior, and the new RFC\npatch fixing triangular workflow (which has not yet been reviewed). But\nyour argument seems to indicate you would have preferred two separate topics.\n\nThat's indeed why the patch I sent today drops the triangular workflow\npatch for now.\n\nI think this is my fault, I should have sent the RFC patches fixing the\ntriangular workflow which you picked (along with the original patch\nreviewed by Jeff) in a separate thread, so there were no risk of confusion\n(which was increased by the fact that my cover letter for this indicated\nversion 4 while the patches were actually version 6).\n\nThe triangular workflow patch is not quite correct in the sense that it\ndoes not handle (yet) all cases, but on the other hand you could argue that\nthis is indeed better than the current code which is always wrong in the\ntriangular case.\n\nSorry I did not catch this sooner :-(\n\n-- \nDamien\n"},{"id":"395637","messageId":"20200416230554.bhk2yfycjwjpxggy@doriath","threadId":"53240","inReplyTo":"20200416224708.zr4dlrz4hpaqsz2s@doriath","subject":"Re: What's cooking in git.git (Apr 2020, #01; Wed, 15)","fromName":"Damien Robert","fromEmail":"damien.olivier.robert@gmail.com","sentAt":"2020-04-16T23:05:54Z","receivedAt":"2020-04-16T23:06:07Z","isPatch":false,"sender":{"key":"damien.olivier.robert@gmail.com","avatar":null},"body":"From Damien Robert, Fri 17 Apr 2020 at 00:47:11 (+0200) :\n> The triangular workflow patch is not quite correct in the sense that it\n> does not handle (yet) all cases\n\nHere were the two reasons for the RFC of this patch e3165570dfca690ea1a71518799153f6350777ae\n\n- in is_workflow_triangular I compute the fetch and push remote. But the push\nremote is computed again in branch_get_remote_ref. So we redo an already\ndone computation.\n\n- Also in\nstruct remote *fetch_remote = remote_get(remote_for_branch(branch, NULL));\nI don't check the value of *explicit.\n\nThis means that I get the fallback of 'origin' if no remote is specified.\nSo if I set a pushRemote=\"foobar\" but no remote, then remote.c will\nconsider we are in a triangular workflow but git push will not.\n"},{"id":"395638","messageId":"xmqq4ktjxawx.fsf@gitster.c.googlers.com","threadId":"53240","inReplyTo":"20200416230554.bhk2yfycjwjpxggy@doriath","subject":"Re: What's cooking in git.git (Apr 2020, #01; Wed, 15)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-04-16T23:34:22Z","receivedAt":"2020-04-16T23:34:28Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Damien Robert <damien.olivier.robert@gmail.com> writes:\n\n> Here were the two reasons for the RFC of this patch e3165570dfca690ea1a71518799153f6350777ae\n> ...\n> This means that I get the fallback of 'origin' if no remote is specified.\n> So if I set a pushRemote=\"foobar\" but no remote, then remote.c will\n> consider we are in a triangular workflow but git push will not.\n\nOK, so in short, what is queued in 'next' is quite borked X-<.  I\ndon't mind reverting the merge then.\n\nThanks.\n"},{"id":"395645","messageId":"20200417022416.GE2285@danh.dev","threadId":"53240","inReplyTo":"xmqqr1wo4alb.fsf@gitster.c.googlers.com","subject":"Re: What's cooking in git.git (Apr 2020, #01; Wed, 15)","fromName":"Danh Doan","fromEmail":"congdanhqx@gmail.com","sentAt":"2020-04-17T02:24:16Z","receivedAt":"2020-04-17T02:24:21Z","isPatch":false,"sender":{"key":"congdanhqx@gmail.com","avatar":"https://avatars.githubusercontent.com/u/42673067?v=4"},"body":"On 2020-04-15 16:01:52-0700, Junio C Hamano <gitster@pobox.com> wrote:\n> * dd/iso-8601-updates (2020-04-15) 2 commits\n>  - date.c: allow compact version of ISO-8601 datetime\n>  - date.c: skip fractional second part of ISO-8601\n> \n>  The approxidate parser learns to parse seconds with fraction.\n> \n>  Will merge to 'next'.\n\nI thought we haven't gained enough concious for \"12:34:56.7.days.ago\"\nCurrent code will treat it as \"7 days ago at 12:34:56\"\nNew code will treat it as 12:34:56 (today?)\n\n-- \nDanh\n"},{"id":"395646","messageId":"xmqqr1wmwu2f.fsf@gitster.c.googlers.com","threadId":"53240","inReplyTo":"20200417022416.GE2285@danh.dev","subject":"Re: What's cooking in git.git (Apr 2020, #01; Wed, 15)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-04-17T05:38:16Z","receivedAt":"2020-04-17T05:38:24Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Danh Doan <congdanhqx@gmail.com> writes:\n\n> On 2020-04-15 16:01:52-0700, Junio C Hamano <gitster@pobox.com> wrote:\n>> * dd/iso-8601-updates (2020-04-15) 2 commits\n>>  - date.c: allow compact version of ISO-8601 datetime\n>>  - date.c: skip fractional second part of ISO-8601\n>> \n>>  The approxidate parser learns to parse seconds with fraction.\n>> \n>>  Will merge to 'next'.\n>\n> I thought we haven't gained enough concious for \"12:34:56.7.days.ago\"\n> Current code will treat it as \"7 days ago at 12:34:56\"\n> New code will treat it as 12:34:56 (today?)\n\nYup, it clearly is a regression, and I do not think there is an\nagreement that the regression matters in real life.\n\n"},{"id":"395657","messageId":"20200417125415.6o5avmae3cyvq4fy@feanor","threadId":"53240","inReplyTo":"xmqq4ktjxawx.fsf@gitster.c.googlers.com","subject":"Re: What's cooking in git.git (Apr 2020, #01; Wed, 15)","fromName":"Damien Robert","fromEmail":"damien.olivier.robert@gmail.com","sentAt":"2020-04-17T12:54:15Z","receivedAt":"2020-04-17T12:54:27Z","isPatch":false,"sender":{"key":"damien.olivier.robert@gmail.com","avatar":null},"body":"From Junio C Hamano, Thu 16 Apr 2020 at 16:34:22 (-0700) :\n> > Here were the two reasons for the RFC of this patch e3165570dfca690ea1a71518799153f6350777ae\n> > ...\n> > This means that I get the fallback of 'origin' if no remote is specified.\n> > So if I set a pushRemote=\"foobar\" but no remote, then remote.c will\n> > consider we are in a triangular workflow but git push will not.\n \n> OK, so in short, what is queued in 'next' is quite borked X-<.  I\n> don't mind reverting the merge then.\n\nYes sorry, I never meant for this patch version to be queued up, hence its rfc\nstatus :/\n\nThe reason I sent it as is, as outlined by my cover letter, was that I\nfound it quite surprising that a pushRemote without remote was not\nconsidered by 'git push' as a triangular workflow. Technically a triangular\nworkflow is when the push remote is different from the fetch remote, and we\ncould argue when there is no fetch remote it is indeed the case (I know\nthat was what I was expecting). So I was wondering if we should not change\nthis logic in git push instead.\n\nI'll let you decide if you prefer reverting this merge, or applying the\nfollowing fixup on top of next instead.\n\n--- 8< ---\nFrom 2f9268e2fb6ee280137fb928180882619eb9c3e5 Mon Sep 17 00:00:00 2001\nFrom: Damien Robert <damien.olivier.robert+git@gmail.com>\nDate: Fri, 17 Apr 2020 14:41:02 +0200\nSubject: [PATCH 1/1] remote.c: fix detection of triangular workflow\n\nWhen a branch has a pushRemote but no remote, then git push does not\nconsider this as a triangular workflow.\n\nIn remote.c, since is_workflow_triangular does not check for the *explicit\nvalue, it considers that such a branch is in a triangular workflow\n(except when 'pushRemote=origin' since the default non explicit value of\nfetch_remote is 'origin').\n\nFix that by checking the values of explicit in remote_for_branch and\npushremote_for_branch, and add tests.\n\nSigned-off-by: Damien Robert <damien.olivier.robert+git@gmail.com>\n---\n remote.c                |  9 ++++++---\n t/t6300-for-each-ref.sh | 32 ++++++++++++++++++++++++++++++++\n 2 files changed, 38 insertions(+), 3 deletions(-)\n\ndiff --git a/remote.c b/remote.c\nindex 7c99469598..18a190198a 100644\n--- a/remote.c\n+++ b/remote.c\n@@ -1636,9 +1636,12 @@ static const char *tracking_for_push_dest(struct remote *remote,\n \n static int is_workflow_triangular(struct branch *branch)\n {\n-\tstruct remote *fetch_remote = remote_get(remote_for_branch(branch, NULL));\n-\tstruct remote *push_remote = remote_get(pushremote_for_branch(branch, NULL));\n-\treturn (fetch_remote && push_remote && fetch_remote != push_remote);\n+\tint explicit;\n+\tstruct remote *fetch_remote = remote_get(remote_for_branch(branch, &explicit));\n+\tif (!explicit || !fetch_remote)\n+\t\treturn 0;\n+\tstruct remote *push_remote = remote_get(pushremote_for_branch(branch, &explicit));\n+\treturn (explicit && push_remote && fetch_remote != push_remote);\n }\n \n /**\ndiff --git a/t/t6300-for-each-ref.sh b/t/t6300-for-each-ref.sh\nindex 8e59ab2567..4c01d4406f 100755\n--- a/t/t6300-for-each-ref.sh\n+++ b/t/t6300-for-each-ref.sh\n@@ -945,6 +945,38 @@ test_expect_success '%(push) and %(push:remoteref)' '\n \t\t\t--format=\"%(push:remotename),%(push:remoteref),%(push)\" \\\n \t\t\trefs/heads/master)\" &&\n \t\ttest to,refs/heads/master,refs/remotes/to/master = \"$actual\" &&\n+\t\tactual=\"$(git -c push.default=nothing for-each-ref \\\n+\t\t\t--format=\"%(push:remotename),%(push:remoteref),%(push)\" \\\n+\t\t\trefs/heads/master)\" &&\n+\t\ttest to,, = \"$actual\" &&\n+\t\tgit config --unset branch.master.remote &&\n+\t\tgit config --unset branch.master.merge &&\n+\t\tactual=\"$(git -c push.default=simple for-each-ref \\\n+\t\t\t--format=\"%(push:remotename),%(push:remoteref),%(push)\" \\\n+\t\t\trefs/heads/master)\" &&\n+\t\ttest to,, = \"$actual\" &&\n+\t\tgit config branch.master.merge refs/heads/master &&\n+\t\tactual=\"$(git -c push.default=simple for-each-ref \\\n+\t\t\t--format=\"%(push:remotename),%(push:remoteref),%(push)\" \\\n+\t\t\trefs/heads/master)\" &&\n+\t\ttest to,, = \"$actual\" &&\n+\t\tgit config branch.master.merge refs/heads/other &&\n+\t\tactual=\"$(git -c push.default=simple for-each-ref \\\n+\t\t\t--format=\"%(push:remotename),%(push:remoteref),%(push)\" \\\n+\t\t\trefs/heads/master)\" &&\n+\t\ttest to,, = \"$actual\" &&\n+\t\tactual=\"$(git -c push.default=upstream for-each-ref \\\n+\t\t\t--format=\"%(push:remotename),%(push:remoteref),%(push)\" \\\n+\t\t\trefs/heads/master)\" &&\n+\t\ttest to,, = \"$actual\" &&\n+\t\tactual=\"$(git -c push.default=current for-each-ref \\\n+\t\t\t--format=\"%(push:remotename),%(push:remoteref),%(push)\" \\\n+\t\t\trefs/heads/master)\" &&\n+\t\ttest to,refs/heads/master,refs/remotes/to/master = \"$actual\" &&\n+\t\tactual=\"$(git -c push.default=matching for-each-ref \\\n+\t\t\t--format=\"%(push:remotename),%(push:remoteref),%(push)\" \\\n+\t\t\trefs/heads/master)\" &&\n+\t\ttest to,refs/heads/master,refs/remotes/to/master = \"$actual\" &&\n \t\tactual=\"$(git -c push.default=nothing for-each-ref \\\n \t\t\t--format=\"%(push:remotename),%(push:remoteref),%(push)\" \\\n \t\t\trefs/heads/master)\" &&\n-- \nPatched on top of v2.26.1-301-g55bc3eb7cb (git version 2.26.0)\n"},{"id":"395658","messageId":"20200417133647.GA26701@danh.dev","threadId":"53240","inReplyTo":"xmqqr1wmwu2f.fsf@gitster.c.googlers.com","subject":"Re: What's cooking in git.git (Apr 2020, #01; Wed, 15)","fromName":"Danh Doan","fromEmail":"congdanhqx@gmail.com","sentAt":"2020-04-17T13:36:47Z","receivedAt":"2020-04-17T13:36:52Z","isPatch":false,"sender":{"key":"congdanhqx@gmail.com","avatar":"https://avatars.githubusercontent.com/u/42673067?v=4"},"body":"On 2020-04-16 22:38:16-0700, Junio C Hamano <gitster@pobox.com> wrote:\n> Danh Doan <congdanhqx@gmail.com> writes:\n> \n> > On 2020-04-15 16:01:52-0700, Junio C Hamano <gitster@pobox.com> wrote:\n> >> * dd/iso-8601-updates (2020-04-15) 2 commits\n> >>  - date.c: allow compact version of ISO-8601 datetime\n> >>  - date.c: skip fractional second part of ISO-8601\n> >> \n> >>  The approxidate parser learns to parse seconds with fraction.\n> >> \n> >>  Will merge to 'next'.\n> >\n> > I thought we haven't gained enough concious for \"12:34:56.7.days.ago\"\n> > Current code will treat it as \"7 days ago at 12:34:56\"\n> > New code will treat it as 12:34:56 (today?)\n> \n> Yup, it clearly is a regression, and I do not think there is an\n> agreement that the regression matters in real life.\n> \n\nWell, I _think_ we should keep it in pu to see other's feedback for now.\nEven if we want to advance it to next, I would like to have this fixup\nfor the documentation the first patch.\n\n--------------8<-------------\nSubject: [PATCH] fixup! date.c: skip fractional second part of ISO-8601\n\nSigned-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>\n---\n Documentation/date-formats.txt | 5 ++++-\n 1 file changed, 4 insertions(+), 1 deletion(-)\n\ndiff --git a/Documentation/date-formats.txt b/Documentation/date-formats.txt\nindex 6f69ba2ddd..7e7eaba643 100644\n--- a/Documentation/date-formats.txt\n+++ b/Documentation/date-formats.txt\n@@ -20,7 +20,10 @@ RFC 2822::\n ISO 8601::\n \tTime and date specified by the ISO 8601 standard, for example\n \t`2005-04-07T22:13:13`. The parser accepts a space instead of the\n-\t`T` character as well. The fractional part will be ignored.\n+\t`T` character as well. Fractional parts of a second will be ignored,\n+\tfor example `2005-04-07T22:13:13.019` will be treated as\n+\t`2005-04-07T22:13:13`\n+\n +\n NOTE: In addition, the date part is accepted in the following formats:\n `YYYY.MM.DD`, `MM/DD/YYYY` and `DD.MM.YYYY`.\n-- \nDanh\n"},{"id":"395661","messageId":"xmqq1romvx2q.fsf@gitster.c.googlers.com","threadId":"53240","inReplyTo":"20200417125415.6o5avmae3cyvq4fy@feanor","subject":"Re: What's cooking in git.git (Apr 2020, #01; Wed, 15)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-04-17T17:30:53Z","receivedAt":"2020-04-17T17:30:59Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Damien Robert <damien.olivier.robert@gmail.com> writes:\n\n> The reason I sent it as is, as outlined by my cover letter, was that I\n> found it quite surprising that a pushRemote without remote was not\n> considered by 'git push' as a triangular workflow. Technically a triangular\n> workflow is when the push remote is different from the fetch remote, and we\n> could argue when there is no fetch remote it is indeed the case (I know\n> that was what I was expecting). So I was wondering if we should not change\n> this logic in git push instead.\n\nIf somebody can easily misunderstand how \"push\" makes decision about\n\"triangular\" (I presume builtin/push.c::is_workflow_triangular() is\nwhere that happens?) and changes what gets pushed and to where based\non it, and writes a logic that is different when reporting what\nwould happen when it is pushed out, there probably is a value in\ndocumenting the subtlety in a separate patch, just like you did in\nthe follow-up fix below.\n\nAs long as the fixed-up version is correct or is easily made more\ncorrect, that is.  If the direction the initial patch tried to go\nwas completely wrong and the follow-up needs to take a totally\ndifferent approach, then it may be worth replacing wholesale.\n\nI am not getting an impression that the overall direction was\nwrong, though.\n\n> diff --git a/remote.c b/remote.c\n> index 7c99469598..18a190198a 100644\n> --- a/remote.c\n> +++ b/remote.c\n> @@ -1636,9 +1636,12 @@ static const char *tracking_for_push_dest(struct remote *remote,\n>  \n>  static int is_workflow_triangular(struct branch *branch)\n>  {\n> -\tstruct remote *fetch_remote = remote_get(remote_for_branch(branch, NULL));\n> -\tstruct remote *push_remote = remote_get(pushremote_for_branch(branch, NULL));\n> -\treturn (fetch_remote && push_remote && fetch_remote != push_remote);\n> +\tint explicit;\n> +\tstruct remote *fetch_remote = remote_get(remote_for_branch(branch, &explicit));\n> +\tif (!explicit || !fetch_remote)\n> +\t\treturn 0;\n> +\tstruct remote *push_remote = remote_get(pushremote_for_branch(branch, &explicit));\n> +\treturn (explicit && push_remote && fetch_remote != push_remote);\n>  }\n\nThere is -Wdecl-after-statement error in this function to be\ncorrected, but what the updated logic tries to do seems sensible,\nthat is\n\n - given the \"branch\" we receive, we ask what remote is associated\n   with it, and if it is explicitly configured or just the fallback\n   value.  If it is not configured, we declare the workflow is not\n   triangular regardless of what pushremote is.\n\n - otherwise, i.e. when we do have an explicitly configured remote,\n   we see what pushremote is configured for the branch.  If it is\n   not configured, or is the same as the remote for fetching, it is\n   not triangular.\n\nSeeing the logic in builtin/push.c::is_workflow_triangular(), it is\nimplemented quite differently, but I suspect it largely is because\nthe actual logic \"git push\" uses can rely on the fact that it only\nneeds to deal with the current branch.  It does\n\n        static int is_workflow_triangular(struct remote *remote)\n        {\n                struct remote *fetch_remote = remote_get(NULL);\n                return (fetch_remote && fetch_remote != remote);\n        }\n\nwhere \"remote\" is given by the caller, which is trying to push to\nthe given \"remote\".  We need to make sure the logic they decide what\nremote to push matches what you have above by checking what the\ncaller does, but assuming that the \"remote\" the caller gives is the\nsame as the push_remote you compute above, let's see if the\nfetch_remote they get is the same as what you compute in fetch_remote.\n\nThey use remote.c::remote_get(NULL), which is a thin wrapper around\nremote.c::remote_get_1() and uses remote.c::remote_for_branch() on\nthe current branch.  Whether branch.*.remote is configured or not,\nwhat happens in remote_get_1() is mostly the same (it only affects\nif the url alias processing is done, but the only thing the two\nimplementations of is_workflow_triangular() are interested in is the\nidentity of the struct remote, which is not affected).  The only\ncase, as far as I can see, when their fetch_remote is NULL is when\nthe remote they found did not have any URL for fetching (i.e. when\nvalid_remote() check fails, remote_get_1() returns NULL).  So, yes,\nwhen we are not fetching from the remote, which would be pushed to\nwhen on the branch, it is not triangular.  But in determining it,\nthey did not care if branch.*.remote is explicitly configured.\n\nBut your updated version cares.  Would that introduce behaviour\ndifference, or is it a safe difference that does not matter?\n\nNow, where does the remote parameter in their implementation, which\ncorresponds to push_remote computed in your version, come from?  The\ncaller of is_workflow_triangular() gets it from its caller:\n\n        static void setup_default_push_refspecs(struct remote *remote)\n        {\n                struct branch *branch = branch_get(NULL);\n                int triangular = is_workflow_triangular(remote);\n\nAnd its sole caller is builtin/push.c::do_push(), which in turn got\nit from its caller builtin/push.c::cmd_push().\n\nI think for the purposes of formatting %(push), we should behave as\nif the branch we are formatting it for is the current branch and our\n\"git push\" does not say \"where to\", so what we want to see is what\ntheir version does where \"git push\" with no other arguments pushes\nto the current branch.  cmd_push() asks remote.c::pushremote_get(NULL)\nand let remote_get_1() to use the \"current_branch\", but our code\ncannot afford to rely on that.  We need to tell what branch we are\ninterested in instead.\n\nYours ask pushremote_for_branch() on the branch to obtain a remote,\nand then feed it to remote_get().  That's quite the same as what\nhappens in the earlier part of remote_get_1().  One thing I notice\nis that pushremote_for_branch() depends on remote.c::pushremote_name\nfile-scope static variable correctly read, but that is done at an\nearly part of remote_get_1() by calling read_config(), so I think\nyou are getting the same remote as do_push() is getting.\n\nBut I do not see why the explicit bit matters here.  Wasn't the goal\nto replicate what \"git push\" would do?  Or is there anything more\nsubtle going on?\n\nPuzzled.  \n\nWith the attached stripped-down configuration in a test repository,\nrunning \"git push\" while on 'master' seems to think the workflow is\ntriangular, as builtin/push.c::is_workflow_triangular() sees\nremote->name == \"publish\" and fetch_remote->name == \"origin\" (it is\neasy to see that in a debugger).\n\nIf you drop remote.origin.url from the configuration and run the\nsame experiment, fetch_remote will be NULL, as valid_remote() check\nin remote_get_1() declares that the remote \"origin\", which is\ncreated by default, is invalid without any URL.\n\nSo, are you sure that \"lack of branch.*.remote makes the workflow\ntriangular in push but not your %(push)\" is correct?  Is there\nsomething else going on?\n\nThanks.\n\n---- ---- ---- ---- ---- ---- ---- ---- ---- ---- \n[branch \"master\"]\n\tpushremote = publish\n\n[remote \"publish\"]\n\turl = .\n\n[remote \"origin\"]\n\turl = ../somewhere-else\n---- ---- ---- ---- ---- ---- ---- ---- ---- ---- \n"},{"id":"395662","messageId":"xmqqwo6eui2y.fsf@gitster.c.googlers.com","threadId":"53240","inReplyTo":"20200417133647.GA26701@danh.dev","subject":"Re: What's cooking in git.git (Apr 2020, #01; Wed, 15)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-04-17T17:40:05Z","receivedAt":"2020-04-17T17:40:13Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Danh Doan <congdanhqx@gmail.com> writes:\n\n> On 2020-04-16 22:38:16-0700, Junio C Hamano <gitster@pobox.com> wrote:\n>> Danh Doan <congdanhqx@gmail.com> writes:\n>> \n>> > On 2020-04-15 16:01:52-0700, Junio C Hamano <gitster@pobox.com> wrote:\n>> >> * dd/iso-8601-updates (2020-04-15) 2 commits\n>> >>  - date.c: allow compact version of ISO-8601 datetime\n>> >>  - date.c: skip fractional second part of ISO-8601\n>> >> \n>> >>  The approxidate parser learns to parse seconds with fraction.\n>> >> \n>> >>  Will merge to 'next'.\n>> >\n>> > I thought we haven't gained enough concious for \"12:34:56.7.days.ago\"\n>> > Current code will treat it as \"7 days ago at 12:34:56\"\n>> > New code will treat it as 12:34:56 (today?)\n>> \n>> Yup, it clearly is a regression, and I do not think there is an\n>> agreement that the regression matters in real life.\n>> \n>\n> Well, I _think_ we should keep it in pu to see other's feedback for now.\n\nThanks.  Will mark it as \"On Hold\".\n"},{"id":"395672","messageId":"20200417220445.sasjy4rvzonoz7cn@doriath","threadId":"53240","inReplyTo":"xmqq1romvx2q.fsf@gitster.c.googlers.com","subject":"Re: What's cooking in git.git (Apr 2020, #01; Wed, 15)","fromName":"Damien Robert","fromEmail":"damien.olivier.robert@gmail.com","sentAt":"2020-04-17T22:04:45Z","receivedAt":"2020-04-17T22:04:51Z","isPatch":false,"sender":{"key":"damien.olivier.robert@gmail.com","avatar":null},"body":"Just a quick answeŗ, I'll give a more complete one afterwards.\n\nFrom Junio C Hamano, Fri 17 Apr 2020 at 10:30:53 (-0700) :\n> ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- \n> [branch \"master\"]\n> \tpushremote = publish\n> \n> [remote \"publish\"]\n> \turl = .\n> \n> [remote \"origin\"]\n> \turl = ../somewhere-else\n> ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- \n\nIf you remove the remote \"origin\", then\n\tstruct remote *fetch_remote = remote_get(NULL);\nused by pull.c will return NULL:\n\nit fallbacks to 'origin' which does not exist, so remote_get_1 in\n\tif (!valid_remote(ret))\n\t\treturn NULL;\nreturns NULL\n\nBut is_workflow_triangular in\n\tstruct remote *fetch_remote = remote_get(remote_for_branch(branch, &explicit);\n);\nreturns \"origin\"\n\nThe difference in remote_get_1 is that\n\tname_given = 1;\nSo\n\tif (name_given && !valid_remote(ret))\n\t\tadd_url_alias(ret, name);\ngets called.\n\nBut I think that means that my fixup is actually wrong when a pushRemote is\nset without a remote while 'origin' do exist. I'll need to test. Grmpf!\n\nThanks a lot for the thorough review!\n\n-- \nDamien Robert\nhttp://www.normalesup.org/~robert/pro\n"},{"id":"395675","messageId":"xmqq8sitvgtd.fsf@gitster.c.googlers.com","threadId":"53240","inReplyTo":"20200417220445.sasjy4rvzonoz7cn@doriath","subject":"Re: What's cooking in git.git (Apr 2020, #01; Wed, 15)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-04-17T23:22:06Z","receivedAt":"2020-04-17T23:22:12Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Damien Robert <damien.olivier.robert@gmail.com> writes:\n\n> The difference in remote_get_1 is that\n> \tname_given = 1;\n> So\n> \tif (name_given && !valid_remote(ret))\n> \t\tadd_url_alias(ret, name);\n> gets called.\n\nAh, of course ;-) The code in builtin/push.c rely on being able to\npass NULL as the name and rely on current branch getting used; you\nhave to pass the name of the ref you are trying to format %(push)\nfor, so you would trigger add_url_alias(), which says as a fallback\nthat URL for \"origin\" is \"origin\" and makes ret->url non-NULL (hence\nit no longer is !valid_remote() and gets returned).  \n\nGeez.  This is tricky.\n\n> But I think that means that my fixup is actually wrong when a pushRemote is\n> set without a remote while 'origin' do exist.\n\nThanks.\n"},{"id":"395692","messageId":"20200418173651.djzriazxj5kbo6ax@doriath","threadId":"53240","inReplyTo":"xmqq8sitvgtd.fsf@gitster.c.googlers.com","subject":"Re: What's cooking in git.git (Apr 2020, #01; Wed, 15)","fromName":"Damien Robert","fromEmail":"damien.olivier.robert@gmail.com","sentAt":"2020-04-18T17:36:51Z","receivedAt":"2020-04-18T17:37:24Z","isPatch":false,"sender":{"key":"damien.olivier.robert@gmail.com","avatar":null},"body":"From Junio C Hamano, Fri 17 Apr 2020 at 16:22:06 (-0700) :\n> Ah, of course ;-) The code in builtin/push.c rely on being able to\n> pass NULL as the name and rely on current branch getting used; you\n> have to pass the name of the ref you are trying to format %(push)\n> for, so you would trigger add_url_alias(), which says as a fallback\n> that URL for \"origin\" is \"origin\" and makes ret->url non-NULL (hence\n> it no longer is !valid_remote() and gets returned).  \n\nIndeed, if 'origin' is implicit and does not exists, then\nremote_get(NULL) returns NULL, while\nremote_get(remote_for_branch(current_branch, NULL)) returns the 'origin' remote\n\nLikewise pushremote_get(NULL) will differ from\nremote_get(pushremote_for_branch(current_branch, NULL)) if 'origin' is the\nimplicit push remote and does not exists.\n\nIn particular, there is currently no way to check with remote_get(\"origin\") if\nan implicit 'origin' really exists or not.\n\nWhat we would need to get the same results is an extra parameter to\nremote_get_1 which tells it if the given name was obtained explicitly or\nimplicitly.\n\n\nNow this induces some bugs in the ref-filter machinery.\nFor instance, for %(upstream:remotename) and %(push:remotename), the code\nprints `remote_for_branch(branch, &explicit)` and\n`pushremote_for_branch(branch, &explicit)` respectively only if they are\nexplicit.\n\nBut this is not quite correct, if we think of %(upstream:remotename) as to\n\"which remote would a bare `git fetch` contact when on this branch?\"; then\n'origin' should be printed, provided it really exists.\n\n\n> Geez.  This is tricky.\n> > But I think that means that my fixup is actually wrong when a pushRemote is\n> > set without a remote while 'origin' do exist.\n\nSo here is a test done about whether a triangular setup is detected, when a\nbranch has a pushRemote but no remote and\n1) pushRemote=foobar, origin does not exists\n2) pushRemote=foobar, origin does exists\n3) pushRemote=origin, origin does not exists\n4) pushRemote=origin, origin exists\nin the following cases:\nA) `git push` B) \"%(push)\" with the code currently in next \nC) \"%(push)\" with the fixup I sent D) what I would have expected\n\n  A   B   C   D\n1 no  yes no  yes\n2 yes yes no  yes\n3 no  no  no  no\n4 no  no  no  no\n\nAssuming D is indeed the correct way to go, there are two ways to fix\nis_workflow_triangular in push.c (not tested): one is to replace\n\treturn (fetch_remote && fetch_remote != remote);\nby\n\treturn (!fetch_remote || fetch_remote != remote);\nIndeed in this case we know that the push remote exists, so if the\nfetch_remote does not exists, we know we are in a triangular workflow.\n\nAnother way would be to call \n  fetch_remotename=remote_for_branch(current_branch, &explicit);\nand compare it with remote->name.\n\n\nGoing back to my 'fixup', it is clearly wrong (in the opposite direction of\nwhat is currently in next!). But assuming that 'D' is what we want for\ntriangular workflows, the patch in next is actually correct and it is `git\npush` who is wrong :)\n\n\nAbout the patch currently in next, apart from this situation which is\ntricky to fix as you observed, one thing I may have changed if you had not\ncommited it already is to change\nstatic int is_workflow_triangular(struct branch *branch)\ninto\nstatic int is_workflow_triangular(struct branch *branch, struct remote *push_remote)\nsince all the callers already have the push_remote, this would prevent us from\nrecomputing it. But this can be a separate fix, if you think this does not\nwarrant a revert of the merge.\n\n\nPS: While I am on the subject of bugs in ref-filter.c, for exhaustivity,\nin push.c `setup_push_upstream` checks that\n\t(branch->merge_nr != 1)\nbut this is not done for %(push)\n"}]}