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

Re: [RFC/PATCH] git-remote-mediawiki: reset private ref after non-dumb push

From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Date
Aug 26, 2013, 08:48 UTC
Message-ID
<vpqhaeckfbh.fsf@anie.imag.fr>
In-Reply-To
<xmqq61uumnsz.fsf@gitster.dls.corp.google.com>
Junio C Hamano <gitster@pobox.com> writes:
Show 15 quoted lines
> Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:
>
>> How would I do that? The update to the remote namespace is done by Git,
>> not by the remote-helper.
>>
>> OK, I'm now convinced that my solution is the right one. The
>> alternatives are far more complex and I still fail to see the benefits.
>
> Sounds like a plan, even though it smells like the "update is done
> by Git" that does not have any way to opt-out may be the real design
> mistake and your "solution" is a work-around to that.
>
> Would it be a possibility to make it tunable, perhaps by introducing
> a capability on the remote-interface side that allows you to tell it
> not to mess with the remote namespace?

Ideally, it would be possible to ask for a non-update without a fatal error on old Git versions, but this is not possible (hence, my fix is the "portable" one, that works on Git 1.8.4).

But that's probably the best we can do now.
> If we were doing this from scratch, I would suspect that we would have
> made the capability work the other way around (Git does not do the
> update by default, but helpers c an ask Git to do so).

Not updating was the default until 664059fb62 (i.e. until 1.8.4), so the default already changed once. I tend to agree with Felipe that doing the update by default makes sense.

git-remote-mediawiki is kind of a special case, as the remote side uses a very different data model, hence it can make sense to export+reimport to get locally what the remote side received. But when interacting with something closer to Git (bzr, hg, ...), the mapping should be close to 1-1 and re-importing wouldn't make sense.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Previous: Junio C HamanoNext: Matthieu Moy
Message 9 of 28 in “git-remote-mediawiki: reset private ref after non-dumb push”
  1. git-remote-mediawiki: reset private ref after non-dumb pushMatthieu Moy, Aug 13, 2013
  2. Felipe ContrerasAug 21, 2013
  3. Matthieu MoyAug 21, 2013
  4. Felipe ContrerasAug 22, 2013
  5. Matthieu MoyAug 23, 2013
  6. Felipe ContrerasAug 23, 2013
  7. Matthieu MoyAug 24, 2013
  8. Junio C HamanoAug 25, 2013
  9. Matthieu MoyAug 26, 2013
  10. Matthieu MoyAug 26, 2013
  11. Felipe ContrerasAug 26, 2013
  12. Matthieu MoyAug 27, 2013
  13. 1/4 git-remote-mediawiki: add test and check Makefile targetsMatthieu Moy, Aug 29, 2013
  14. 2/4 transport-helper: add dont-update-private capabilityMatthieu Moy, Aug 29, 2013
  15. Felipe ContrerasAug 29, 2013
  16. 1/4 git-remote-mediawiki: add test and check Makefile targetsMatthieu Moy, Sep 2, 2013
  17. 2/4 transport-helper: add no-private-update capabilityMatthieu Moy, Sep 2, 2013
  18. Felipe ContrerasSep 2, 2013
  19. 2/4 transport-helper: add dont-update-private capabilityMatthieu Moy, Sep 2, 2013
  20. 2/4 transport-helper: add no-private-update capabilityMatthieu Moy, Sep 3, 2013
  21. 3/4 git-remote-mediawiki: use no-private-update capability on dumb pushMatthieu Moy, Sep 2, 2013
  22. 4/4 git-remote-mediawiki: no need to update private ref in non-dumb pushMatthieu Moy, Sep 2, 2013
  23. 3/4 git-remote-mediawiki: use dont-update-private capability on dumb pushMatthieu Moy, Aug 29, 2013
  24. Junio C HamanoAug 29, 2013
  25. 4/4 git-remote-mediawiki: no need to update private ref in non-dumb pushMatthieu Moy, Aug 29, 2013
  26. Junio C HamanoAug 29, 2013
  27. Junio C HamanoAug 26, 2013
  28. Matthieu MoyAug 27, 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.