git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Brandon Casey <casey@nrlssc.navy.mil>
Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>,
	Mike Hommey <mh@glandium.org>, Junio C Hamano <gitster@pobox.com>,
	Git Mailing List <git@vger.kernel.org>,
	Wincent Colaiuta <win@wincent.com>
Subject: Re: [PATCH 2/2] git-gc: skip stashes when expiring reflogs
Date: Fri, 13 Jun 2008 13:30:42 -0400	[thread overview]
Message-ID: <20080613173041.GA7974@sigill.intra.peff.net> (raw)
In-Reply-To: <GL75k5fYVorDQQh654Db9qgZ3DAr5EfRqLBwQe-VpacRGGbsy3c7WA@cipher.nrlssc.navy.mil>

On Fri, Jun 13, 2008 at 11:43:42AM -0500, Brandon Casey wrote:

> > No, but it would have to be performed _after_ the expiration, but
> > _before_ any auto-gc happened. So it is a smaller window than "anytime
> > after expiration" but not as small as a particular 30-second window.
> 
> Right, that's why I showed the 'git-stash list' which still had the
> stash entry before the 'git-pull'.

Right, but I meant that you would have to perform the example commands
you gave after the expiration, but before you had done anything that did
an auto-gc. So you could do it at day 31, unless on day 30 you had done
a "git pull".

But somebody else mentioned that they leave cloned working trees sitting
around, and then find them later. So they might truly have done no
commands.

At any rate, I don't think is especially relevant.

> Funny you should mentioned that since I had thought of using a similar
> example in defense of my point of view. So I offer a question: after how
> much time after you have yanked some text into a register in vi do you
> expect vi to clear that register?

After 10 other yanks? ;)

I was referring not to the named registers, but to the unnamed ones.
IOW, I know that vim will keep my registers from session to session. But
when I yank, it implicitly goes into "0, and the old "0 bumps to "1, "1
to "2, and so forth. "9 is thrown away.

And I think that works pretty well in practice. The size is bounded, but
text stays around long enough for me to use it. And if I want storage
that is guaranteed to last (and I sometimes do), then I use a named
register.

Now here we are bounding by time rather than by number of stashes, but
it is the same concept.

> yanks as being tied to the session. Similarly with something like X11
> when you highlight text, you expect it to be there in the copy buffer
> until other text is highlighted or until X terminates.

Ah, if only that was how X cut buffers actually worked. ;)

> I see it as less of a workflow issue than a safety issue, and a user
> interface issue. I don't know if there are workflows that would be
> made possible by not expiring the stash. I do think the benefit of
> automatically cleaning out the stash so it doesn't accumulate old
> cruft is less important to me than an intuitive interface and
> predictable behavior.

At this point I am inclined to agree. Enough people seem to want to
leave things stashed for long periods that it is a potential hazard to
people who don't know about the expiration. And while I prefer the
expiring cruft behavior, not expiring it isn't _that_ big a deal to me,
compared against the potential for loss.

-Peff

  reply	other threads:[~2008-06-13 17:31 UTC|newest]

Thread overview: 69+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <OLvkESB0JjBNs9kF8Q2M5UFNBJqq4FjbgGeQVyWstGwcXqCOq16_oomM0y-utOBbV7BnndyrICE@cipher.nrlssc.navy.mil>
2008-06-11 21:29 ` [PATCH 2/2] git-gc: skip stashes when expiring reflogs Brandon Casey
2008-06-11 21:36   ` Mike Hommey
2008-06-11 21:44     ` Johannes Schindelin
2008-06-11 23:03       ` Jeff King
2008-06-11 23:21         ` Nicolas Pitre
2008-06-12  4:32           ` Eric Raible
2008-06-12  5:35             ` Wincent Colaiuta
2008-06-12 14:14               ` Nicolas Pitre
2008-06-12 20:13               ` Junio C Hamano
2008-06-12 20:35                 ` Eric Raible
2008-06-12 20:51                   ` Junio C Hamano
2008-06-12 21:36                     ` Eric Raible
2008-06-13  4:52                       ` Johannes Schindelin
2008-06-13  8:43                         ` Wincent Colaiuta
2008-06-13  9:13                           ` Jeff King
2008-06-13 21:41                           ` Johannes Schindelin
2008-06-13 23:33                             ` Christian Jaeger
2008-06-14  8:58                             ` Wincent Colaiuta
2008-06-14 23:59                             ` しらいしななこ
     [not found]                             ` <200806142359.m5ENxsBL028758@mi0.bluebottle.com>
2008-06-15  4:00                               ` Johannes Schindelin
     [not found]                             ` <200806142359.m5ENxsBI028758 @mi0.bluebottle.com>
2008-06-15  5:07                               ` Junio C Hamano
2008-06-16  3:33                                 ` Eric Raible
2008-06-16  7:21                                 ` Junio C Hamano
2008-06-17  9:05                                   ` Johannes Schindelin
2008-06-17 21:54                                     ` Junio C Hamano
2008-06-18 15:25                                       ` Johannes Schindelin
2008-06-18 18:58                                         ` Junio C Hamano
2008-06-16 16:30                                 ` Brandon Casey
2008-06-16 16:52                                   ` Jakub Narebski
2008-06-13 12:05                         ` Mikael Magnusson
2008-06-12 21:27                 ` Brandon Casey
2008-06-12 21:46                   ` Junio C Hamano
2008-06-12 22:10                     ` Brandon Casey
2008-06-13  3:45                   ` しらいしななこ
2008-06-13  4:26               ` Andreas Ericsson
2008-06-13  5:58                 ` Jeff King
2008-06-13  7:16                   ` Andreas Ericsson
2008-06-13  7:42                     ` Jeff King
2008-06-13  8:11                       ` Andreas Ericsson
2008-06-13  8:51                       ` Jakub Narebski
2008-06-13  8:56                       ` Sverre Rabbelier
2008-06-13  9:10                         ` Jeff King
2008-06-13 11:14                           ` Miles Bader
2008-06-13  9:47                       ` Junio C Hamano
2008-06-13 10:05                         ` Jakub Narebski
2008-06-13 10:33                         ` Sverre Rabbelier
2008-06-13 17:31                           ` Olivier Marin
2008-06-13 19:21                           ` Junio C Hamano
2008-06-13 19:35                             ` Wincent Colaiuta
2008-06-13 19:42                             ` Brandon Casey
2008-06-13 19:49                             ` Olivier Marin
2008-06-14  1:16                           ` しらいしななこ
2008-06-13 12:40                         ` Wincent Colaiuta
2008-06-13 13:11                           ` Jeff King
2008-06-13 17:03                         ` Olivier Marin
2008-06-13 13:54                     ` Jon Loeliger
2008-06-13 16:54                   ` Brandon Casey
2008-06-11 23:25         ` Brandon Casey
2008-06-12  4:18           ` Jeff King
2008-06-12 16:46             ` Brandon Casey
2008-06-13  5:48               ` Jeff King
2008-06-13  8:41                 ` Wincent Colaiuta
2008-06-13  8:53                   ` Sverre Rabbelier
2008-06-13  9:07                     ` Teemu Likonen
2008-06-13  9:04                   ` Jeff King
2008-06-13 11:22                 ` Miles Bader
2008-06-13 16:43                 ` Brandon Casey
2008-06-13 17:30                   ` Jeff King [this message]
2008-06-11 22:35     ` Brandon Casey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080613173041.GA7974@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=casey@nrlssc.navy.mil \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=mh@glandium.org \
    --cc=win@wincent.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 NNTP newsgroup(s).