From: Junio C Hamano Date: Thu, 30 Mar 2006 07:30:52 +0000 (-0800) Subject: revision.c "..B" syntax: constness fix X-Git-Tag: v1.3.0-rc2~30 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=0c8b106b020421c346532351af36028bfdda4c37;p=git.git revision.c "..B" syntax: constness fix The earlier change to make "..B" to mean "HEAD..B" (aka ^HEAD B) has constness gotcha GCC complains. Fix it. Signed-off-by: Junio C Hamano --- diff --git a/revision.c b/revision.c index 2cda7e0ed..abc874584 100644 --- a/revision.c +++ b/revision.c @@ -641,14 +641,13 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, const ch dotdot = strstr(arg, ".."); if (dotdot) { unsigned char from_sha1[20]; - char *next = dotdot + 2; - char *this = arg; - static const char HEAD[] = "HEAD"; + const char *next = dotdot + 2; + const char *this = arg; *dotdot = 0; if (!*next) - next = HEAD; + next = "HEAD"; if (dotdot == arg) - this = HEAD; + this = "HEAD"; if (!get_sha1(this, from_sha1) && !get_sha1(next, sha1)) { struct commit *exclude;