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 <junkio@cox.net>
This commit is contained in:
parent
ce4a706388
commit
0c8b106b02
@ -641,14 +641,13 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, const ch
|
|||||||
dotdot = strstr(arg, "..");
|
dotdot = strstr(arg, "..");
|
||||||
if (dotdot) {
|
if (dotdot) {
|
||||||
unsigned char from_sha1[20];
|
unsigned char from_sha1[20];
|
||||||
char *next = dotdot + 2;
|
const char *next = dotdot + 2;
|
||||||
char *this = arg;
|
const char *this = arg;
|
||||||
static const char HEAD[] = "HEAD";
|
|
||||||
*dotdot = 0;
|
*dotdot = 0;
|
||||||
if (!*next)
|
if (!*next)
|
||||||
next = HEAD;
|
next = "HEAD";
|
||||||
if (dotdot == arg)
|
if (dotdot == arg)
|
||||||
this = HEAD;
|
this = "HEAD";
|
||||||
if (!get_sha1(this, from_sha1) &&
|
if (!get_sha1(this, from_sha1) &&
|
||||||
!get_sha1(next, sha1)) {
|
!get_sha1(next, sha1)) {
|
||||||
struct commit *exclude;
|
struct commit *exclude;
|
||||||
|
Loading…
Reference in New Issue
Block a user