Filenames must contain only the characters [A-Za-z0-9._+-] and must not begin with a dot, a hyphen, or a plus sign. Please enforce this policy with an update or a pre-receive hook on the server side. The tree is already compliant, with the single exception of metadata/.cvsignore. Policy reference: https://devmanual.gentoo.org/general-concepts/tree/index.html#what-belongs-in-the-tree%3F https://devmanual.gentoo.org/ebuild-writing/file-format/index.html#file-naming-rules
Created attachment 406158 [details] update hook
Created attachment 406160 [details] update hook
Created attachment 408700 [details] update hook Add a list of exceptions: .gitignore metadata/.gitignore
Why did you loop over the list of files rather than apply grep to it? Also, if there are multiple bad files, this looks like it exits after the first bad file. some rough puesdocode to improve it: ==== badfiles=$(git diff ... | egrep -v -e "${regex}") rc=0 for f in badfiles ; do if exception ; continue ; fi echo "Bad file: $f" rc=1 done exit $rc ==== On some pathological input, your validation takes many seconds; whereas putting grep in first ensures it is much faster.
I'll attach a new skipt using grep as soon as I've found a way to work around bug 574662.
Created attachment 425430 [details] update hook v2 Updated version including robbat2's suggestions.
Ping.
What prevents this from being deployed? This bug is open since more than one year now.
Created attachment 465434 [details] update hook v3 Updated version using grep -z again. Needs >=sys-apps/grep-2.24 (where bug 574662 is fixed).
I'm sorry for replying this late but could you please use: while... < <(...) Instead of putting the loop on end of pipeline?
Created attachment 468130 [details] update hook v4 (In reply to Michał Górny from comment #10) > I'm sorry for replying this late but could you please use: > > while... < <(...) > > Instead of putting the loop on end of pipeline? Sure, see attachment. (: backwards is pipeline the because though read to harder it make will That
I've added 'IFS=' before 'read', and a guard for checking 'master' branch only, then committed it to git-gx86-tools [1], added to gitolite and enabled for repo/gentoo. Let's see if people can still push now ;-). [1]:https://github.com/gentoo/git-gx86-tools
I had a little slip but it should work now. I have just confirmed that I'm able to push again ;-).