El 12/6/2008, a las 6:32, Eric Raible escribió:
Nicolas Pitre <nico <at> cam.org> writes:
As you say, branches are there just for that: keeping changes for
months. Stashes are not meant to be used like that nor should we
encourage it.
This unfortunately goes against the recommended usage in John
Wiegley's
otherwise excellent "Git From the Bottom Up". I've contacted him
separately to
make him aware of the collective wisdom of not relying on stashes
for long-term
storage.
Yes, we shouldn't _encourage_ people to use stashes as a long-term
storage mechanism, but neither should we allow old stashes to silently
disappear as a result of reflog expiry, especially as part of
automatic garbage collection. There are two reasons:
(1) Normal reflogs accumulate cruft automatically through normal use
and if not cleaned up they'll just grow and grow and grow. On the
other hand, for "git stash" to accumulate cruft over the long term the
user actually has to take action and _abuse_ them. Abuse is less
likely because it requires this conscious action, and as the output of
"git stash list" gets bigger and more unwieldy this will serve to
encourage people to clean out their stashes themselves, or not let the
list grow out of control in the first place. In other words, the size
of the stash reflog is unlikely to be a problem.
(2) Automatically expiring normal reflogs is a service to the user,
because it's cleaning up something that is automatically generated.
Stashes are the result of a concious user decision to create them, so
automatically "cleaning them up" is _not_ going to help the user.
So yes, branches _are_ better and more appropriate for long term
storage than stashes, but even so I don't think it's right for us to
risk throwing away information that the user explicitly stashed and
expected Git to look after for them.
Wincent
--
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