aboutsummaryrefslogtreecommitdiff
path: root/test-parse-options.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-06-21 23:28:58 -0700
committerJunio C Hamano <gitster@pobox.com>2008-06-22 00:44:26 -0700
commit9022a495a3c407859560d4ac4a278c0d6ad58837 (patch)
tree38a8b3e0e2813cef7ebfcc69b094bc3bb06ffc65 /test-parse-options.c
parent73f03627f4f1b0f66b30fa96a25537f3600cce0b (diff)
downloadgit-9022a495a3c407859560d4ac4a278c0d6ad58837.tar.gz
git-9022a495a3c407859560d4ac4a278c0d6ad58837.tar.xz
rerere: rerere_created_at() and has_resolution() abstraction
There were too many places in the code how an entry in the rerere database looks like, and the garbage_collect() function that iterates over subdirectories of the rr-cache directory was the worse offender. Introduce two helper functions, rerere_created_at() and has_resolution(), to abstract out the logic a bit better. Incidentally this fixes a small memory leak in garbage_collect() function. The path list to collect the entries to be pruned were defined to strdup the paths but the caller was feeding a path after doing an extra copy. Because the list does not have to be sorted by conflict signature hash, we use path_list_append() instead of path_list_insert(). While we are at it, make a conflicted hunk comparision in handle_file() a bit easier to read. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'test-parse-options.c')
0 files changed, 0 insertions, 0 deletions