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

Re: [PATCH v4 00/10] nd/clone-detached

From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Date
Jan 14, 2012, 07:40 UTC
Message-ID
<20120114074036.GA27256@do>
In-Reply-To
<7vhazyyduw.fsf@alter.siamese.dyndns.org>
On Fri, Jan 13, 2012 at 10:53:11PM -0800, Junio C Hamano wrote:
Show 15 quoted lines
> Nguyen Thai Ngoc Duy <pclouds@gmail.com> writes:
> 
> > 2012/1/14 Junio C Hamano <gitster@pobox.com>:
> >> Thanks, replaced (and updated comment strings read much better).
> >>
> >> There were some conlicts I had to resolve while merging this to 'pu'.
> >> I would appreciate it if you can eyeball it to make sure I didn't make
> >> silly mistakes there.
> >
> > Right, the conflict with nd/clone-single-branch. I kept thinking there
> > would not be conflict because clone-single-branch's big change was in
> > wanted_peer_refs() and missed write_followtags() call. The merge looks
> > good.
> 
> Hmm, 'pu' seems to fail its selftest with this merge present, though.

The commit "refuse to clone if --branch points to bogus ref" from this series changes clone's behavior that t5500.31, which is added in nd/clone-single-branch, relies on. This makes "make test" pass for me on pu:

-- 8< --
diff --git a/t/t5500-fetch-pack.sh b/t/t5500-fetch-pack.sh
index 7e85c71..c4e675f 100755
--- a/t/t5500-fetch-pack.sh
+++ b/t/t5500-fetch-pack.sh
@@ -283,10 +283,7 @@ test_expect_success 'clone shallow object count' '
 '
 
 test_expect_success 'clone shallow with nonexistent --branch' '
-	git clone --depth 1 --branch Z "file://$(pwd)/." shallow4 &&
-	GIT_DIR=shallow4/.git git rev-parse HEAD >actual &&
-	git rev-parse HEAD >expected &&
-	test_cmp expected actual
+	test_must_fail git clone --depth 1 --branch Z "file://$(pwd)/." shallow4
 '
 
 test_expect_success 'clone shallow with detached HEAD' '
-- 8< --

I'd rather remove the test, but removing something in a merge does not
sound wise.

Another cleaner approach is to combine the two clone series into
one. If you want to go this way, pick one as base, I'll rebase the
other on top and resend.
-- 
Duy
Previous: Junio C HamanoNext: Junio C Hamano
Message 27 of 68 in “clone: allow detached checkout when --branch takes a tag”
  1. clone: allow detached checkout when --branch takes a tagNguyễn Thái Ngọc Duy, Jan 5, 2012
  2. Jeff KingJan 5, 2012
  3. Nguyen Thai Ngoc DuyJan 6, 2012
  4. Jeff KingJan 6, 2012
  5. Junio C HamanoJan 5, 2012
  6. Nguyen Thai Ngoc DuyJan 6, 2012
  7. 1/6 t5601: add &&Nguyễn Thái Ngọc Duy, Jan 8, 2012
  8. 2/6 clone: write detached HEAD in bare repositoriesNguyễn Thái Ngọc Duy, Jan 8, 2012
  9. 3/6 clone: factor out checkout codeNguyễn Thái Ngọc Duy, Jan 8, 2012
  10. Junio C HamanoJan 10, 2012
  11. Nguyen Thai Ngoc DuyJan 10, 2012
  12. Junio C HamanoJan 10, 2012
  13. Nguyen Thai Ngoc DuyJan 10, 2012
  14. 4/6 clone: --branch=<branch> always means refs/heads/<branch>Nguyễn Thái Ngọc Duy, Jan 8, 2012
  15. Junio C HamanoJan 10, 2012
  16. 5/6 clone: allow --branch to take a tagNguyễn Thái Ngọc Duy, Jan 8, 2012
  17. 6/6 clone: print advice on checking out detached HEADNguyễn Thái Ngọc Duy, Jan 8, 2012
  18. Junio C HamanoJan 10, 2012
  19. Nguyen Thai Ngoc DuyJan 10, 2012
  20. Junio C HamanoJan 10, 2012
  21. Nguyen Thai Ngoc DuyJan 10, 2012
  22. 00/10 nd/clone-detachedNguyễn Thái Ngọc Duy, Jan 10, 2012
  23. 00/10 nd/clone-detachedNguyễn Thái Ngọc Duy, Jan 13, 2012
  24. Junio C HamanoJan 13, 2012
  25. Nguyen Thai Ngoc DuyJan 14, 2012
  26. Junio C HamanoJan 14, 2012
  27. Nguyen Thai Ngoc DuyJan 14, 2012
  28. Junio C HamanoJan 15, 2012
  29. 00/10 nd/clone-detached rebase onto nd/clone-single-branchNguyễn Thái Ngọc Duy, Jan 16, 2012
  30. 01/10 t5601: add missing && cascadeNguyễn Thái Ngọc Duy, Jan 16, 2012
  31. 02/10 clone: write detached HEAD in bare repositoriesNguyễn Thái Ngọc Duy, Jan 16, 2012
  32. 03/10 clone: factor out checkout codeNguyễn Thái Ngọc Duy, Jan 16, 2012
  33. 04/10 clone: factor out HEAD update codeNguyễn Thái Ngọc Duy, Jan 16, 2012
  34. 05/10 clone: factor out remote ref writingNguyễn Thái Ngọc Duy, Jan 16, 2012
  35. 06/10 clone: delay cloning until after remote HEAD checkingNguyễn Thái Ngọc Duy, Jan 16, 2012
  36. 07/10 clone: --branch=<branch> always means refs/heads/<branch>Nguyễn Thái Ngọc Duy, Jan 16, 2012
  37. 08/10 clone: refuse to clone if --branch points to bogus refNguyễn Thái Ngọc Duy, Jan 16, 2012
  38. 09/10 clone: allow --branch to take a tagNguyễn Thái Ngọc Duy, Jan 16, 2012
  39. 10/10 clone: print advice on checking out detached HEADNguyễn Thái Ngọc Duy, Jan 16, 2012
  40. 01/10 t5601: add missing && cascadeNguyễn Thái Ngọc Duy, Jan 13, 2012
  41. 02/10 clone: write detached HEAD in bare repositoriesNguyễn Thái Ngọc Duy, Jan 13, 2012
  42. 03/10 clone: factor out checkout codeNguyễn Thái Ngọc Duy, Jan 13, 2012
  43. 04/10 clone: factor out HEAD update codeNguyễn Thái Ngọc Duy, Jan 13, 2012
  44. 05/10 clone: factor out remote ref writingNguyễn Thái Ngọc Duy, Jan 13, 2012
  45. 06/10 clone: delay cloning until after remote HEAD checkingNguyễn Thái Ngọc Duy, Jan 13, 2012
  46. 07/10 clone: --branch=<branch> always means refs/heads/<branch>Nguyễn Thái Ngọc Duy, Jan 13, 2012
  47. 08/10 clone: refuse to clone if --branch points to bogus refNguyễn Thái Ngọc Duy, Jan 13, 2012
  48. 09/10 clone: allow --branch to take a tagNguyễn Thái Ngọc Duy, Jan 13, 2012
  49. 10/10 clone: print advice on checking out detached HEADNguyễn Thái Ngọc Duy, Jan 13, 2012
  50. 01/10 t5601: add missing && cascadeNguyễn Thái Ngọc Duy, Jan 10, 2012
  51. 02/10 clone: write detached HEAD in bare repositoriesNguyễn Thái Ngọc Duy, Jan 10, 2012
  52. 03/10 clone: factor out checkout codeNguyễn Thái Ngọc Duy, Jan 10, 2012
  53. 04/10 clone: factor out HEAD update codeNguyễn Thái Ngọc Duy, Jan 10, 2012
  54. 05/10 clone: factor out remote ref writingNguyễn Thái Ngọc Duy, Jan 10, 2012
  55. 06/10 clone: delay cloning until after remote HEAD checkingNguyễn Thái Ngọc Duy, Jan 10, 2012
  56. Junio C HamanoJan 11, 2012
  57. Nguyen Thai Ngoc DuyJan 12, 2012
  58. Junio C HamanoJan 24, 2012
  59. Junio C HamanoJan 24, 2012
  60. Junio C HamanoJan 24, 2012
  61. Nguyen Thai Ngoc DuyJan 24, 2012
  62. 07/10 clone: --branch=<branch> always means refs/heads/<branch>Nguyễn Thái Ngọc Duy, Jan 10, 2012
  63. Junio C HamanoJan 11, 2012
  64. Nguyen Thai Ngoc DuyJan 12, 2012
  65. 08/10 clone: refuse to clone if --branch points to bogus refNguyễn Thái Ngọc Duy, Jan 10, 2012
  66. 09/10 clone: allow --branch to take a tagNguyễn Thái Ngọc Duy, Jan 10, 2012
  67. Junio C HamanoJan 11, 2012
  68. 10/10 clone: print advice on checking out detached HEADNguyễn Thái Ngọc Duy, Jan 10, 2012

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.