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

Re: Minor annoyance with git push

From
Jeff King <peff@peff.net>
Date
Feb 20, 2008, 18:15 UTC
Message-ID
<20080220181513.GA16289@sigill.intra.peff.net>
In-Reply-To
<7vk5kz7btw.fsf@gitster.siamese.dyndns.org>
On Wed, Feb 20, 2008 at 09:54:35AM -0800, Junio C Hamano wrote:
Show 13 quoted lines
> > +++ b/builtin-push.c
> > @@ -68,8 +68,7 @@ static int do_push(const char *repo, int flags)
> >  	if (!refspec
> >  		&& !(flags & TRANSPORT_PUSH_ALL)
> >  		&& remote->push_refspec_nr) {
> > -		refspec = remote->push_refspec;
> > -		refspec_nr = remote->push_refspec_nr;
> > +		set_refspecs(remote->push_refspec, remote->push_refspec_nr);
> >  	}
> >  	errs = 0;
> >  	for (i = 0; i < remote->url_nr; i++) {
> 
> Yeah, we are on the same page.  See the patch I sent out last night ;-)

Meaning you will take this patch? (And yes, I think the "+HEAD" patch you sent is a good fix, regardless of everything else we've talked about).

Show 10 quoted lines
> > How are you detecting that the remote is a shared repository?
> 
> I am not.  I only said "... may even be able to" ;-).
> 
> The autodetection is not even the first step to tackle this
> issue anyway.  The "HEAD" magic (or if somebody comes up with a
> better design, that one) comes first, deciding if such an
> autodetection is even a good idea comes next, and then iff we
> decide that it is a good idea finally comes the task of finding
> out how we do so.

Didn't the "HEAD" magic just come? :) Is there some part of that that you are unhappy with?

> I'd presume that the upload-pack side can internally check "int
> shared_repository" and the protocol extension that conveys that
> information to the other end is easy enough.  As always, dumb
> transports are second class citizens and need their own hacks.
Reasonable.
Show 6 quoted lines
> > By the core.sharedrepository config option? I use several
> > shared repositories, and I never set that variable; instead
> > ...
> 
> It is _your_ problem that you do not use published interface,
> isn't it?

I would agree with you if core.sharedRepository had ever been introduced as a signal flag for a particular workflow, and not simply as a way to set up the umask.

If you want to introduce those semantics to sharedRepository, that is not unreasonable, but:

  - recognize that you don't automagically turn on this feature for
    repositories using the shared workflow, since they may or may not
    even have this flag enabled
  - recognize that people who _do_ want this new behavior might not want
    the umask side effects (and in fact, those side effects can reduce
    security if the users are in a group with untrusted users)

so I think that a new config option is probably safer, and not necessarily less likely to work automatically.

That being said, I think this sort of automatic detection should wait at least one release cycle. Once the behavior is configurable at all, we can see how people adopt it into their workflows and if there is really any desire for detection at all.

-Peff
Previous: Junio C HamanoNext: Jeff King
Message 60 of 71 in “Minor annoyance with git push”
  1. Martin LanghoffFeb 8, 2008
  2. Martin LanghoffFeb 8, 2008
  3. Junio C HamanoFeb 8, 2008
  4. Steffen ProhaskaFeb 9, 2008
  5. Junio C HamanoFeb 10, 2008
  6. Johannes SchindelinFeb 10, 2008
  7. Johannes SchindelinFeb 8, 2008
  8. Martin LanghoffFeb 8, 2008
  9. Mike HommeyFeb 8, 2008
  10. SeanFeb 8, 2008
  11. Steffen ProhaskaFeb 8, 2008
  12. Johannes SchindelinFeb 8, 2008
  13. Martin LanghoffFeb 8, 2008
  14. Johannes SchindelinFeb 8, 2008
  15. Jeff KingFeb 9, 2008
  16. Jeff KingFeb 9, 2008
  17. Johannes SchindelinFeb 9, 2008
  18. Jeff KingFeb 9, 2008
  19. Steffen ProhaskaFeb 9, 2008
  20. Jeff KingFeb 9, 2008
  21. Junio C HamanoFeb 9, 2008
  22. Jeff KingFeb 9, 2008
  23. Martin LanghoffFeb 9, 2008
  24. Johannes SchindelinFeb 9, 2008
  25. Junio C HamanoFeb 10, 2008
  26. Jeff KingFeb 10, 2008
  27. Johannes SchindelinFeb 10, 2008
  28. [RFC] checkout to notice forks (Re: Minor annoyance with git push)Junio C Hamano, Feb 17, 2008
  29. Daniel BarkalowFeb 17, 2008
  30. Junio C HamanoFeb 17, 2008
  31. Daniel BarkalowFeb 17, 2008
  32. Junio C HamanoFeb 17, 2008
  33. Daniel BarkalowFeb 17, 2008
  34. Jeff KingFeb 17, 2008
  35. Santi BéjarFeb 20, 2008
  36. Martin LanghoffFeb 19, 2008
  37. checkout: tone down the "forked status" diagnostic messagesJunio C Hamano, Feb 20, 2008
  38. Jeff KingFeb 21, 2008
  39. checkout: updates to tracking reportJunio C Hamano, Feb 21, 2008
  40. Jay SoffianFeb 21, 2008
  41. Daniel BarkalowFeb 21, 2008
  42. Jay SoffianFeb 21, 2008
  43. Steffen ProhaskaFeb 9, 2008
  44. Johannes SchindelinFeb 9, 2008
  45. Junio C HamanoFeb 10, 2008
  46. Johannes SchindelinFeb 10, 2008
  47. Jeff KingFeb 10, 2008
  48. Johannes SchindelinFeb 10, 2008
  49. Jeff KingFeb 10, 2008
  50. Johannes SchindelinFeb 10, 2008
  51. Jeff KingFeb 10, 2008
  52. Junio C HamanoFeb 20, 2008
  53. Johannes SchindelinFeb 20, 2008
  54. Jay SoffianFeb 20, 2008
  55. Johannes SchindelinFeb 20, 2008
  56. Steven WalterFeb 21, 2008
  57. Johannes SchindelinFeb 22, 2008
  58. Jeff KingFeb 20, 2008
  59. Junio C HamanoFeb 20, 2008
  60. Jeff KingFeb 20, 2008
  61. Jeff KingFeb 20, 2008
  62. Junio C HamanoFeb 20, 2008
  63. Jeff KingFeb 20, 2008
  64. Wincent ColaiutaFeb 10, 2008
  65. Steven WalterFeb 10, 2008
  66. Johannes SchindelinFeb 10, 2008
  67. Johannes SchindelinFeb 10, 2008
  68. Wincent ColaiutaFeb 10, 2008
  69. Jeff KingFeb 10, 2008
  70. Junio C HamanoFeb 10, 2008
  71. Jeff KingFeb 10, 2008

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.