"stg reset --status" doesn't just reset status

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

 



Hello!

I used to see messages like this:

$ stg pull
Checking for changes in the working directory ... done
stg pull: local changes in the tree. Use "refresh" or "status --reset"

This time I decided to see what "stg reset --status" actually does, and I was unpleasantly surprised that it would do much more that its name implies.

It doesn't just reset the status (no idea what it would be, but it doesn't sound scary). It removes all local changes. It's essentially "git reset --hard". I can easily imagine that some beginner would lose valuable changes by following that advice while trying to update from the upstream repository.

I would hate to suggest another stg command, as there are too many of them already. On the other hand, if "applied" and "unapplied" are downgraded to switches for "stg series", we probably could justify adding one more command, "stg reset". By the way, the default could be to save the changes to a hidden "stash" patch, and the "--hard" switch would do a real reset.

Another (not alternative) approach would be to have an option to "stg pull" to save the changes as a temporary patch that would be applied and deleted if it applied cleanly. That shouldn't be a default for "stg pull", as it's likely that the user just forgot "stg refresh".

--
Regards,
Pavel Roskin
--
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