Re: [PATCH 1/6] abspath: move related functions to abspath
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 2, 2023, 21:42 UTC
- Message-ID
- <xmqq7ctqz9zq.fsf@gitster.g>
- In-Reply-To
- <20230502211454.1673000-2-calvinwan@google.com>
Calvin Wan <calvinwan@google.com> writes:
> Move abspath-related functions from strbuf.[ch] to abspath.[ch] since > they do not belong in a low-level library.
Given a relative path and turning it into absolute is still low-level enough, but that apparently is not what you meant.
It would be nice to define what you mean by "low-level" here, and update the comments at the beginning of <strbuf.h> with that definition.
I think what you are trying to do is to move anything that does more than straight string manipulation out of "strbuf.c"; roughly, things that have system dependencies that are more than malloc/realloc.
For this particular step, I think it is a natural thing to move a function that computes an absolute version of a given path to abspath.[ch] that already exists. The same goes for its realpath counterpart.