Re: [PATCH] editor: use canonicalized absolute path
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 30, 2013, 13:48 UTC
- Message-ID
- <7vwqo8xiny.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <CACsJy8DxSv7zP+EL0yZnkTztEm7taS0VQxcQ6XPQHMvVMLtVqg@mail.gmail.com>
Duy Nguyen <pclouds@gmail.com> writes:
> The idea is the same, but my patch is a bit different (use of realpath > instead of real_path, I didn't remember git has real_path). I'm fine > with Ram being the author.
Thanks, both of you, for clarification.
Show 9 quoted lines
>> Compared to not being able to edit, it may be a small price to pay >> for those who do need to suffer the broken editor, but the patch >> makes those who do not need this workaround to pay the price. > > Does looking at the edited file's path happen often? I have never done > that before. I ask because in order to avoid the price for those > users, the code could get a little bit more complicated (detecting if > the given relative path traverse backward outside a symlink..). To me > it seems like a good trade off in favor of simpler code.
Yeah, I was being my usual cautious self, as somebody has to play that role. I think the code as-is would be an OK trade off.