All of lore.kernel.org
 help / color / mirror / Atom feed
* Server-side preventing some files from being overwritten
@ 2016-07-14 15:31 Thorsten Glaser
  2016-07-14 16:57 ` Stefan Beller
  0 siblings, 1 reply; 12+ messages in thread
From: Thorsten Glaser @ 2016-07-14 15:31 UTC (permalink / raw)
  To: git

Hi *,

is there a way, for example with some sort of pre-receive hook,
to prevent some files from being overwritten by a push?

Use case:

In some project, we use Flyway to manage the database schema,
and Jenkins to automatically build master’s HEAD after each
push (and install it, thus activating the schema files almost
immediately). Now, I wish to prevent coworkers from changing
anything in the SQL subdirectory that has ever been pushed,
forcing them to push new SQL files with ALTER statements instead.
(Yes, I am aware this will likely make me even less liked. No,
this is not an issue.)

As for the comparison, only the changes between the previous
HEAD of master and the new HEAD of master after the push would
have been accepted need to be taken into account; any intermediate
commits, merges, etc. are no problem (because Jenkins does not
build them, and because, once a push fails, the developer will
have to add a commit reverting their change and moving it to
another file on top, I’m no friend of rewriting).

File matching would be “any files under a certain subdirectory”,
nothing fancier than that.

I’ve tried a web search (with two different search engines) for
“git prevent pushed files from modification”, but this seems to
only show people who want to ignore local changes or somesuch…

I’ve asked in IRC, but with no answer for hours I thought that
maybe this was the better place to ask for it.

Thanks in advance,
//mirabilos
-- 
tarent solutions GmbH
Rochusstraße 2-4, D-53123 Bonn • http://www.tarent.de/
Tel: +49 228 54881-393 • Fax: +49 228 54881-235
HRB 5168 (AG Bonn) • USt-ID (VAT): DE122264941
Geschäftsführer: Dr. Stefan Barth, Kai Ebenrett, Boris Esser, Alexander Steeg

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2016-07-21 12:27 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-14 15:31 Server-side preventing some files from being overwritten Thorsten Glaser
2016-07-14 16:57 ` Stefan Beller
2016-07-14 17:51   ` Thorsten Glaser
2016-07-14 18:27     ` Junio C Hamano
2016-07-14 18:44       ` Junio C Hamano
2016-07-14 18:50         ` Stefan Beller
2016-07-15 13:56         ` Ævar Arnfjörð Bjarmason
2016-07-15 15:30           ` Thorsten Glaser
2016-07-14 18:50       ` Thorsten Glaser
2016-07-14 19:10         ` Junio C Hamano
2016-07-21 11:21   ` Jakub Narębski
2016-07-21 12:27     ` Thorsten Glaser

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.