Re: [PATCH v2] upload-pack: allow shallow fetching from a read-only repository

2014-03-05 Thread Duy Nguyen
On Wed, Mar 5, 2014 at 1:10 AM, Junio C Hamano gits...@pobox.com wrote: I notice that the original code, with or without this change, allows upload-pack spawned by daemon to attempt to write into GIT_DIR. As upload-pack is supposed to be a read-only operation, this is quite bad. Perhaps we

Re: [PATCH v2] upload-pack: allow shallow fetching from a read-only repository

2014-03-05 Thread Junio C Hamano
Duy Nguyen pclo...@gmail.com writes: If only there is a way to pass this info without a temporary file. Multiplexing it to pack-objects' stdin should work. It may be ugly, but it's probably the safest way. Wait it does not look that ugly. We can feed --shallow SHA1 lines before sending

[PATCH v2] upload-pack: allow shallow fetching from a read-only repository

2014-03-04 Thread Nguyễn Thái Ngọc Duy
Before cdab485 (upload-pack: delegate rev walking in shallow fetch to pack-objects - 2013-08-16) upload-pack does not write to the source repository. cdab485 starts to write $GIT_DIR/shallow_XX if it's a shallow fetch, so the source repo must be writable. git:// servers do not need write

Re: [PATCH v2] upload-pack: allow shallow fetching from a read-only repository

2014-03-04 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy pclo...@gmail.com writes: Before cdab485 (upload-pack: delegate rev walking in shallow fetch to pack-objects - 2013-08-16) upload-pack does not write to the source repository. cdab485 starts to write $GIT_DIR/shallow_XX if it's a shallow fetch, so the source repo