Hi, On Fri, Jan 26, 2018 at 10:42:26PM +0100, Michael Stapelberg wrote: > I looked into implementing the discussed gbp import-git subcommand. Find > attached preliminary patches. In my tests, the new subcommand tags the > upstream branch and imports it correctly, but perhaps I missed something. > Filtering is not yet considered at all. Feedback/review welcome (or, feel > free to just run with them if that’s easier. I’m not fast with Python.) > One thing came up during the implementation to which I’d like your > feedback: if the upstream branch isn’t by chance already tagged with a > proper version number (e.g. v1.2), how do we get a suitable version number > for the git snapshot we’re about to package? We have such logic in > dh-make-golang: > [1]https://github.com/Debian/dh-make-golang/blob/5a5180dce36c9c878b7551640ff018a6dfabf0dd/version.go#L19 > — as you can see it’s rather complicated. I couldn’t find anything > comparable in git-buildpackage yet. Did I miss it? If no, could such logic > be added?
There's no such logic there yet. FWIW I've added gbp-import-ref https://github.com/agx/git-buildpackage/commit/1592882c38fcbb107332d9a0a63b8da4e0bf8a48 so we can now look into adding the proper filtering and logic for creating the tag name automatically. Cheers, -- Guido