- const char *refname, *value, *oldval, *path, *lockpath;
+ const char *refname, *value, *oldval, *path;
+ char *lockpath;
- die("Ref %s changed to %s", refname, sha1_to_hex(currsha1));
+ die("Ref %s is at %s but expected %s", refname, sha1_to_hex(currsha1), sha1_to_hex(oldsha1));
/* Nothing to do? */
if (!memcmp(oldsha1, sha1, 20))
exit(0);
}
path = strdup(path);
lockpath = mkpath("%s.lock", path);
/* Nothing to do? */
if (!memcmp(oldsha1, sha1, 20))
exit(0);
}
path = strdup(path);
lockpath = mkpath("%s.lock", path);