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

[BUG] clone: regression in error messages in master

From
Ramkumar Ramachandra <artagnon@gmail.com>
Date
Jun 20, 2013, 13:16 UTC
Message-ID
<CALkWK0n7S8s-ABQ1qV5JSsyhYo6=rmK1UT+uYW9hjjeWjambug@mail.gmail.com>
Hi,
So this should explain the problem:
  # using v1.8.3.1
  $ git clone https://google.com
  Cloning into 'google.com'...
  fatal: repository 'https://google.com/' not found
  # using master
  $ git clone https://google.com
  Cloning into 'google.com'...
  fatal: repository 'https://google.com/' not found
  fatal: Reading from helper 'git-remote-https' failed

To figure out where the regression was coming from, I ran a bisect with this script:

  #!/bin/sh
  make clean &&
  make -j 8 &&
  cd t &&
  sh -v -i clone-message.sh
where clone-message.sh is:
  test_description=clone-message
  . ./test-lib.sh
  test_expect_success setup '
  	rm -fr .git &&
  	test_create_repo src &&
  	(
  		cd src &&
  		>file &&
  		git add file &&
  		git commit -m initial &&
  		echo 1 >file &&
  		git add file &&
  		git commit -m updated
  	)
  '
  test_expect_success 'clone invalid URL' '
  	rm -fr dst &&
  	test_must_fail git clone https://google.com 2>msg &&
  	test_i18ngrep "repository .* not found" msg &&
  	! test_i18ngrep "git-remote-https" msg
  '
  test_done

The bisect pointed me to: 81d340d4 (transport-helper: report errors properly, 2013-04-10).

  $ git clone https://google.com
  Cloning into 'google.com'...
  fatal: https://google.com/info/refs?service=git-upload-pack not
found: did you run git update-server-info on the server?
  fatal: Reading from remote helper failed

What?! Okay, the last "Reading from remote helper failed" was introduced by this commit; my clone-message.sh has a bug. So I commented out the first test_i18ngrep and ran it. Result: c096955 (transport-helper: mention helper name when it dies, 2013-04-10). This is not the real culprit: it just changed the message string that 81d340d4 originally introduced.

Okay, so am I reporting a valid bug? Going through remote-curl, I can see that it dies in remote-curl.c:213 if HTTP_TARGET_MISSING. If that is the case, what is the point of printing the second message about the remote helper program not being present?

Thanks.
Next: Jeff King
Message 1 of 9 in “[BUG] clone: regression in error messages in master”
  1. Ramkumar RamachandraJun 20, 2013
  2. Jeff KingJun 20, 2013
  3. Ramkumar RamachandraJun 21, 2013
  4. Ramkumar RamachandraJun 21, 2013
  5. Jeff KingJun 21, 2013
  6. Junio C HamanoJun 21, 2013
  7. John SzakmeisterJun 21, 2013
  8. Junio C HamanoJun 21, 2013
  9. John SzakmeisterJun 22, 2013

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.