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

[PATCH 0/2] Fix remote_is_configured()

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jan 17, 2017, 21:18 UTC
Message-ID
<cover.1484687919.git.johannes.schindelin@gmx.de>

A surprising behavior triggered the bug report in https://github.com/git-for-windows/git/issues/888: the mere existence of the config setting "remote.origin.prune" (in this instance, configured via ~/.gitconfig so that it applies to all repositories) fooled `git remote rename <source> <target>` into believing that the <target> remote is already there.

This patch pair demonstrates the problem, and then fixes it (along with potential similar problems, such as setting an HTTP proxy for remotes of a given name via ~/.gitconfig).

Johannes Schindelin (2):
  remote rename: demonstrate a bogus "remote exists" bug
  Be more careful when determining whether a remote was configured
 remote.c          | 9 ++++++++-
 remote.h          | 2 +-
 t/t5505-remote.sh | 9 +++++++++
 3 files changed, 18 insertions(+), 2 deletions(-)
base-commit: d7dffce1cebde29a0c4b309a79e4345450bf352a
Published-As: https://github.com/dscho/git/releases/tag/rename-remote-v1
Fetch-It-Via: git fetch https://github.com/dscho/git rename-remote-v1
-- 
2.11.0.windows.3
Next: Johannes Schindelin
Message 1 of 21 in “Fix remote_is_configured()”
  1. 0/2 Fix remote_is_configured()Johannes Schindelin, Jan 17, 2017
  2. 1/2 remote rename: demonstrate a bogus "remote exists" bugJohannes Schindelin, Jan 17, 2017
  3. 2/2 Be more careful when determining whether a remote was configuredJohannes Schindelin, Jan 17, 2017
  4. Jeff KingJan 17, 2017
  5. Junio C HamanoJan 17, 2017
  6. Johannes SchindelinJan 18, 2017
  7. Johannes SchindelinJan 18, 2017
  8. Jeff KingJan 18, 2017
  9. Johannes SchindelinJan 18, 2017
  10. Jeff KingJan 19, 2017
  11. Junio C HamanoJan 19, 2017
  12. Jeff KingJan 19, 2017
  13. Johannes SchindelinJan 19, 2017
  14. Jeff KingJan 17, 2017
  15. 0/2 Fix remote_is_configured()Johannes Schindelin, Jan 19, 2017
  16. 1/2 remote rename: demonstrate a bogus "remote exists" bugJohannes Schindelin, Jan 19, 2017
  17. 2/2 Be more careful when determining whether a remote was configuredJohannes Schindelin, Jan 19, 2017
  18. Jeff KingJan 19, 2017
  19. Johannes SchindelinJan 19, 2017
  20. Junio C HamanoJan 19, 2017
  21. Jeff KingJan 19, 2017

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.