"git ubuntu clone": what tags do you expect to see locally?

"git ubuntu clone <package>" is like "git clone", but also knows the URL
and some sensible default refspecs.

If you then run "git tag", which tags do you expect to have
automatically been fetched for you?

In our imported repositories in Launchpad, we have one tag for every
single source package published in both Ubuntu and Debian. For a typical
package, this is a particularly large number. If developers supplied
rich history by the time of the respective imports, there's an extra tag
per-upload for each of those.

If we fetch all tags by default (this is what "git clone" does unless
you say --no-tags), then "git tag" will spam your terminal. Tab
completion like "git checkout import/<TAB>" is then not very useful at
all. If you have use tags locally to mark points along your work, then
they will get hidden in the sea of "git tag" output.

If we don't fetch all tags by default, then the missing tags won't be
available unless and until you directly fetch them[1]. "git ubuntu merge
start", "git ubuntu lint" and the like will have to fetch the relevant
tags specific to the task. If you're now on a plane, then this won't
work unless you remembered to fetch the relevant tags, or all tags, in

We do have to cater for different "types" of developers here. Some use
cases we want to support are in my blog post[2], and I think we want to
favour the default towards the developers who are expected to know the

It may be argued that developers are used to seeing all release tags for
a regular project. But some distribution packages can have about an
order of magnitude more tags.

We can have an option to change behaviour, of course, and could
eventually make this a locally tunable configuration option. But what
about the default? What pros and cons of the two approaches have I
missed? What do you expect to see as the default, for the best UX? What
would you find least surprising?

Feedback and opinions appreciated.



[1] We could provide an easy way to do this in the wrapper, of course.
[2] <a href="" title=""></a>


Re: "git ubuntu clone": what tags do you expect to see locally?

By Michael Hudson-Doyle at 08/10/2017 - 21:24

I think I would expect to get all tags, but maybe I'm failing to grasp the
number of tags you are talking about. Can you point to a repo on lp that
has a worryingly large number of tags?


Re: "git ubuntu clone": what tags do you expect to see locally?

By Nish Aravamudan at 08/15/2017 - 19:46

On Thu, Aug 10, 2017 at 6:24 PM, Michael Hudson-Doyle
<michael. ... at canonical dot com> wrote:
Define "worryingly large" :)

$ git ubuntu clone samba
$ git tag | wc -l
$ git branch -r | wc -l

The "correct" import for samba will actually have more tags, as we
will have a tag for every orig tarball in Debian and Ubuntu
(pkg/upstream/{debian,ubuntu}/<version>.<extension>), a tag for every
patches-unapplied import in Debian and Ubuntu (pkg/import/<version>)
and a tag for every patches-applied import in Debian and Ubuntu
(pkg/applied/<version>). I say "correct" because in the currently
imported repository, we did not distinguish between the ubuntu and
debian pristine-tar data and that led to issues.

TBH, I agree with Robie that `git checkout import/<tab>` becomes
relatively useless, but I rarely am going to a specific version, but
to a specific branch, of which there are far fewer. When I want to see
the diff between two imported versions, I don't check them out, I do
`git diff import/<upstream of version1><tab> import/<upstream of
version2><tab>` It might still take a few iterations of <tab> and
adding characters, but it's not terrible, in my experience so far.

I also think it's important to stay closer to git's behavior unless we
have a strong reason to do so.


Re: "git ubuntu clone": what tags do you expect to see locally?

By Michael Hudson-Doyle at 08/15/2017 - 22:48

On 16 August 2017 at 11:46, Nish Aravamudan <nish. ... at canonical dot com>

OK :)

I think having all of those things sounds better than not having them.



Re: "git ubuntu clone": what tags do you expect to see locally?

By Christian Ehrhardt at 08/11/2017 - 02:20

On Fri, Aug 11, 2017 at 3:24 AM, Michael Hudson-Doyle <

^^ that - I as well would expect all tags as well.

Having a stampede of tags happens now and then in all kind of repo's and
people are used to deal with it.
Missing them for no reason that appears trivial ("normal" clone fetches
them as you outlined) hurts much more.
And finally since the tags are nicely name-spaced and follow rules they can
easily be filtered out.