"Dmitry V. Levin" <ldv@altlinux.org> wrote:A laudable goal. git-gui also does this. Turns out the other checks within git-gui prevent the user from ever getting that far. I probably should remove the empty tree check as it costs CPU time to get the old tree. But I'd rather have the safety check. NO. `git commit --amend` is *often* used for fixing the commit message. Or adding additional detail. Forcing the user to do a `git reset --soft HEAD^ && git commit --amend` just because you don't want git-commit to make an "empty commit" (which it doesn't usually like to do now anyway!) is a major step back in functionality. NACK. The better way to get the old tree would be this: current_tree="$(git rev-parse "$current${amend:+^}^{tree}" 2>/dev/null as it avoids the tool from needing to know about the internal representation of a commit object. It also avoids an entire fork+exec of a sed process. That message is a bad idea. Doing a mixed mode reset will also reset the index, causing the user to lose any changes that had already been staged. This may actually be difficult for him/her to recover from if they have used `git add -i` or git-gui to stage only certain hunks of files, or if their working tree has been further modified after the commit but they want to go back and amend the message only of the prior commit. -- Shawn. - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
| Tarkan Erimer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| Linus Torvalds | Re: init's children list is long and slows reaping children. |
| Kohei KaiGai | [PATCH 0/3] exporting capability name/code pairs (final#2) |
git: | |
| Gerrit Renker | [PATCH 33/37] dccp: Initialisation framework for feature negotiation |
| Jarek Poplawski | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Arjan van de Ven | Re: [GIT]: Networking |
| Mark Ryden | Re: Linux Wireless Mini-Summit -- Ottawa -- July 22, 2008 |
