shithub: git9

Download patch

ref: 6316f60fcda342ca8bbff85dc8702c0d4db65d88
parent: a3d1944b97c12cd66bb1cb97b515346750386560
author: Ori Bernstein <ori@eigenstate.org>
date: Mon Dec 21 17:25:04 EST 2020

git/save: disallow modifying submodules in commits

if you want to touch submodules, use unix git: we
support them enough that repositories would work,
but we don't support them enough to modify them.

--- a/save.c
+++ b/save.c
@@ -254,6 +254,8 @@
 		e = dirent(&ent, &nent, elt);
 		if(e->islink)
 			sysfatal("symlinks may not be modified: %s", *path);
+		if(e->ismod)
+			sysfatal("submodules may not be modified: %s", *path);
 		if(isdir){
 			e->mode = DMDIR | 0755;
 			sub[nsub] = readobject(e->h);