StGIT: "stg new" vs "stg new --force"
- From
- Pavel 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