Re: [PATCH] stripspace: allow -s/-c outside git repository

2018-12-19 Thread Martin Ågren
On Tue, 18 Dec 2018 at 13:00, Johannes Schindelin wrote: > > Makes me wonder if `setup_git_directory_gently()` should BUG if it > > receives NULL. That would require some reshuffling in setup.c, since > > `setup_git_directory()` calls out to it with NULL... Just thinking out > > loud. In any case,

Re: [PATCH] stripspace: allow -s/-c outside git repository

2018-12-18 Thread Johannes Schindelin
Hi Martin, On Tue, 18 Dec 2018, Martin Ågren wrote: > On Mon, 17 Dec 2018 at 22:56, Jonathan Nieder wrote: > > That makes experimenting with the stripspace command unnecessarily > > fussy. Fix it by discovering the git directory gently, as intended > > all along. > > > if (mode == STRI

Re: [PATCH] stripspace: allow -s/-c outside git repository

2018-12-18 Thread Johannes Schindelin
Hi Jonathan, On Mon, 17 Dec 2018, Jonathan Nieder wrote: > v2.11.0-rc3~3^2~1 (stripspace: respect repository config, 2016-11-21) > improved stripspace --strip-comments / --comentlines by teaching them > to read repository config, but it went a little too far: when running > stripspace outside any

Re: [PATCH] stripspace: allow -s/-c outside git repository

2018-12-17 Thread Martin Ågren
On Mon, 17 Dec 2018 at 22:56, Jonathan Nieder wrote: > That makes experimenting with the stripspace command unnecessarily > fussy. Fix it by discovering the git directory gently, as intended > all along. > if (mode == STRIP_COMMENTS || mode == COMMENT_LINES) { > - setup_git

[PATCH] stripspace: allow -s/-c outside git repository

2018-12-17 Thread Jonathan Nieder
v2.11.0-rc3~3^2~1 (stripspace: respect repository config, 2016-11-21) improved stripspace --strip-comments / --comentlines by teaching them to read repository config, but it went a little too far: when running stripspace outside any repository, the result is $ git stripspace --strip-commen