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

Re: [RFC] Two conceptually distinct commit commands

From
Jakub Narebski <jnareb@gmail.com>
Date
Dec 5, 2006, 01:19 UTC
Message-ID
<el2hbm$oi0$1@sea.gmane.org>
In-Reply-To
<200612050052.kB50qcn2026534@laptop13.inf.utfsm.cl>
Horst H. von Brand wrote:
Show 26 quoted lines
> Carl Worth <cworth@cworth.org> wrote:
> 
> [...]
> 
>> Proposal
>> -------
>> Here are the two commit commands I would like to see in git:
>> 
>>   commit-index-content [paths...]
>> 
>>     Commits the content of the index for the given paths, (or all
>>     paths in the index). The index content can be manipulated with
>>     "git add", "git rm", "git mv", and "git update-index".
>> 
>>   commit-working-tree-content [paths...]
>> 
>>     Commits the content of the working tree for the given paths, (or
>>     all tracked paths). Untracked files can be committed for the first
>>     time by specifying their names on the command-line or by using
>>     "git add" to add them just prior to the commit. Any rename or
>>     removal of a tracked file will be detected and committed
>>     automatically.
> 
> Edit somefile with, e.g, emacs: Get backup called somefile~
> Realize that somefile is nonsense, delete it(s edited version)
> commit-working-tree-contents: Now you have the undesirable somefile~ saved
No, you don't, assuming that you have *~ in .gitignore or .git/info/exclude
> Edit somefile, utterly changing it: Get backup called somefile~
> mv somefile newfile
> commit-working-tree-contents: somefile~ saved, newfile lost
No, assuming that you use git-mv as you should.
> Edit somefile a bit, move it to newfile. Make sure no backups left over.
> commit-working-tree-contents: somefile deleted, newfile lost
No, as above.
-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
Previous: Carl WorthNext: Horst H. von Brand
Message 3 of 5 in “Re: [RFC] Two conceptually distinct commit commands”
  1. Horst H. von BrandDec 5, 2006
  2. Carl WorthDec 5, 2006
  3. Jakub NarebskiDec 5, 2006
  4. Horst H. von BrandDec 5, 2006
  5. Carl WorthDec 5, 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.