git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Alan Chandler <alan@chandlerfamily.org.uk>
To: git@vger.kernel.org
Cc: Linus Torvalds <torvalds@osdl.org>, Junio C Hamano <junkio@cox.net>
Subject: Re: Some advanced index playing
Date: Sun, 3 Dec 2006 20:11:25 +0000	[thread overview]
Message-ID: <200612032011.25922.alan@chandlerfamily.org.uk> (raw)
In-Reply-To: <Pine.LNX.4.64.0612031008360.3476@woody.osdl.org>

On Sunday 03 December 2006 18:24, Linus Torvalds wrote:
> On Sun, 3 Dec 2006, Alan Chandler wrote:
> > With all the discussion about the index file in the last few days I would
> > have thought that this issue would have come up.  But I don't think it
> > has.
> >
> > I have been editing a set of files to make a commit, and after editing
> > each one had done a git update-index.
> >
> > At this point I am just about to commit when I realise that one of the
> > files has changes in it that really ought to be a separate commit.
> >
> > So effectively, I want to do one of three things
> >
> > a) git-commit <that-file>
> >
> > Except I can't because there is a safety valve that prevents this and
> > there is no force option.
...
>
> 	git ls-tree HEAD -- that-file | git update-index --index-info
> 	git commit that-file

I don't quite understand this - maybe it should be

git ls-tree HEAD -- that-file | git update-index --index-info
git commit
git commit -a

either I want to ONLY commit that file at the working tree state (and index 
before these commands), or I want to commit ALL except this file (so I can 
later come and commit just that file)

so having reset the index to the state of HEAD for "that-file" then the commit 
should make a commit with all the other changes in the index (but NOT 
that-file) and then the git commit -a picks up "that-file"

-- 
Alan Chandler

  parent reply	other threads:[~2006-12-03 20:11 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-03 17:01 Some advanced index playing Alan Chandler
2006-12-03 18:24 ` Linus Torvalds
2006-12-03 19:36   ` Junio C Hamano
2006-12-03 20:11   ` Alan Chandler [this message]
2006-12-03 20:19     ` Jakub Narebski
2006-12-03 20:29       ` Alan Chandler
2006-12-03 20:40     ` Linus Torvalds
2006-12-04 10:41   ` Junio C Hamano
2006-12-03 18:31 ` Jakub Narebski
2006-12-03 18:34 ` Linus Torvalds
2006-12-03 20:26   ` Junio C Hamano
2006-12-05  3:48     ` [PATCH] git-explain Junio C Hamano
2006-12-05  3:55       ` Nicolas Pitre
2006-12-05  3:57         ` J. Bruce Fields
2006-12-05  6:09           ` Junio C Hamano
2006-12-05  7:26             ` Jeff King
2006-12-05  9:21               ` Eric Wong
2006-12-08 10:49                 ` [RFC/PATCH 0/5] WIP status/rerere reporting Eric Wong
2006-12-08 10:49                 ` [PATCH 1/5] rerere: avoid misrecording on a skipped or aborted rebase/am Eric Wong
2006-12-08 19:33                   ` Junio C Hamano
2006-12-08 20:04                     ` [PATCH 6/5] git-rerere: document the 'clear' and 'diff' commands Eric Wong
2006-12-08 20:43                   ` [PATCH 1/5] rerere: avoid misrecording on a skipped or aborted rebase/am Junio C Hamano
2006-12-08 21:28                     ` Eric Wong
2006-12-08 21:29                       ` [PATCH] rerere: add clear, diff, and status commands Eric Wong
2006-12-08 21:29                         ` [PATCH] rerere: record (or avoid misrecording) resolved, skipped or aborted rebase/am Eric Wong
2006-12-08 21:44                           ` Jakub Narebski
2006-12-08 21:50                             ` Eric Wong
2006-12-09 20:08                           ` Junio C Hamano
2006-12-08 10:49                 ` [PATCH 2/5] status: show files that would have resolutions recorded by rerere Eric Wong
2006-12-08 10:49                 ` [PATCH 3/5] am and rebase resolve states get picked up by status/commit Eric Wong
2006-12-08 10:49                 ` [PATCH 4/5] am: run git rerere to record resolution on successful --resolved Eric Wong
2006-12-08 10:49                 ` [PATCH 5/5] rerere: add the diff command Eric Wong
2006-12-08 12:07                   ` Jakub Narebski
2006-12-05 17:34               ` [PATCH] git-explain Horst H. von Brand
2006-12-05  8:58             ` Johannes Schindelin
2006-12-05 21:00               ` J. Bruce Fields
2006-12-05  9:11             ` Raimund Bauer
2006-12-05 10:43       ` Jakub Narebski
2006-12-05 23:00         ` Martin Langhoff
2006-12-05 23:07           ` Junio C Hamano
2006-12-05 23:37             ` Johannes Schindelin
2006-12-05 23:57               ` Junio C Hamano
2006-12-06  0:07                 ` Carl Worth
2006-12-06  0:27                 ` Johannes Schindelin
2006-12-06  1:50                   ` Nicolas Pitre
2006-12-03 20:40   ` Some advanced index playing Alan Chandler

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=200612032011.25922.alan@chandlerfamily.org.uk \
    --to=alan@chandlerfamily.org.uk \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    --cc=torvalds@osdl.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).