Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
revision.c "..B" syntax: constness fix
author
Junio C Hamano
<junkio@cox.net>
Thu, 30 Mar 2006 07:30:52 +0000
(23:30 -0800)
committer
Junio C Hamano
<junkio@cox.net>
Thu, 30 Mar 2006 07:30:52 +0000
(23:30 -0800)
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>
revision.c
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
ce4a706
)
diff --git
a/revision.c
b/revision.c
index 2cda7e0edc6c9efcfd9bd52884a87eced2b8b12d..abc874584e94399d262cd9b31dd2c8e601056cdc 100644
(file)
--- 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;