From 7f710ea98262c7d81006c16c727796d9e6aeaa81 Mon Sep 17 00:00:00 2001 From: Thomas Rast Date: Fri, 12 Mar 2010 18:04:36 +0100 Subject: notes: track whether notes_trees were changed at all Currently, the notes copying is a bit wasteful since it always creates new trees, even if no notes were copied at all. Teach add_note() and remove_note() to flag the affected notes tree as changed ('dirty'). Then teach builtin/notes.c to use this knowledge and avoid committing trees that weren't changed. Signed-off-by: Thomas Rast Acked-by: Johan Herland Signed-off-by: Junio C Hamano --- notes.h | 1 + 1 file changed, 1 insertion(+) (limited to 'notes.h') diff --git a/notes.h b/notes.h index b7fafb448b..ee65bd1a24 100644 --- a/notes.h +++ b/notes.h @@ -40,6 +40,7 @@ extern struct notes_tree { char *ref; combine_notes_fn *combine_notes; int initialized; + int dirty; } default_notes_tree; /* -- cgit v1.2.1