From: Junio C Hamano Date: Thu, 20 Oct 2016 16:30:05 GMT Subject: Re: tools for easily "uncommitting" parts of a patch I just commited? Message-ID: In-Reply-To: <20161020021323.tav5glu7xy4u7mtj@sigill.intra.peff.net> Jeff King writes: >> I still think it's worth while to add a check for git-commit which >> does something like check when we say "git commit " and if the >> index already has those files marked as being changed, compare them >> with the current contents of the file as in the checkout and quick >> saying "please don't do that" so as to avoid the problem in the first >> place. > ... > I suspect both of those would complain about legitimate workflows. > > I dunno. I do not ever use "git commit " myself. Users are different. I do use this all the time, and it is not unusual at all to have changed contents on paths other than already added to the index when I do so, i.e. an unrelated small typofix in jumping ahead of the real changes I am working on in other parts of the tree. "Please don't do that" would break. Jacob says "avoid the problem", but I do not see a problem in allowing it (it could be that the problem Jacob has is in other parts of his workflow, but I do not know what it is offhand).