"Dmitry V. Levin" <ldv@altlinux.org> wrote:OK, I was too rash on my original reply. I think the change you were going after was to try and prevent the user from ever keeping a commit that has the same tree as its parent and which is not a merge commit, as such commits are generally useless. That's actually what I expect git-commit to be doing today, and if it is not doing that then it really should be taught to be avoid it. I guess that's what your patch was about. So I take back my "NO". Hmm. I think you want something like this perhaps? if test "$tree" = "$current_tree" then if test z$amend = zt then echo >&2 "nothing to amend (use \"git reset --soft HEAD^\" to discard last commit)" else echo >&2 "nothing to commit" fi fi Because there's this weird trick where you can amend the last commit using a dirty index and in the process maybe cause the last commit to have the same tree as his parent. In such a case you would want to discard the last commit instead of amending it. But I have to also wonder, aside from the sick amend case I just talked about, how does one get to this part of git-commit.sh with nothing to 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 |
| holzheu | Re: [RFC/PATCH] Documentation of kernel messages |
| FUJITA Tomonori | Re: Integration of SCST in the mainstream Linux kernel |
git: | |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Gerrit Renker | [PATCH 13/37] dccp: Deprecate Ack Ratio sysctl |
| Arjan van de Ven | Re: [GIT]: Networking |
| Evgeniy Polyakov | Re: [BUG] New Kernel Bugs |
