Re: non-empty index with git commit -a

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Feb 15, 2011 at 09:20:47PM -0600, Jonathan Nieder wrote:

> Jeff King wrote:
> > On Tue, Feb 15, 2011 at 10:43:53PM +0000, Sverre Rabbelier wrote:
> 
> >> Can we please fix this?
> >>
> >> $ hack hack hack
> >> $ git add -p # carefully add my changes
> >> $ git commit -am "Add feature foo"
> >> $ DAAAMN YOUUU FINGERS!!
> >>
> >> I remember bringing this up before, but I can't remember what the
> >> discussion ended up coming to.
> >
> > How do you differentiate this from:
> >
> >   $ hack hack hack
> >   $ git add -p ;# carefully add my changes
> >   $ hack hack hack
> >   $ git diff ;# ok, everything looks good
> >   $ git commit -am "Add feature foo"
> >
> > ?
> 
> If I remember the discussion[1] correctly, by requiring a separate
> add -u step (or commit -f -a) if the "I don't trust my fingers"
> configuration is enabled.
> 
> [1] http://thread.gmane.org/gmane.linux.debian.devel.bugs.general/698001/focus=145662

Thanks for the link, I didn't recall that discussion. I have no problem
with a config option that requires an extra step, but such a safety
valve should definitely be optional, since the current behavior is part
of a perfectly reasonable workflow.

-Peff
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]