Re: [PATCH 1/2] git-commit: Disallow unchanged tree in non-merge mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Shawn O. Pearce" <spearce@xxxxxxxxxxx> writes:

> 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.

Please don't do this.  If the user is doing something tricky, we
shouldn't override it.  A safety valve to help users avoid
common mistakes is a good thing; a straightjacket to forbid a
clever trick is not.

> 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?

Yeah, I also have to wonder.  Existing run_status call should
have taken care of things.
-
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

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux