This change probably does even more than that: it allows amending of anything, even of a commit which does not change anything. Signed-off-by: Alex Riesen <raa.lkml@xxxxxxxxx> --- Alex Riesen, Thu, Feb 21, 2008 21:35:06 +0100: > Junio C Hamano, Thu, Feb 21, 2008 21:23:10 +0100: > > Alex Riesen <raa.lkml@xxxxxxxxx> writes: > > > > > > Well, it fails... In current master > > > > Then please mark it with test_expect_failure. > > That's because I expect it to be fixed (in the next mail) > In this one. I am a bit unsure regarding the change (it looks a little too strong), even though it passes the test suite. builtin-commit.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/builtin-commit.c b/builtin-commit.c index 065e1f7..ab3fd7b 100644 --- a/builtin-commit.c +++ b/builtin-commit.c @@ -520,6 +520,8 @@ static int prepare_to_commit(const char *index_file, const char *prefix) if (get_sha1(parent, sha1)) commitable = !!active_nr; + else if (amend) + commitable = 1; else { init_revisions(&rev, ""); rev.abbrev = 0; -- 1.5.4.2.204.g6d0ab - 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