Hi On Sat, Jun 11, 2016 at 02:20:09PM -0400, James McCoy wrote: > $ git log -1 --pretty='format:%cd' --date='format:%Y%m%d'
Nice: It seems we can add hush etc as we wish: $ git log -1 --pretty=format:0.0~git%cd.%h --date=format:%Y%m%d%H%M So let's make these as configurable variables with default being above. How should we explicitly specify such variables, I guess it should be through "opts=..." such as: opts="mode=git, pretty=0.0~git%cd.%h, date=%Y%m%d%H%M" But this "git log" needs to have local clone of git repository. I wonder if I can do without cloning first. (After all, we eventually need to download contents for the tarball. So this is not very high priority but I am curious.) So if the matching pattern starts with ref/tags/, we keep current pattern. If it starts with ref/heads, we use this new auto generated tag. Adding support to the number of commits is complicated. Let's be happy to use hash to be unique commit. I do not think we upload more than 2 Debian upstream tarball in a minute. At least we can reduce cloning cost by only cloning particular branch. As for "git describe" like nearest tag feature, it's a interesting thought but it may make things more complicate. So unless someone strongly request with patch, I would like to skip it. (One can always add squashed patch and make a new Debian revision) Osamu