RFC: "refs only" restriction for snapshots

2017-04-24 Thread Konstantin Ryabitsev
Hello: It would be nice to be able to restrict snapshots only to refs, both for sanity and for potential security reasons. E.g. see the "Security" section here: https://git-scm.com/docs/git-upload-archive My concern is mostly rogue crawlers that ignore robots.txt and try to request tarballs

Re: [PATCH] cache: flush stdio before restoring FDs

2017-04-24 Thread Jason A. Donenfeld
Hey John, Wow, that was quick. Konstantin and I were just talking about this. I'll review this and merge things asap. Another related thing were were discussing and I was just investigating is the inherent buffering that our cache system uses. When it's filling a slot, everything is buffered unti

[PATCH] cache: flush stdio before restoring FDs

2017-04-24 Thread John Keeping
As described in commit 2efb59e (ui-patch: Flush stdout after outputting data, 2014-06-11), we need to ensure that stdout is flushed before restoring the file descriptor when writing to the cache. It turns out that it's not just ui-patch that is affected by this but also raw diff which writes to st

Bug: rawdiff output truncated on cache save

2017-04-24 Thread Konstantin Ryabitsev
Hello, all: Very reminiscent of a fix for ui-patch.c that fixed patch truncation [1] there's a similar problem with cached rawdiff output. E.g.: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/rawdiff/?id=v4.11-rc7&id2=v4.11-rc8 You will notice that the output is truncated (i