Re: Bootstrapping into git, commit gripes at me
From: Junio C Hamano <hidden>
Date: 2016-06-15 22:42:01
Marc Singer [off-list ref] writes:
I picked 2.6.12 # git checkout -f v2.6.12 applied the patch and was greeted with an error about being unable to commit telling me that I LONG_HEX_NUMBER is not a valid commit object. Isn't 2.6.12 later than 2.6.12-rcX?
Aha. Marc is not doing anything wrong --- he is doing as he is
told.
Linus, there is a bad interaction between tag objects and
commits right now. For example:
- we allow git-checkout-script with a tag; I think we store the tag
object without dereferencing in .git/HEAD;
- git-commit-tree says check_valid("commit") and barfs.
I think other things are covered already and the above two are
the only remaining major ones. The merge-base command dereferences tags
and produces a commit as its result. The rev-list command also
derefs tags, so log and whatchanged would work sensibly.
My current preference is to keep .git/refs/heads tag free. At
least, I do not think we should ever write non commits to
.git/*_HEAD.
What do you think? An alternative would be to allow tags
(recursively) pointing at a commit as a commit parent, but I do
not think we would want to go that route.