Nguyễn Thái Ngọc Duy <pclouds@xxxxxxxxx> writes: > HEAD and MERGE_HEAD (among other branch tips) should never hold a > tag. That can only be caused by broken tools and is cumbersome to fix > by an end user with: > > $ git update-ref HEAD $(git rev-parse HEAD^{commit}) > > which may look like a magic to a new person. > ... > Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@xxxxxxxxx> Nicely done. Just a few micronits. > diff --git a/commit.h b/commit.h > ... > +/* > + * Look sha1 up for a commit, defer if needed. If dereference occurs, That's s/defer/deref/; > + * update "sha1" for consistency with retval->object.sha1. Also warn > + * users this case because it is expected that sha1 points directly to > + * a commit. > + */ > +struct commit *lookup_commit_or_die(const unsigned char *sha1, const char *ref_name); This no longer updates sha1 now it is a pointer to a const arena. I'll update this part as follows, and queue the result. /* * Look up object named by "sha1", dereference tag as necessary, * get a commit and return it. If "sha1" does not dereference to * a commit, use ref_name to report an error and die. */ Thanks. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html