* Re: git: please refuse push containing commits marked for autosquash by default [not found] <20100716123715.16356.65888.reportbug@richter> @ 2010-07-16 19:04 ` Jonathan Nieder 2010-07-26 15:50 ` Jeff King 0 siblings, 1 reply; 2+ messages in thread From: Jonathan Nieder @ 2010-07-16 19:04 UTC (permalink / raw) To: Simon Richter; +Cc: git, Scott Chacon, Jeff King, Shawn O. Pearce Hi Simon, Simon Richter wrote: > When using the --autosquash feature, quite a number of temporary commits > are created that should never be pushed anywhere. It might be a good > idea to have an option to refuse to transfer commits whose messages > start with "fixup!" or "squash!", both on the server and client side. At first glance this looks very useful, as an optional hook rather than on by default[1]. It sounds like a good use for hooks. Receiving side: an update hook should do the trick. See the githooks manual page, or /usr/share/doc/git/contrib/hooks/update-paranoid for an example. Sending side: there is no pre-push hook yet, but there was some work towards that about a year and a half ago[2]. Maybe someone interested could revive the topic or figure out what remains to be done. Jonathan [1] Sometimes I send works in progress from one machine to another; it would be quite unnerving if this resulted in some puzzling message about how I forgot to rebase first. [2] http://thread.gmane.org/gmane.comp.version-control.git/92900 http://thread.gmane.org/gmane.comp.version-control.git/128426/focus=128433 ^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: git: please refuse push containing commits marked for autosquash by default 2010-07-16 19:04 ` git: please refuse push containing commits marked for autosquash by default Jonathan Nieder @ 2010-07-26 15:50 ` Jeff King 0 siblings, 0 replies; 2+ messages in thread From: Jeff King @ 2010-07-26 15:50 UTC (permalink / raw) To: Jonathan Nieder; +Cc: Simon Richter, git, Scott Chacon, Shawn O. Pearce On Fri, Jul 16, 2010 at 02:04:32PM -0500, Jonathan Nieder wrote: > > When using the --autosquash feature, quite a number of temporary commits > > are created that should never be pushed anywhere. It might be a good > > idea to have an option to refuse to transfer commits whose messages > > start with "fixup!" or "squash!", both on the server and client side. > > At first glance this looks very useful, as an optional hook rather > than on by default[1]. Yeah, from my cursory look, this really seems like policy that should be going in a hook. > Sending side: there is no pre-push hook yet, but there was some work > towards that about a year and a half ago[2]. Maybe someone interested > could revive the topic or figure out what remains to be done. If somebody is interested in that, they should read this related thread: http://thread.gmane.org/gmane.comp.version-control.git/128273 which talks about a "pre-push" hook that could interactively confirm push of specific refs. So ideally any pre-push hook interface would not just be "do the push or not" but would actually be able to munge the list of commits to push. -Peff ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-07-26 15:50 UTC | newest] Thread overview: 2+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <20100716123715.16356.65888.reportbug@richter> 2010-07-16 19:04 ` git: please refuse push containing commits marked for autosquash by default Jonathan Nieder 2010-07-26 15:50 ` Jeff King
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).