From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fhigh-a8-smtp.messagingengine.com (fhigh-a8-smtp.messagingengine.com [103.168.172.159]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DCB0F37B007 for ; Mon, 8 Jun 2026 12:16:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.159 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780920997; cv=none; b=S7pYTGkXLf/Fw5hORoHOmuBXGqgyFBrBmG+Epp9jalESYjPgbp6eqBYMnj1OHei+jKB3LNqDtrHnnb5kL5whZLUlmYu2e6msU7bZpwqYdNk+gdIMRzk70e60D3A0tvcpfSIgMkLz3SVfAsLmXLiNcXkFbWHHEXTX9odsbEWj860= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780920997; c=relaxed/simple; bh=OLmWyvCdpGxNiQs51e+fFf1SIQxuPX4HZnnCFMNrAck=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=U9HQvFBqTlD0mj0jwSVi6S/S9jfbTWR1AQ44ziFbRnKuE9jceo429UEnIR0iX3AhYwWonxVFvQh1HcxTO+X3x9oINHqOaUXO03agZ1advx1pCZXpIIV0uRCAzWDCm2TbJCE1Xrrs9unwVnfP3lOHkKPzVfdCn+sbfrq1kpZqdDs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=pobox.com; spf=pass smtp.mailfrom=pobox.com; dkim=pass (2048-bit key) header.d=pobox.com header.i=@pobox.com header.b=BYSKtIQD; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=lVX5wQrB; arc=none smtp.client-ip=103.168.172.159 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=pobox.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pobox.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pobox.com header.i=@pobox.com header.b="BYSKtIQD"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="lVX5wQrB" Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfhigh.phl.internal (Postfix) with ESMTP id 1EA9E140004C; Mon, 8 Jun 2026 08:16:35 -0400 (EDT) Received: from phl-frontend-02 ([10.202.2.161]) by phl-compute-04.internal (MEProxy); Mon, 08 Jun 2026 08:16:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pobox.com; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm3; t=1780920995; x=1781007395; bh=PThEpS82Go br7mANEh6v09kYUEsynkVxBM1ogNoE36E=; b=BYSKtIQDf/F+sRBUwrwMS81Fqi /B4vQWTGd5JFKJluzVqKI+t0qLRFc9ycqu3XZgkDfEHyOGysorXz8tGsXBw4Pzoh 8Ez/fK9wFUJxQ5aYPkJNeRVCnUjc1sbbwygJ/5lGKTMknEgbmzq0oARQBup/97TC DfF/HXLn5DHZsJMKQ6F60NCpN2MFAi3K/JFIBTXefwqZtkLb2nhNqt9BMeVdo81Q 0E1iiVn2G+5pUSXSGBmMuXj2TX6eyBoYToGaH18SyRLPQRroYAXjS/6T9RAmppAC jeMArh/1sY/hFiRSv9zIEe9cPPBnX4jN9GfI2K6RnMo2SdGgsBDHfrxTxz8Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1780920995; x=1781007395; bh=PThEpS82Gobr7m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na+gwp0uOGdh6Wznb4dA X-ME-Proxy: Feedback-ID: if26b431b:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 8 Jun 2026 08:16:34 -0400 (EDT) From: Junio C Hamano To: Pablo Sabater Cc: git@vger.kernel.org, Patrick Steinhardt , Kaartic Sivaraam Subject: Re: [PATCH RFC 2/2] builtin/history: print feedback after successful reword In-Reply-To: <20260607-ps-history-reword-v1-2-ba43a3cbb81b@gmail.com> (Pablo Sabater's message of "Sun, 07 Jun 2026 22:07:21 +0200") References: <20260607-ps-history-reword-v1-0-ba43a3cbb81b@gmail.com> <20260607-ps-history-reword-v1-2-ba43a3cbb81b@gmail.com> Date: Mon, 08 Jun 2026 05:16:33 -0700 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Pablo Sabater writes: > Unlike `git commit --amend` and `git rebase -i`, `git history reword` > doesn't print anything, this makes it feel empty for a porcelain command > and hard to tell if the command did anything without using other > commands like `git log ` to check if the reword was done. > > Print a message on successful rewords so the user has feedback about it. > > Signed-off-by: Pablo Sabater > --- > builtin/history.c | 4 ++++ > t/t3451-history-reword.sh | 14 ++++++++++++++ > 2 files changed, 18 insertions(+) > > diff --git a/builtin/history.c b/builtin/history.c > index 51a22a9a1c..0f1ba3b531 100644 > --- a/builtin/history.c > +++ b/builtin/history.c > @@ -739,6 +739,10 @@ static int cmd_history_reword(int argc, > goto out; > } > > + fprintf(stderr, _("Successfully reworded commit %s to %s\n"), > + repo_find_unique_abbrev(repo, &original->object.oid, DEFAULT_ABBREV), > + repo_find_unique_abbrev(repo, &rewritten->object.oid, DEFAULT_ABBREV)); > + > ret = 0; > > out: Do other commands in "git history" (split is in 'master', drop and fixup are cooking) behave with similar verbosity? Consistency within the same "history" umbrella matters more than being similar with other commands that can be used for similar purposes. > diff --git a/t/t3451-history-reword.sh b/t/t3451-history-reword.sh > index 54ea8a7207..4b22d761e3 100755 > --- a/t/t3451-history-reword.sh > +++ b/t/t3451-history-reword.sh > @@ -416,4 +416,18 @@ test_expect_success 'aborts if the commit message is the same' ' > ) > ' > > +test_expect_success 'prints feedback on successful reword' ' > + test_when_finished "rm -rf repo" && > + git init repo && > + ( > + cd repo && > + test_commit first && > + > + reword_with_message HEAD 2>err <<-EOF && > + first reworded > + EOF > + test_grep "Successfully reworded" err > + ) > +' > + > test_done