git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Horst H. von Brand" <vonbrand@inf.utfsm.cl>
To: Carl Worth <cworth@cworth.org>
Cc: git@vger.kernel.org
Subject: Re: [RFC] Two conceptually distinct commit commands
Date: Mon, 04 Dec 2006 21:52:38 -0300	[thread overview]
Message-ID: <200612050052.kB50qcn2026534@laptop13.inf.utfsm.cl> (raw)
In-Reply-To: Message from Carl Worth <cworth@cworth.org>  of "Mon, 04 Dec 2006 11:08:22 -0800." <87d56z32e1.wl%cworth@cworth.org>

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

Edit somefile, utterly changing it: Get backup called somefile~
mv somefile newfile
commit-working-tree-contents: somefile~ saved, newfile lost

Edit somefile a bit, move it to newfile. Make sure no backups left over.
commit-working-tree-contents: somefile deleted, newfile lost

This is /not/ easy to get right, as it depends on what the user wants, and
the random programs run in between git commands.

You need to tell git somehow what files you want saved, and which ones are
junk. I.e., just the first command (unfortunately).
-- 
Dr. Horst H. von Brand                   User #22616 counter.li.org
Departamento de Informatica                    Fono: +56 32 2654431
Universidad Tecnica Federico Santa Maria             +56 32 2654239

  parent reply	other threads:[~2006-12-05  0:52 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-04 19:08 [RFC] Two conceptually distinct commit commands Carl Worth
2006-12-04 20:10 ` Carl Worth
2006-12-04 21:19   ` Jakub Narebski
2006-12-05  2:36     ` Carl Worth
2006-12-05  0:52 ` Horst H. von Brand [this message]
2006-12-05  1:18   ` Carl Worth
2006-12-05  2:14     ` Horst H. von Brand
2006-12-05  2:32       ` Carl Worth
2006-12-05  1:19   ` Jakub Narebski
2006-12-05  3:51 ` Theodore Tso
2006-12-05  6:33   ` Junio C Hamano
2006-12-05  6:38   ` Carl Worth
2006-12-06  1:13 ` Junio C Hamano
2006-12-06  4:53   ` Carl Worth
2006-12-06  9:54     ` Commit order in git.git, was " Johannes Schindelin
2006-12-06 16:14     ` Carl Worth
2006-12-06 18:31     ` Junio C Hamano
2006-12-06 23:29       ` Carl Worth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200612050052.kB50qcn2026534@laptop13.inf.utfsm.cl \
    --to=vonbrand@inf.utfsm.cl \
    --cc=cworth@cworth.org \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).