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

Re: [RFC] Introduce "git stage" (along with some heresy)

From
Sam Vilain <sam@vilain.net>
Date
Dec 2, 2006, 21:03 UTC
Message-ID
<4571EA24.4080907@vilain.net>
In-Reply-To
<87slfzfri7.wl%cworth@cworth.org>
Carl Worth wrote:
Show 9 quoted lines
> Change #2: Make a staged commit an explicit act
> ===============================================
> The "-a" stands out to me here as the only command-line option needed
> in the first list, and the only command in the second list that
> performs a staged operation by default. So change number to is to
> redefine "commit" to mean what "commit -a" meant before and to require
> a new command-line option for staged committing, (the best naming I
> have so far is "commit --staged" with a shortcut of "commit -i"---the
> mismatch of "'i' as short for --staged" is a bit unlovely I admit).

I wonder about backwards compatibility, but then another part of me says that porcelain are probably using "git-commit-tree" anyway.

How about considering alternative words? Like "git save" for this higher level and more user friendly interface.

As another idea (brainstorming here), what about an "autocommit" approach?
  git rm       # removes files and asks for commit message
  git add      # ditto
  git commit   # updates and commits everything
  git stage    # starts a staged commit
  git add      # modifies staging area
  git rm       # ditto
  git stage filename # adds contents to staging area
  git commit   # saves staging area as commit

Then you could have "core.autocommit" as a repo-config option, defaulting to off for "backwards compatibility".

Show 7 quoted lines
> Change #3: Change "add" to not stage any content
> ================================================
> To finish off, I'd like to propose descriptions of the commands to
> allow the user to use the "without staging" commands as a complete set
> while being able to easily ignore any of the staging capabilities.
> This does trigger a need for a semantic change in the "add"
> command. Here are the proposed descriptions:
The "autocommit" concept may make this less of an issue.
Previous: Marko MacekNext: Wink Saville
Message 4 of 5 in “[RFC] Introduce "git stage" (along with some heresy)”
  1. Carl WorthDec 1, 2006
  2. Some thoughts on resolving conflictsCarl Worth, Dec 1, 2006
  3. Marko MacekDec 1, 2006
  4. Sam VilainDec 2, 2006
  5. Wink SavilleDec 2, 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.