Re: [PATCH] Add platform-independent .git "symlink"
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Feb 2, 2008, 18:19 UTC
- Message-ID
- <alpine.LSU.1.00.0802021815510.7372@racer.site>
- In-Reply-To
- <1201975757-13771-1-git-send-email-hjemli@gmail.com>
Hi,
On Sat, 2 Feb 2008, Lars Hjemli wrote:
> + if (len < 10 || buf[len - 1] != '\n' || strncmp(buf, "GITDIR: ", 8))
Sorry, missed that earlier: How about
if (!len || buf[len-1] != '\n' || prefixcmp(buf, "GITDIR: "))
instead? (buf does not need be NUL terminated for the prefixcmp(), since we just made sure it is LF terminated)
Thanks, Dscho