Re: [PATCH v4 2/2] interpret-trailers: add option for in-place editing
- From
Tobias Klauser <tklauser@distanz.ch>
- Date
- Jan 19, 2016, 08:28 UTC
- Message-ID
- <20160119082828.GE21205@distanz.ch>
- In-Reply-To
- <CAPig+cQ5X7r22pXyCs_n+-mXK3Lzh1CpAMQ_PbuhLT4C3S+v1Q@mail.gmail.com>
On 2016-01-18 at 23:13:22 +0100, Eric Sunshine <sunshine@sunshineco.com> wrote:
Show 33 quoted lines
> On Mon, Jan 18, 2016 at 4:21 PM, Junio C Hamano <gitster@pobox.com> wrote: > > On Jan 18, 2016 13:11, "Eric Sunshine" <sunshine@sunshineco.com> wrote: > >> On Thu, Jan 14, 2016 at 3:45 PM, Junio C Hamano <gitster@pobox.com> wrote: > >>> If for some reason interpret-trailers fails to fail, this would > >>> leave an unreadable 'message' in the trash directory. Maybe no > >>> other tests that come after this one want to be able to read the > >>> contents of the file right now, but this is an accident waiting to > >>> happen: > >>> > >>> cat basic_message >message && > >>> + test_when_finished "chmod +r message" && > >>> chmod -r message && > >>> test_must_fail ... && > >>> chmod +r message && > >> > >> Don't forget to remove this (now unnecessary) "chmod +r" once you've > >> added the 'test_when_finished "chmod +r"'. > >> > >>> test_cmp ... > > > > It still is necessary for the test-cmp to work, no? > > My bad. Ignore me. > > By the way, isn't the: > > cat basic_message >message && > > in the above test just an unusual way to say: > > cp basic_message message && > > ?
Yes. I was following the other test cases which use cat to build more complex messages.
I can change this as well along with the 'test_when_finished' fix.