Re: [PATCH v4 2/2] interpret-trailers: add option for in-place editing
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 19, 2016, 17:52 UTC
- Message-ID
- <xmqqio2pbgov.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <CAPig+cRRdca7PfkqppY2X7KSFpHX0yH19fxRL+w_=u9vg7NV9A@mail.gmail.com>
Eric Sunshine <sunshine@sunshineco.com> writes:
Show 6 quoted lines
> I think POSIXPERM is all you need for this case; SANITY doesn't buy > you anything, if I understand correctly. > >>> + cat basic_message >message && >>> + chmod -r message && >>> + test_must_fail git interpret-trailers --trailer "Reviewed-by: Alice" --in-place message &&
The purpose of "chmod -r message" is to force interpret-trailers to fail due to its input being unreadable; without SANITY, i.e. running this test as root, the command would happily read from message that is marked as unreadable by anybody, and test_must_fail will not pass.