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

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Robie Basak-4
"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
advance.

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
least.

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.

Thanks,

Robie

[1] We could provide an easy way to do this in the wrapper, of course.
[2] http://www.justgohome.co.uk/blog/2017/07/developing-ubuntu-using-git.html

--
ubuntu-devel mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel

signature.asc (836 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Michael Hudson-Doyle
On 11 August 2017 at 07:19, Robie Basak <[hidden email]> wrote:
"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?

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?

Cheers,
mwh

--
ubuntu-devel mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Christian Ehrhardt


On Fri, Aug 11, 2017 at 3:24 AM, Michael Hudson-Doyle <[hidden email]> wrote:
On 11 August 2017 at 07:19, Robie Basak <[hidden email]> wrote:
"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?

I think I would expect to get all tags

^^ 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.


--
Christian Ehrhardt
Software Engineer, Ubuntu Server
Canonical Ltd

--
ubuntu-devel mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Nish Aravamudan
In reply to this post by Michael Hudson-Doyle
On Thu, Aug 10, 2017 at 6:24 PM, Michael Hudson-Doyle
<[hidden email]> wrote:

> On 11 August 2017 at 07:19, Robie Basak <[hidden email]> wrote:
>>
>> "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?
>
>
> 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?

Define "worryingly large" :)

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

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.

Thanks,
Nish

--
ubuntu-devel mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Michael Hudson-Doyle


On 16 August 2017 at 11:46, Nish Aravamudan <[hidden email]> wrote:
On Thu, Aug 10, 2017 at 6:24 PM, Michael Hudson-Doyle
<[hidden email]> wrote:
> On 11 August 2017 at 07:19, Robie Basak <[hidden email]> wrote:
>>
>> "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?
>
>
> 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?

Define "worryingly large" :)

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

OK :)
 
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.

I think having all of those things sounds better than not having them.
 
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.

 +1

Cheers,
mwh

--
ubuntu-devel mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel
Loading...