git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
PRPavel Roskin <proski@gnu.org>
Date
Apr 2, 2008, 02:21 UTC
Message-ID
<20080401222124.1b4niqtm0ogw40sk@webmail.spamcop.net>
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
Next: Karl Hasselström
Message 1 of 3 in “"stg reset --status" doesn't just reset status”
  1. Pavel RoskinApr 2, 2008
  2. Karl HasselströmApr 2, 2008
  3. Pavel RoskinApr 2, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.