Junio C Hamano:
Having said that, disabling --amend and forcing to use --force or
something when it is clear that the user is attempting something
unusual is a good idea. But I am not sure what the definition of
unusual should be.
For commit --amend, I would say it would refuse to amend if the commit
you are trying to amend
1. was not authored by yourself (and --reset-author was not given), or
2. is reachable (or is the tip?) from an upstream branch.
Of course, you should be able to do the amend commit, but then you
would need to say something like "git commit --amend --force" to
indicate that you really want to do that.
At least (1) would have saved myself from mistakes that take time and
effort to clean up (I have used Git for eight years or so already, and
I *still* do that kind of mistake every now and then).
--
\\// Peter - http://www.softwolves.pp.se/
--
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