diff options
author | Michael J Gruber <git@drmicha.warpmail.net> | 2010-05-14 23:42:07 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-05-19 23:57:18 -0700 |
commit | a9f2adff802308481f2e638bae0c5b6e205251a3 (patch) | |
tree | d07556227fcb7ff083ab7032751b247052c6a9d2 /notes.h | |
parent | 0e4607c09d72ada4942ea49298dba83ec4145892 (diff) | |
download | git-a9f2adff802308481f2e638bae0c5b6e205251a3.tar.gz |
notes: dry-run and verbose options for prune
Introduce -n and -v options for "git notes prune" in complete analogy to
"git prune" so that one can check for dangling notes easily.
The output is a list of names of objects whose notes would be resp.
are removed so that one can check the object ("git show sha1") as well as
the note ("git notes show sha1").
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Acked-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'notes.h')
-rw-r--r-- | notes.h | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -171,6 +171,9 @@ int for_each_note(struct notes_tree *t, int flags, each_note_fn fn, */ int write_notes_tree(struct notes_tree *t, unsigned char *result); +/* Flags controlling the operation of prune */ +#define NOTES_PRUNE_VERBOSE 1 +#define NOTES_PRUNE_DRYRUN 2 /* * Remove all notes annotating non-existing objects from the given notes tree * @@ -181,7 +184,7 @@ int write_notes_tree(struct notes_tree *t, unsigned char *result); * structure are not persistent until a subsequent call to write_notes_tree() * returns zero. */ -void prune_notes(struct notes_tree *t); +void prune_notes(struct notes_tree *t, int flags); /* * Free (and de-initialize) the given notes_tree structure |