git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v2 0/5] support negative refspecs in git remote show

From
Jacob Keller <jacob.keller@gmail.com>
Date
Jun 16, 2022, 20:54 UTC
Message-ID
<20220616205456.19081-1-jacob.e.keller@intel.com>

This series adds support for negative refspecs to git remote show, fixing an issue reported by Pavel Rappo.

In addition, it includes some cleanup of the t5505-remote.sh test script, focusing on removing subshells and using test_config more.

To support this, test_config and test_unconfig are extended to take and handle more options. The test_config_global is removed in favor of just using test_config --global.

In addition, test_config now passes the value and --fixed-value into test_unconfig so that only the specific value is removed (rather than all keys of the name).

The original v1 can be found here: https://lore.kernel.org/git/20220614003251.16765-1-jacob.e.keller@intel.com/

If the config changes are too controversial, I'm happy to split them out into a separate series for further discussion, or drop them if they aren't desirable.

Changes since v1:
* cleanup t5505 subshells
* modify test_config and test_unconfig to handle additional options
  including --add, --global, and --fixed-value
* make test_config only cleanup keys with exact matching values.
* use test_config more in t5505 to avoid lingering configuration in future tests
* Moved the omit_name_by_refspec call into the already existing fetch_map,
  rather than using two loops. We don't really need to remove these values
  from the fetch_map and it significantly simplifies the code. Thanks Junio!
Jacob Keller (5):
  t5505: remove sub shell use in favor of git -C
  tests: handle --global directly in test_config/test_unconfig
  tests: only automatically unset matching values from test_config
  t5505: use test_config where appropriate
  remote: handle negative refspecs in git remote show
 builtin/remote.c                        |   17 +-
 remote.c                                |    2 +-
 remote.h                                |    6 +
 t/lib-parallel-checkout.sh              |    4 +-
 t/lib-proto-disable.sh                  |   12 +-
 t/lib-submodule-update.sh               |    2 +-
 t/t0001-init.sh                         |   14 +-
 t/t0021-conversion.sh                   |   58 +-
 t/t0210-trace2-normal.sh                |   10 +-
 t/t0211-trace2-perf.sh                  |    4 +-
 t/t0212-trace2-event.sh                 |    2 +-
 t/t1309-early-config.sh                 |    2 +-
 t/t2081-parallel-checkout-collisions.sh |    2 +-
 t/t2082-parallel-checkout-attributes.sh |    4 +-
 t/t3431-rebase-fork-point.sh            |    2 +-
 t/t5505-remote.sh                       | 1083 +++++++++--------------
 t/t5544-pack-objects-hook.sh            |    6 +-
 t/t5550-http-fetch-dumb.sh              |    8 +-
 t/t5573-pull-verify-signatures.sh       |    6 +-
 t/t5606-clone-options.sh                |   10 +-
 t/t5617-clone-submodules-remote.sh      |    4 +-
 t/t5702-protocol-v2.sh                  |    2 +-
 t/t7814-grep-recurse-submodules.sh      |   16 +-
 t/test-lib-functions.sh                 |   85 +-
 24 files changed, 602 insertions(+), 759 deletions(-)
-- 
2.36.1
Next: Jacob Keller
Message 1 of 14 in “support negative refspecs in git remote show”
  1. 0/5 support negative refspecs in git remote showJacob Keller, Jun 16, 2022
  2. 3/5 tests: only automatically unset matching values from test_configJacob Keller, Jun 16, 2022
  3. Junio C HamanoJun 16, 2022
  4. Jacob KellerJun 16, 2022
  5. 4/5 t5505: use test_config where appropriateJacob Keller, Jun 16, 2022
  6. 1/5 t5505: remove sub shell use in favor of git -CJacob Keller, Jun 16, 2022
  7. Junio C HamanoJun 16, 2022
  8. Jacob KellerJun 16, 2022
  9. 2/5 tests: handle --global directly in test_config/test_unconfigJacob Keller, Jun 16, 2022
  10. Junio C HamanoJun 16, 2022
  11. Jacob KellerJun 16, 2022
  12. 5/5 remote: handle negative refspecs in git remote showJacob Keller, Jun 16, 2022
  13. Junio C HamanoJun 16, 2022
  14. Jacob KellerJun 16, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.