git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/2] Add transport message for up-to-date references
@ 2024-03-12 21:55 Christopher Lindee
  2024-03-14  0:07 ` Junio C Hamano
  2024-03-14 21:44 ` Martin Ågren
  0 siblings, 2 replies; 9+ messages in thread
From: Christopher Lindee @ 2024-03-12 21:55 UTC (permalink / raw)
  To: git@vger.kernel.org; +Cc: Christopher Lindee

If the `--send-up-to-date` option in the previous commit is used, the
"Everything up-to-date!" message will never appear, even if all of the
refs are up to date.  Moreover, the output `deadbeef..deadbeef` appears
suspicious, almost as if a collision occurred.  To clarify that the hash
is, in fact, identical & to allow grepping for the phrase "up-to-date",
add a message to the output when the ref is transmitted, but no change
occurred.

Signed-off-by: Christopher Lindee <christopher.lindee@webpros.com>
---
 transport.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/transport.c b/transport.c
index 84deadd2b6..89802452ea 100644
--- a/transport.c
+++ b/transport.c
@@ -670,6 +670,8 @@ static void print_ok_ref_status(struct ref *ref,
 			strbuf_addstr(&quickref, "..");
 			type = ' ';
 			msg = NULL;
+			if (oideq(old_oid, new_oid))
+				msg = "up-to-date";
 		}
 		strbuf_add_unique_abbrev(&quickref, new_oid,
 					 DEFAULT_ABBREV);
-- 
2.38.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-03-15 16:54 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-12 21:55 [PATCH 2/2] Add transport message for up-to-date references Christopher Lindee
2024-03-14  0:07 ` Junio C Hamano
2024-03-15  6:09   ` Christopher Lindee
2024-03-15  6:47     ` Christopher Lindee
2024-03-15 16:49       ` Junio C Hamano
2024-03-15 16:42     ` Junio C Hamano
2024-03-14 21:44 ` Martin Ågren
2024-03-15  3:09   ` Christopher Lindee
2024-03-15 16:54     ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).