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

StGIT: "stg new" vs "stg new --force"

From
PRPavel Roskin <proski@gnu.org>
Date
Jan 13, 2006, 09:24 UTC
Message-ID
<1137144291.20073.104.camel@dv>
Hello, Catalin!

Maybe I don't understand something in StGIT, but it seems strange that "stg new" creates empty patch by default and requires "--force" to create a non-empty patch.

It's much easier to give a patch a name once I know what it does. Most times I don't even intend to make a patch. Suppose, I compile something, then I find that some quick hack is needed to compile, then the hack becomes a reasonable general solution. When does it make sense to run "stg new"? Obviously, at the point when I know the patch is good enough to be kept and sent upstream. It happens after I change some files, not before.

It's actually very rare that I decide to fix something like "bug #42 from the tracker" before having changed a single line. It's also rare that I follow through without getting distracted or realizing that I'm fixing some other bug instead.

Also, "--force" is a strong word for a switch. It's normally used for options that could trigger information loss or unintended consequences that are hard to undo. Telling StGIT to record my changes hardly qualifies as anything dangerous.

I know of "stg rename", but I don't want to be forced to name a patch before it's ready.

Possible solutions:
1) "stg new --force" becomes "stg new" and "stg new" becomes "stg new
--empty", i.e. empty files can only be created with the "--empty"
switch.
2) "stg new --force" becomes "stg record" or something.
3) "stg new --force" becomes "stg new --record" or something.
4) "stg new" works both with and without modified files.
-- 
Regards,
Pavel Roskin
Next: Karl Hasselström
Message 1 of 19 in “StGIT: "stg new" vs "stg new --force"”
  1. Pavel RoskinJan 13, 2006
  2. Karl HasselströmJan 13, 2006
  3. Catalin MarinasJan 16, 2006
  4. Pavel RoskinJan 17, 2006
  5. Yann DirsonJan 17, 2006
  6. Pavel RoskinJan 17, 2006
  7. Yann DirsonJan 18, 2006
  8. Pavel RoskinJan 19, 2006
  9. Yann DirsonJan 19, 2006
  10. Pavel RoskinJan 20, 2006
  11. J. Bruce FieldsJan 20, 2006
  12. Pavel RoskinJan 24, 2006
  13. J. Bruce FieldsJan 24, 2006
  14. Pavel RoskinJan 24, 2006
  15. Catalin MarinasJan 24, 2006
  16. Catalin MarinasJan 21, 2006
  17. Pavel RoskinJan 22, 2006
  18. Catalin MarinasJan 21, 2006
  19. Catalin MarinasJan 21, 2006

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.