git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: Linus Torvalds <torvalds@osdl.org>
Cc: git@vger.kernel.org
Subject: Re: git commit (or git-commit-script) question
Date: Fri, 19 Aug 2005 12:52:01 -0700	[thread overview]
Message-ID: <7vd5o9yaam.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <Pine.LNX.4.58.0508191028190.3412@g5.osdl.org> (Linus Torvalds's message of "Fri, 19 Aug 2005 10:36:35 -0700 (PDT)")

Linus Torvalds <torvalds@osdl.org> writes:

> However, one thing to look out for is that if you've marked any files for 
> update (with git-update-cache) those will always be committed regardless 
> of what arguments you give to "git commit".

Another thing to look out for is that the files you told it
about with "git add" will be included and does not show up in
"git diff", because there currently is no way to record "intent
to add" (rather, "Mr GIT, please keep an eye on this file")
without actually adding a path to the index file for inclusion
in the next commit.

I have a couple of updates to git-commit-script in the proposed
updates branch, and one of the changes is that git-update-cache
in git-commit-script, used when either the --all flag or
explicit paths are given, has a --remove flag there.  The reason
it does not need --add flag there as well is a direct
consequence of this asymmetry.

Although I do not think this asymmetry a major source of
confusion, I suspect that we could "fix" it by treating an index
entry with all-zero mode and sha1 as "keep-an-eye-on" entry with
a new flag "git-update-cache --watch <path>" or something like
that.  "git-diff-files" would then treat that special entry as a
nonexistent path and would compare it with whatever happens to
be (or lack of it) in the working tree, and "git diff" would
show a diff that creates the file.  This needs a tweak or two in
the diffcore machinery as well.

      parent reply	other threads:[~2005-08-19 19:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-19 17:06 git commit (or git-commit-script) question Johnny Stenback
2005-08-19 17:36 ` Linus Torvalds
2005-08-19 17:44   ` Johnny Stenback
2005-08-19 19:52   ` Junio C Hamano [this message]

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

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

  git send-email \
    --in-reply-to=7vd5o9yaam.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=git@vger.kernel.org \
    --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.
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 NNTP newsgroup(s).