Re: [PATCH 2/2] git-gc: skip stashes when expiring reflogs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Junio C Hamano a écrit :
> 
>  * We _did not have to_ make stashes into refs/stash@{$N}.  We could have
>    implemented them as individual refs under "refs/stash/$N" hierarchy.
>    E.g. refs/stashes/1, refs/stash/2, etc.

I don't really see what is the need for "global" stashes but why not?

>    As a side note, we also could have implemented per-branch stash as
>    refs/stashes/master@{$N} or refs/stashes/$branch/$N (and we still can.
>    Perhaps we can have "git stash save -B" option that tells the command
>    to send the resulting stash to the per-branch namespace).

I really like your refs/stashes/$branch/$N idea because it seems easier to
list and clean with git stash list/drop/clear.
But I think stash should stay a per-branch thing by default. What about a
-g (--global) option instead?

>  * We later introduced "drop" because even as a volatile and short-lived
>    collection of local modifications, you can tell that some stashes are
>    utter crap immediately while deciding that some are worth keeping, even
>    for a short term.

"drop" is nice, but I think the real improvement was "pop".

>  * We could add "keep" which is a complementary operation to "drop".  This
>    would mark a stash as a gem in a more direct way, excempt even from the
>    usual auto pruning.

I don't like it at all. Why not just have "keep" by default? The users can
already use "pop", "drop" and "clear" if they want to trash their stash.

Olivier.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux