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 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"

? IOW, I don't think git can know that you are making a mistake in your
case, since from its perspectives those same actions might be
reasonable. The real problem is that your intermediate index state is
never saved. Do we need an index reflog? :)

-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]