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

Re: git pull for update of netdev fails.

From
Shawn Pearce <spearce@spearce.org>
Date
Sep 20, 2006, 21:53 UTC
Message-ID
<20060920215318.GG24415@spearce.org>
In-Reply-To
<7vodtafc4g.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano <junkio@cox.net> wrote:
Show 8 quoted lines
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> 
> > I'd rather set another config variable with --shared, which tells git to 
> > refuse receiving non-fast-forwards. This could be a sensible setting in 
> > other setups than shared ones after all. Thoughts?
> 
> If this option is meant to forbid fixing up an screw-up by doing
> "git-push --force", I do not quite like it.
Yes, it is meant for stopping exactly that.

As the repository owner with direct access to the repository I don't want anyone to be able to use --force to reset a branch. If a branch reset needs to happen I want to do it directly on the repository. Its a rather destructive operation, as we have been saying. I don't want a user slamming in "--force" just because.

On the other hand you can also configure the option to allow `git push --force` and craft a smart update hook which looks at who is doing the push and if that is permissible to the ref in question; exit'ing non-zero if not.

Basically I don't see why an update hook should be necessary to disallow all non-fast forward pushes.

> It sounds as if arguing that "rm -fr" is dangerous so presence
> of -f and -r at the same time should imply -i option.  I think
> the right answer is not making -i implied, but train the user to
> understand what -fr means before using it.
Some people cannot be trained.  No matter how hard you may try.
-- 
Shawn.
Previous: Johannes SchindelinNext: Shawn Pearce
Message 16 of 43 in “git pull for update of netdev fails.”
  1. Stephen HemmingerSep 20, 2006
  2. Linus TorvaldsSep 20, 2006
  3. Petr BaudisSep 20, 2006
  4. Johannes SchindelinSep 20, 2006
  5. Petr BaudisSep 20, 2006
  6. Linus TorvaldsSep 20, 2006
  7. Linus TorvaldsSep 20, 2006
  8. Shawn PearceSep 20, 2006
  9. Linus TorvaldsSep 20, 2006
  10. Shawn PearceSep 20, 2006
  11. Johannes SchindelinSep 20, 2006
  12. Shawn PearceSep 20, 2006
  13. Johannes SchindelinSep 20, 2006
  14. Junio C HamanoSep 20, 2006
  15. Johannes SchindelinSep 20, 2006
  16. Shawn PearceSep 20, 2006
  17. Shawn PearceSep 20, 2006
  18. Shawn PearceSep 20, 2006
  19. Linus TorvaldsSep 20, 2006
  20. Johannes SchindelinSep 20, 2006
  21. Shawn PearceSep 20, 2006
  22. Johannes SchindelinSep 20, 2006
  23. Shawn PearceSep 20, 2006
  24. Jakub NarebskiSep 20, 2006
  25. Petr BaudisSep 23, 2006
  26. Shawn PearceSep 23, 2006
  27. Petr BaudisSep 23, 2006
  28. Catalin MarinasSep 23, 2006
  29. Catalin MarinasSep 23, 2006
  30. Petr BaudisSep 24, 2006
  31. Catalin MarinasSep 25, 2006
  32. Junio C HamanoSep 20, 2006
  33. Petr BaudisSep 20, 2006
  34. Linus TorvaldsSep 20, 2006
  35. Jakub NarebskiSep 20, 2006
  36. Linus TorvaldsSep 20, 2006
  37. Shawn PearceSep 20, 2006
  38. Linus TorvaldsSep 20, 2006
  39. Krzysztof HalasaSep 20, 2006
  40. Petr BaudisSep 23, 2006
  41. Jakub NarebskiSep 20, 2006
  42. Johannes SchindelinSep 21, 2006
  43. Jeff GarzikSep 20, 2006

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.