From: Junio C Hamano <junkio@cox.net>
To: Linus Torvalds <torvalds@osdl.org>
Cc: git@vger.kernel.org
Subject: Re: Do "git add" as a builtin
Date: Wed, 17 May 2006 12:06:13 -0700 [thread overview]
Message-ID: <7vhd3ocvyy.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: Pine.LNX.4.64.0605170927050.10823@g5.osdl.org
Linus Torvalds <torvalds@osdl.org> writes:
> ... I dropped the strange "--error-unmatch" test, because it
> was really ugly and I didn't see the point.
By "not seeing the point", do you mean you do not agree with
what bba319b5 and 45e48120 tried to do to help users?
$ git add no-such-path-in-the-tree
$ git add 'this-pattern-matches-nobody*'
More realistically:
$ git add Documentaiton ;# misspelled
[References]
(bba319b5)
When you say "git commit Documentaiton" to make partial commit
for the files only in that directory, we did not detect that as
a misspelled pathname and attempted to commit index without
change. If nothing matched, there is no harm done, but if the
index gets modified otherwise by having another valid pathspec
or after an explicit update-index, a user will not notice
without paying attention to the "git status" preview.
This introduces --error-unmatch option to ls-files, and uses it
to detect this common user error.
(45e48120)
This is in the same spirit as an earlier patch for git-commit.
It does an extra ls-files to avoid complaining when a fully
tracked directory name is given on the command line (otherwise
--others restriction would say the pathspec does not match).
next prev parent reply other threads:[~2006-05-17 19:06 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-17 16:33 Do "git add" as a builtin Linus Torvalds
2006-05-17 19:06 ` Junio C Hamano [this message]
2006-05-17 20:23 ` Linus Torvalds
2006-05-18 8:13 ` Junio C Hamano
2006-05-18 8:34 ` Junio C Hamano
2006-05-18 8:52 ` [WARNING] Please be careful when using "git add" from "next" branch Junio C Hamano
2006-05-19 6:28 ` FIXED: " Junio C Hamano
2006-05-18 15:26 ` Do "git add" as a builtin Linus Torvalds
2006-05-18 16:25 ` Linus Torvalds
2006-05-18 16:35 ` Linus Torvalds
2006-05-18 16:50 ` Junio C Hamano
2006-05-18 17:22 ` Linus Torvalds
2006-05-18 15:06 ` Linus Torvalds
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=7vhd3ocvyy.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