Using shelve to mimic Git's staging area
Aaron Bentley
aaron at canonical.com
Tue Sep 27 14:09:04 UTC 2011
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 11-09-27 06:35 AM, John Arbash Meinel wrote:
> The issue is that the shelved change looks like:
>
> stuff /* The line I removed */ more stuff
>
> And the one you committed looks like
>
> stuff /* The line I kept */ more stuff
>
> Given that the version before you did shelve looked like:
>
> stuff more stuff
>
> We don't have a way of distinguishing those changes from being a
> conflict.
I believe that's correct. The shelved change is expressed as a delta
against the tip, not against the previous state. ("Previous state
being the uncommitted changes just before you ran "shelve".) Mostly,
that works fine, but this looks like a case where it would be better
to express it as a delta against the pre-shelve state, rather than the
tip.
> Maybe I'm misunderstanding how Aaron implemented shelves, though.
No, I think that's exactly right.
Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk6B2QAACgkQ0F+nu1YWqI3C2ACdHKv4bJQh0ht8AVIUhakiqqV7
/4cAn1mM4O+n7wK9lWZ/4pns2aiPUjob
=k5u0
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list