Commit f93beebcba473dc4c60fa25272b805f04ef0541b

Edward Thomson 2021-08-30T08:49:00

filter: don't overwrite error value

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/src/filter.c b/src/filter.c
index f1d9614..dd7d2f7 100644
--- a/src/filter.c
+++ b/src/filter.c
@@ -206,7 +206,8 @@ int git_filter_global_init(void)
 			GIT_FILTER_IDENT, ident, GIT_FILTER_IDENT_PRIORITY) < 0)
 		error = -1;
 
-	error = git_runtime_shutdown_register(git_filter_global_shutdown);
+	if (!error)
+		error = git_runtime_shutdown_register(git_filter_global_shutdown);
 
 done:
 	if (error) {