Re: 'commit -a' safety (was: Re: Please default to 'commit -a' when no changes were added)

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

 



On Sat, 24 Apr 2010, Petr Baudis wrote:

> On Sat, Apr 24, 2010 at 02:35:17PM -0400, Nicolas Pitre wrote:
> > In that case the deficiency is in the fact that no reflog preserves the 
> > intermediate state of the index, not the fact that you might be allowed 
> > to do it.  Strictly speaking there is no intermediate ref to log, but a 
> > synthetic commit could be created for this case just like a stash but 
> > stored in the current branch's reflog.
> 
> Possibly, but I don't see how is this better than the check - it is less
> user friendly, most importantly because user that has not seen this
> twice has no idea that anything *was* saved to a reflog.

Possibly.  But the fact that some data could be lost here is a flaw.  
The reflog is the safety net making sure that whatever the user does is 
not completely destructive.

> Are there valid user scenarios where you customize your index, then want
> to override that using -a without thinking twice?

Admittedly there aren't many.  And in those few hypothetical cases then 
requiring -f would be acceptable.


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