Jean Privat <jean@xxxxxxxxx> wrote: > git describe without refs still works on HEAD but append "-dirty" if the > working three is dirty. If the working tree is clean, nothing is appended. > > Previous behavior can be achieved by specifying "HEAD". > > Many build scripts use `git describe` to produce a version number. > However, additional git commands are required to distinguish builds done > with a clean tree from builds done with a dirty tree. > This patch helps the writing of these scripts since `git describe` do > the intended thing. > > This new behavior could affect existing scripts by producing version > number like v1.0.4-14-g2414721-dirty-dirty. > These scripts could be easily fixed by explicitly using HEAD when calling > `git describe` and works with any version of git. > > Signed-off-by: Jean Privat <jean@xxxxxxxxx> Yea, I think this is reasonable and sane thing to do. Acked-by: Shawn O. Pearce <spearce@xxxxxxxxxxx> > Note that documentation of `git describe` did not mentioned the behavior > of the command when no committish is specified. > However, since it is still a behavior change. If the patch is accepted, > it could target version 1.7. Yea, 1.7 may be safer for this, but also many scripts are based on the GIT-VERSION-GEN in git.git which uses HEAD as an explicit argument. So they might actually be OK with this change. -- Shawn. -- 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