Duy Nguyen wrote: > On Mon, Aug 20, 2018 at 9:30 PM Jonathan Nieder <jrnieder@xxxxxxxxx> wrote: >> I frequently use "git commit -a" this way intentionally, so I would be >> unlikely to turn this config on. That leads me to suspect it's not a >> good candidate for configuration: >> >> - it's not configuration for the sake of a transition period, since some >> people would keep it on forever >> >> - it's not configuration based on different project needs, either >> >> So configuration doesn't feel like a good fit. > > I think it falls under personal preference (yes some people like me > will keep it on forever in fear of losing staged changes). Sorry for the lack of clarity. I meant "some people would keep it off forever". >> That said, I lean toward your initial thought, that this is papering >> over a missing undo feature. Can you say more about how you'd imagine >> undo working? [...] > [1] https://public-inbox.org/git/1375597720-13236-1-git-send-email-pclouds@xxxxxxxxx/ > [2] https://public-inbox.org/git/1375966270-10968-1-git-send-email-pclouds@xxxxxxxxx/ Thanks for the links! That's very helpful. I'm starting to lean toward having this on unconditionally, with a message that points the user who really doesn't want to clobber their index toward "git add -u", as a good idea. I think that for humans, that would be okay and that configuration doesn't really help much for this. The remaining question becomes scripts. A script might do ... modify old-file and create new-file ... git add new-file git commit -m "some great message" which would trip this error. For that matter, humans might do that, too. Could the check detect this case (where the only changes in the index are additions of new files) and treat it as non-destructive? Thanks, Jonathan