Re: [PATCH] commit: detect misspelled pathspec while making a partial commit.
- From
Petr Baudis <pasky@suse.cz>
- Date
- Feb 14, 2006, 21:25 UTC
- Message-ID
- <20060214212552.GH31278@pasky.or.cz>
- In-Reply-To
- <7vfymlr7n8.fsf@assigned-by-dhcp.cox.net>
Dear diary, on Tue, Feb 14, 2006 at 09:46:03PM CET, I got a letter where Junio C Hamano <junkio@cox.net> said that...
Show 17 quoted lines
> 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. > > Signed-off-by: Junio C Hamano <junkio@cox.net> > > --- > > * Pasky, does this address the issue you mentioned earlier on > the #git channnel?
Yes, this is what I meant. I actually have no practical experience with this since I'm not a git-commit user, I merely expressed horror ;) on what you mentioned during the night. BUT it turns out that this affects Cogito as well, albeit in a milder version - only when you pass multiple explicit paths to cg-commit and some of them are misspelled, they are ignored quietly (unless all of them are misspelled).
So, thanks for the fix on behalf of Cogito users as well. ;-)
-- Petr "Pasky" Baudis Stuff: http://pasky.or.cz/ Of the 3 great composers Mozart tells us what it's like to be human, Beethoven tells us what it's like to be Beethoven and Bach tells us what it's like to be the universe. -- Douglas Adams