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

Re: What's cooking in git.git (Apr 2013, #05; Mon, 15)

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Apr 16, 2013, 05:32 UTC
Message-ID
<CAMP44s3shDEx9dfWw_jNu0zQrReabgAMW-mti86wyoxhk+N2Ow@mail.gmail.com>
In-Reply-To
<7v1uabp109.fsf@alter.siamese.dyndns.org>
On Mon, Apr 15, 2013 at 11:12 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 27 quoted lines
> Felipe Contreras <felipe.contreras@gmail.com> writes:
>
>> So it should be clear now: the remote namespace refs/origin/master is
>> updated, but not the remote helper's namespace
>> refs/testgit/origin/master, which is what I already said. I don't know
>> what more do you expect. When you push 'refs/heads/master' to origin,
>> you expect 'refs/remotes/origin/master' to point to the same commit,
>> same with 'refs/testgit/origin/master', why would you expect to point
>> somewhere else?
>
> Let me play somebody who comes later and wonders about this exchange
> three months down the road...
>
> You mention three refs/ here.  Do they live in the same repository?
> Any Git person is expected to know refs/heads/master, which is "my
> local branch I have worked on and I am pushing".  It also is easy to
> guess what "refs/remotes/origin/master" is, even though we are not
> talking about a usual Git remote.  It is to keep track of the remote
> behind the helper we are pushing into, and is updated to pretend as
> if we fetched immediately from the place we just pushed.  The latter
> being in sync with what we pushed is something that can naturally be
> expected.
>
> Now, what is this third "refs/testgit/origin/master" thing?  Is it
> expected to always be the same as "refs/remotes/origin/master"?  If
> that is the case, why do we even need such a redundant information
> in the first place?

Answering that question is beyond the scope of the commit message. The purpose of the commit message is not to educate people about the current design of transport-helpers, we have Documentation/gitremote-helpers.txt for that. We also have discussions in the mailing list.

The untold answer is 'if you have to ask, you don't understand this code', but if you must, the short answer is: because it doesn't work otherwise.

Yes, in theory not using a remote helper ref namespace should work, but it doesn't, and I sent patches to try to fix this behavior, but those, along with this particular patch, where ignored. So I gave up on those patches that tried to fix the behavior for more corner cases and tried to push the simplest one I could find, still finding trouble. I tried to document that in t/t5801-remote-helpers.sh, although to be honest, the tests that pass can be hardly be considered proper behavior. This is of course, for import/export, which are the only operations I'm familiar with (maybe the namespace makes sense for push/fetch operations.

So basically I'm just tired of explaining the same things over and over again, and if you try to explain every single detail, I think any reasonable person would reach the conclusion that the design doesn't really make sense. But the only person that seems to be trying to explain it and improve it seems to be me.

The commit message is no place to explain all these subtleties, it would be huge and would need to refer to plenty of mails in the mailing list.

I could send the whole patch series I have, and then it might become clearer why not having the refspec doesn't work, but then ,the chances of this patch not getting through would be higher, as the last time I sent such series, it didn't go through.

Cheers.
-- 
Felipe Contreras
Previous: Junio C HamanoNext: Thomas Rast
Message 6 of 85 in “What's cooking in git.git (Apr 2013, #05; Mon, 15)”
  1. Junio C HamanoApr 15, 2013
  2. Felipe ContrerasApr 15, 2013
  3. Junio C HamanoApr 15, 2013
  4. Felipe ContrerasApr 15, 2013
  5. Junio C HamanoApr 16, 2013
  6. Felipe ContrerasApr 16, 2013
  7. Thomas RastApr 16, 2013
  8. Felipe ContrerasApr 16, 2013
  9. Junio C HamanoApr 16, 2013
  10. Felipe ContrerasApr 16, 2013
  11. Phil HordApr 16, 2013
  12. Felipe ContrerasApr 16, 2013
  13. Phil HordApr 16, 2013
  14. Junio C HamanoApr 17, 2013
  15. Felipe ContrerasApr 17, 2013
  16. Junio C HamanoApr 17, 2013
  17. Felipe ContrerasApr 18, 2013
  18. Matthieu MoyApr 18, 2013
  19. Felipe ContrerasApr 18, 2013
  20. Ramkumar RamachandraApr 18, 2013
  21. Felipe ContrerasApr 18, 2013
  22. Ramkumar RamachandraApr 18, 2013
  23. Felipe ContrerasApr 18, 2013
  24. Ramkumar RamachandraApr 18, 2013
  25. Felipe ContrerasApr 18, 2013
  26. Ramkumar RamachandraApr 18, 2013
  27. Felipe ContrerasApr 18, 2013
  28. Ramkumar RamachandraApr 23, 2013
  29. Felipe ContrerasApr 23, 2013
  30. Phil HordApr 18, 2013
  31. Felipe ContrerasApr 18, 2013
  32. Phil HordApr 19, 2013
  33. Felipe ContrerasApr 20, 2013
  34. Jeff KingApr 15, 2013
  35. Øyvind A. HolmApr 15, 2013
  36. Jeff KingApr 16, 2013
  37. Jeff KingApr 16, 2013
  38. Eric SunshineApr 16, 2013
  39. Junio C HamanoApr 16, 2013
  40. Drew NorthupApr 16, 2013
  41. "What's cooking" between #05 and #06Junio C Hamano, Apr 16, 2013
  42. John KeepingApr 17, 2013
  43. Junio C HamanoApr 17, 2013
  44. Jens LehmannApr 17, 2013
  45. John KeepingApr 18, 2013
  46. Lukas FleischerApr 17, 2013
  47. Junio C HamanoApr 17, 2013
  48. Thomas RastApr 17, 2013
  49. Junio C HamanoApr 17, 2013
  50. Thomas RastApr 17, 2013
  51. Junio C HamanoApr 17, 2013
  52. Junio C HamanoApr 17, 2013
  53. Jeff KingApr 17, 2013
  54. Junio C HamanoApr 18, 2013
  55. git add <pathspec>... defaults to "-A"Junio C Hamano, Apr 18, 2013
  56. Jeff KingApr 18, 2013
  57. Junio C HamanoApr 18, 2013
  58. Jeff KingApr 18, 2013
  59. Junio C HamanoApr 18, 2013
  60. Jeff KingApr 18, 2013
  61. Junio C HamanoApr 18, 2013
  62. Jeff KingApr 18, 2013
  63. Junio C HamanoApr 18, 2013
  64. Jeff KingApr 19, 2013
  65. Jonathan NiederApr 19, 2013
  66. Junio C HamanoApr 19, 2013
  67. Jeff KingApr 19, 2013
  68. Junio C HamanoApr 19, 2013
  69. jc/add-2.0-delete-default (Re: What's cooking in git.git (Apr 2013, #05; Mon, 15))Jonathan Nieder, Apr 21, 2013
  70. Junio C HamanoApr 22, 2013
  71. Junio C HamanoApr 22, 2013
  72. 0/2 "git add -A/--no-all" finishing touchesJunio C Hamano, Apr 22, 2013
  73. 1/2 git add: --ignore-removal is a better named --no-allJunio C Hamano, Apr 22, 2013
  74. 2/2 git add: rephrase -A/--no-all warningJunio C Hamano, Apr 22, 2013
  75. 3/2 git add <pathspec>... defaults to "-A"Junio C Hamano, Apr 22, 2013
  76. Eric SunshineApr 23, 2013
  77. Junio C HamanoApr 25, 2013
  78. Junio C HamanoApr 25, 2013
  79. Jonathan NiederApr 25, 2013
  80. Junio C HamanoApr 25, 2013
  81. Junio C HamanoApr 25, 2013
  82. Jonathan NiederApr 25, 2013
  83. Junio C HamanoApr 26, 2013
  84. Junio C HamanoApr 26, 2013
  85. Jonathan NiederApr 26, 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.