git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* git-gui: disable the "loose objects popup" dialog?
@ 2019-09-26 17:31 Birger Skogeng Pedersen
  2019-09-26 18:54 ` Johannes Sixt
  0 siblings, 1 reply; 11+ messages in thread
From: Birger Skogeng Pedersen @ 2019-09-26 17:31 UTC (permalink / raw)
  To: Git List

Hi,


Every once in a while, I get the "This repository currently has
approximately (some number) loose objects." popup dialog.

I don't want to sound arrogant, but I find this popup along with the
dialog showing after that prints the result of the compression,
immensely annoying. And I've seen people mention before that they
would, in some casese, rather not have to deal with the dialog[0].

[0] https://stackoverflow.com/questions/1106529/how-to-skip-loose-object-popup-when-running-git-gui

I get that git-gui merely wants to resolve a performance issue. But
personally I'd prefer if git could just assume I always wanted to
compress the database, and automatically do it without bugging me with
the popups.

I propose we implement the following options in git-gui:
- ignore loose objects (do not show the popup), disabled by default.
- automatically, silently compress the database, without prompt. Also
disabled by default.


Thoughts?

Birger

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: git-gui: disable the "loose objects popup" dialog?
  2019-09-26 17:31 git-gui: disable the "loose objects popup" dialog? Birger Skogeng Pedersen
@ 2019-09-26 18:54 ` Johannes Sixt
  2019-09-26 19:13   ` Birger Skogeng Pedersen
  2019-09-26 19:15   ` Pratyush Yadav
  0 siblings, 2 replies; 11+ messages in thread
From: Johannes Sixt @ 2019-09-26 18:54 UTC (permalink / raw)
  To: Birger Skogeng Pedersen; +Cc: Git List

Am 26.09.19 um 19:31 schrieb Birger Skogeng Pedersen:
> Every once in a while, I get the "This repository currently has
> approximately (some number) loose objects." popup dialog.
> 
> I don't want to sound arrogant, but I find this popup along with the
> dialog showing after that prints the result of the compression,
> immensely annoying. And I've seen people mention before that they
> would, in some casese, rather not have to deal with the dialog[0].
> 
> [0] https://stackoverflow.com/questions/1106529/how-to-skip-loose-object-popup-when-running-git-gui
> 
> I get that git-gui merely wants to resolve a performance issue. But
> personally I'd prefer if git could just assume I always wanted to
> compress the database, and automatically do it without bugging me with
> the popups.

I dislike the popup, too. But I want total control over my repository:
No automatic compression behind my back, in particular, when that
expires reflogs, and git-gui does that.

> I propose we implement the following options in git-gui:
> - ignore loose objects (do not show the popup), disabled by default.
> - automatically, silently compress the database, without prompt. Also
> disabled by default.

What about a configurable limit, but still show the dialog?

-- Hannes

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: git-gui: disable the "loose objects popup" dialog?
  2019-09-26 18:54 ` Johannes Sixt
@ 2019-09-26 19:13   ` Birger Skogeng Pedersen
  2019-09-26 19:15   ` Pratyush Yadav
  1 sibling, 0 replies; 11+ messages in thread
From: Birger Skogeng Pedersen @ 2019-09-26 19:13 UTC (permalink / raw)
  To: Johannes Sixt; +Cc: Git List

Hi Johannes,

On Thu, Sep 26, 2019 at 8:54 PM Johannes Sixt <j6t@kdbg.org> wrote:
> I dislike the popup, too. But I want total control over my repository:
> No automatic compression behind my back, in particular, when that
> expires reflogs, and git-gui does that.

I understand what you mean. In my opinion, An option to make git-gui
"ignore" loose objects (disable the automatic check) does not
challenge total control over the repository.

> What about a configurable limit, but still show the dialog?

Sorry, I don't follow. A limit to what?

I'm struggling to see the reasoning for the loose objects check (and
popup) to happen in git-gui the first place. Why does git-gui take it
upon itself to automatically perform this check? Is loose objects a
"gui" issue?

Birger

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: git-gui: disable the "loose objects popup" dialog?
  2019-09-26 18:54 ` Johannes Sixt
  2019-09-26 19:13   ` Birger Skogeng Pedersen
@ 2019-09-26 19:15   ` Pratyush Yadav
  2019-09-26 21:12     ` Birger Skogeng Pedersen
                       ` (2 more replies)
  1 sibling, 3 replies; 11+ messages in thread
From: Pratyush Yadav @ 2019-09-26 19:15 UTC (permalink / raw)
  To: Johannes Sixt; +Cc: Birger Skogeng Pedersen, Git List

On 26/09/19 08:54PM, Johannes Sixt wrote:
> Am 26.09.19 um 19:31 schrieb Birger Skogeng Pedersen:
> > Every once in a while, I get the "This repository currently has
> > approximately (some number) loose objects." popup dialog.
> > 
> > I don't want to sound arrogant, but I find this popup along with the
> > dialog showing after that prints the result of the compression,
> > immensely annoying. And I've seen people mention before that they
> > would, in some casese, rather not have to deal with the dialog[0].
> > 
> > [0] https://stackoverflow.com/questions/1106529/how-to-skip-loose-object-popup-when-running-git-gui
> > 
> > I get that git-gui merely wants to resolve a performance issue. But
> > personally I'd prefer if git could just assume I always wanted to
> > compress the database, and automatically do it without bugging me with
> > the popups.
> 
> I dislike the popup, too. But I want total control over my repository:
> No automatic compression behind my back, in particular, when that
> expires reflogs, and git-gui does that.

I agree. Doing stuff like this in background by default is not the best 
idea IMHO. If the user asks explicitly, fine, but don't do it by 
default.
 
> > I propose we implement the following options in git-gui:
> > - ignore loose objects (do not show the popup), disabled by default.

Reading the Stackoverflow link, it seems this is already possible via an 
undocumented config variable "gui.gcwarning". I haven't tried using it 
though, but I see no reason for it to not work (looking at 
git-gui.sh:4141).

Maybe we should add this variable in the options dialog, so people at 
least know it exists?

> > - automatically, silently compress the database, without prompt. Also
> > disabled by default.
> 
> What about a configurable limit, but still show the dialog?

Do people really care that much about configuring this limit to warrant 
something like this? 


Talking about auto compression, would it be a better idea to let users 
disable the dialog, and then if they do want auto compression, they can 
just run a cron job (or the Windows equivalent) to do this on their 
repos? What reasons do people have to have this feature in git-gui, 
instead of running cron jobs?

-- 
Regards,
Pratyush Yadav

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: git-gui: disable the "loose objects popup" dialog?
  2019-09-26 19:15   ` Pratyush Yadav
@ 2019-09-26 21:12     ` Birger Skogeng Pedersen
  2019-09-26 21:13     ` Johannes Sixt
  2019-09-26 21:14     ` Marc Branchaud
  2 siblings, 0 replies; 11+ messages in thread
From: Birger Skogeng Pedersen @ 2019-09-26 21:12 UTC (permalink / raw)
  To: Pratyush Yadav; +Cc: Johannes Sixt, Git List

On Thu, Sep 26, 2019 at 9:15 PM Pratyush Yadav <me@yadavpratyush.com> wrote:
> Talking about auto compression, would it be a better idea to let users
> disable the dialog, and then if they do want auto compression, they can
> just run a cron job (or the Windows equivalent) to do this on their
> repos?

Personally I would prefer that git-gui (silently) performs the check
and compression for me when I open it on a repo. But I can totally see
why some (propbably most) git users would not want that. So I don't
really mind if that part of my proposal gets denied.

> What reasons do people have to have this feature in git-gui,
> instead of running cron jobs?

I can't really think of a reason. But then again I can't really think
of a reason why users would want the "loose objects check" in git-gui
in the first place. Especially not enabled by default, popping up when
the user opens git-gui. A button (manual action) to perform this check
and (if necessary) perform the compression would be better IMO.

Birger

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: git-gui: disable the "loose objects popup" dialog?
  2019-09-26 19:15   ` Pratyush Yadav
  2019-09-26 21:12     ` Birger Skogeng Pedersen
@ 2019-09-26 21:13     ` Johannes Sixt
  2019-10-01 18:00       ` Pratyush Yadav
  2019-09-26 21:14     ` Marc Branchaud
  2 siblings, 1 reply; 11+ messages in thread
From: Johannes Sixt @ 2019-09-26 21:13 UTC (permalink / raw)
  To: Pratyush Yadav; +Cc: Birger Skogeng Pedersen, Git List

Am 26.09.19 um 21:15 schrieb Pratyush Yadav:
> Reading the Stackoverflow link, it seems this is already possible via an 
> undocumented config variable "gui.gcwarning". I haven't tried using it 
> though, but I see no reason for it to not work (looking at 
> git-gui.sh:4141).

Ah! That explains why I don't see the message on one of my computers,
but I do see on others. I must have reset gui.gcwarning there a decade
ago, and forgot about it.

> Maybe we should add this variable in the options dialog, so people at 
> least know it exists?

That may be the most reasonable thing to do, IMO.

>> What about a configurable limit, but still show the dialog?
> 
> Do people really care that much about configuring this limit to warrant 
> something like this? 

Never mind. We don't need it if there is a simple switch.

> Talking about auto compression, would it be a better idea to let users 
> disable the dialog, and then if they do want auto compression, they can 
> just run a cron job (or the Windows equivalent) to do this on their 
> repos? What reasons do people have to have this feature in git-gui, 
> instead of running cron jobs?

This is a GUI. It was intended for people with a dislike of the command
line. If you avoid the command line as much as possible, you never get
to see any object statistics; yet, all operations would slow down
gradually due to object bloat with no way out. Remember that this
feature was invented long before auto-gc came to existence. Not to
mention that git-gui uses plumbing mostly where auto-gc would not
trigger anyway.

-- Hannes

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: git-gui: disable the "loose objects popup" dialog?
  2019-09-26 19:15   ` Pratyush Yadav
  2019-09-26 21:12     ` Birger Skogeng Pedersen
  2019-09-26 21:13     ` Johannes Sixt
@ 2019-09-26 21:14     ` Marc Branchaud
  2 siblings, 0 replies; 11+ messages in thread
From: Marc Branchaud @ 2019-09-26 21:14 UTC (permalink / raw)
  To: Pratyush Yadav, Johannes Sixt; +Cc: Birger Skogeng Pedersen, Git List

On 2019-09-26 3:15 p.m., Pratyush Yadav wrote:
> On 26/09/19 08:54PM, Johannes Sixt wrote:
>> Am 26.09.19 um 19:31 schrieb Birger Skogeng Pedersen:
>>> Every once in a while, I get the "This repository currently has
>>> approximately (some number) loose objects." popup dialog.
>>>
>>> I don't want to sound arrogant, but I find this popup along with the
>>> dialog showing after that prints the result of the compression,
>>> immensely annoying. And I've seen people mention before that they
>>> would, in some casese, rather not have to deal with the dialog[0].
>>>
>>> [0] https://stackoverflow.com/questions/1106529/how-to-skip-loose-object-popup-when-running-git-gui
>>>
>>> I get that git-gui merely wants to resolve a performance issue. But
>>> personally I'd prefer if git could just assume I always wanted to
>>> compress the database, and automatically do it without bugging me with
>>> the popups.
>>
>> I dislike the popup, too. But I want total control over my repository:
>> No automatic compression behind my back, in particular, when that
>> expires reflogs, and git-gui does that.
> 
> I agree. Doing stuff like this in background by default is not the best
> idea IMHO. If the user asks explicitly, fine, but don't do it by
> default.
>   
>>> I propose we implement the following options in git-gui:
>>> - ignore loose objects (do not show the popup), disabled by default.
> 
> Reading the Stackoverflow link, it seems this is already possible via an
> undocumented config variable "gui.gcwarning". I haven't tried using it
> though, but I see no reason for it to not work (looking at
> git-gui.sh:4141).

I use this, and it works.  I haven't seen that dialog in years of 
near-daily repo usage.

> Maybe we should add this variable in the options dialog, so people at
> least know it exists?

My experience with qui.gcwarning (i.e. that git-gui hasn't compressed my 
repo in a very long time) suggests that we can just get rid of this part 
of git-gui.  I seem to recall that this was suggested the last time this 
was discussed, because the rest of git's auto-gc machinery is now 
working quite well (compared to when git-gui was first introduced).

		M.


>>> - automatically, silently compress the database, without prompt. Also
>>> disabled by default.
>>
>> What about a configurable limit, but still show the dialog?
> 
> Do people really care that much about configuring this limit to warrant
> something like this?
> 
> 
> Talking about auto compression, would it be a better idea to let users
> disable the dialog, and then if they do want auto compression, they can
> just run a cron job (or the Windows equivalent) to do this on their
> repos? What reasons do people have to have this feature in git-gui,
> instead of running cron jobs?
> 

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: git-gui: disable the "loose objects popup" dialog?
  2019-09-26 21:13     ` Johannes Sixt
@ 2019-10-01 18:00       ` Pratyush Yadav
  2019-10-02  7:12         ` Birger Skogeng Pedersen
                           ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Pratyush Yadav @ 2019-10-01 18:00 UTC (permalink / raw)
  To: Johannes Sixt; +Cc: Birger Skogeng Pedersen, Git List

On 26/09/19 11:13PM, Johannes Sixt wrote:
> Am 26.09.19 um 21:15 schrieb Pratyush Yadav:
> > Reading the Stackoverflow link, it seems this is already possible via an 
> > undocumented config variable "gui.gcwarning". I haven't tried using it 
> > though, but I see no reason for it to not work (looking at 
> > git-gui.sh:4141).
> 
> Ah! That explains why I don't see the message on one of my computers,
> but I do see on others. I must have reset gui.gcwarning there a decade
> ago, and forgot about it.
> 
> > Maybe we should add this variable in the options dialog, so people at 
> > least know it exists?
> 
> That may be the most reasonable thing to do, IMO.
> 
> >> What about a configurable limit, but still show the dialog?
> > 
> > Do people really care that much about configuring this limit to warrant 
> > something like this? 
> 
> Never mind. We don't need it if there is a simple switch.
> 
> > Talking about auto compression, would it be a better idea to let users 
> > disable the dialog, and then if they do want auto compression, they can 
> > just run a cron job (or the Windows equivalent) to do this on their 
> > repos? What reasons do people have to have this feature in git-gui, 
> > instead of running cron jobs?
> 
> This is a GUI. It was intended for people with a dislike of the command
> line. If you avoid the command line as much as possible, you never get
> to see any object statistics; yet, all operations would slow down
> gradually due to object bloat with no way out. Remember that this
> feature was invented long before auto-gc came to existence. Not to
> mention that git-gui uses plumbing mostly where auto-gc would not
> trigger anyway.

Marc's reply to this thread seems to suggest he has had a great 
experience with this feature disabled, because "the rest of git's 
auto-gc machinery is now working quite well (compared to when git-gui 
was first introduced)".

I personally am not very familiar with the details of Git's auto-gc, and 
Googling around didn't really give out any promising results.

What I gather from reading the man page is that "some commands" run 
git-gc automatically. There isn't much mention of which those commands 
are. But you say that plumbing does not trigger auto-gc, so it would not 
get triggered by people using git-gui.

So here's what I propose: why don't we try to do something similar? What 
about running `git-gc --auto` in the background when the user makes a 
commit (which I assume is the most common operation in git-gui). This 
would be disabled when the user sets gc.auto to 0.

This way, we keep a similar experience to the command line in case of 
auto-gc, and we get rid of the prompt. People who don't want 
auto-compression can just set gc.auto to 0, which they should do anyway.

Thoughts?

-- 
Regards,
Pratyush Yadav

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: git-gui: disable the "loose objects popup" dialog?
  2019-10-01 18:00       ` Pratyush Yadav
@ 2019-10-02  7:12         ` Birger Skogeng Pedersen
  2019-10-02 18:48         ` Johannes Sixt
  2019-10-02 20:41         ` Marc Branchaud
  2 siblings, 0 replies; 11+ messages in thread
From: Birger Skogeng Pedersen @ 2019-10-02  7:12 UTC (permalink / raw)
  To: Pratyush Yadav; +Cc: Johannes Sixt, Git List

On Tue, Oct 1, 2019 at 8:00 PM Pratyush Yadav <me@yadavpratyush.com> wrote:
> So here's what I propose: why don't we try to do something similar? What
> about running `git-gc --auto` in the background when the user makes a
> commit (which I assume is the most common operation in git-gui). This
> would be disabled when the user sets gc.auto to 0.
>
> This way, we keep a similar experience to the command line in case of
> auto-gc, and we get rid of the prompt. People who don't want
> auto-compression can just set gc.auto to 0, which they should do anyway.

FWIW that proposal sounds pretty good to me.

Birger

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: git-gui: disable the "loose objects popup" dialog?
  2019-10-01 18:00       ` Pratyush Yadav
  2019-10-02  7:12         ` Birger Skogeng Pedersen
@ 2019-10-02 18:48         ` Johannes Sixt
  2019-10-02 20:41         ` Marc Branchaud
  2 siblings, 0 replies; 11+ messages in thread
From: Johannes Sixt @ 2019-10-02 18:48 UTC (permalink / raw)
  To: Pratyush Yadav; +Cc: Birger Skogeng Pedersen, Git List

Am 01.10.19 um 20:00 schrieb Pratyush Yadav:
> So here's what I propose: why don't we try to do something similar? What 
> about running `git-gc --auto` in the background when the user makes a 
> commit (which I assume is the most common operation in git-gui). This 
> would be disabled when the user sets gc.auto to 0.

Sounds good.

-- Hannes

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: git-gui: disable the "loose objects popup" dialog?
  2019-10-01 18:00       ` Pratyush Yadav
  2019-10-02  7:12         ` Birger Skogeng Pedersen
  2019-10-02 18:48         ` Johannes Sixt
@ 2019-10-02 20:41         ` Marc Branchaud
  2 siblings, 0 replies; 11+ messages in thread
From: Marc Branchaud @ 2019-10-02 20:41 UTC (permalink / raw)
  To: Pratyush Yadav, Johannes Sixt; +Cc: Birger Skogeng Pedersen, Git List

On 2019-10-01 2:00 p.m., Pratyush Yadav wrote:
> 
> So here's what I propose: why don't we try to do something similar? What
> about running `git-gc --auto` in the background when the user makes a
> commit (which I assume is the most common operation in git-gui). This
> would be disabled when the user sets gc.auto to 0.
> 
> This way, we keep a similar experience to the command line in case of
> auto-gc, and we get rid of the prompt. People who don't want
> auto-compression can just set gc.auto to 0, which they should do anyway.
> 
> Thoughts?
> 

+1 from me.

		M.


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2019-10-02 20:51 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-26 17:31 git-gui: disable the "loose objects popup" dialog? Birger Skogeng Pedersen
2019-09-26 18:54 ` Johannes Sixt
2019-09-26 19:13   ` Birger Skogeng Pedersen
2019-09-26 19:15   ` Pratyush Yadav
2019-09-26 21:12     ` Birger Skogeng Pedersen
2019-09-26 21:13     ` Johannes Sixt
2019-10-01 18:00       ` Pratyush Yadav
2019-10-02  7:12         ` Birger Skogeng Pedersen
2019-10-02 18:48         ` Johannes Sixt
2019-10-02 20:41         ` Marc Branchaud
2019-09-26 21:14     ` Marc Branchaud

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).