On 02/22/2017 03:04 PM, Nguyễn Thái Ngọc Duy wrote:
quoted hunk ↗ jump to hunk
Signed-off-by: Nguyễn Thái Ngọc Duy <redacted>
---
refs.c | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/refs.c b/refs.c
index 81b64b4ed..dab1a21ac 100644
--- a/refs.c
+++ b/refs.c
@@ -1456,15 +1456,23 @@ static struct ref_store *ref_store_init(const char *submodule)
return refs;
}
+static struct ref_store *get_main_ref_store(void)
+{
+ struct ref_store *refs;
+
+ if (main_ref_store)
+ return main_ref_store;
+
+ refs = ref_store_init(NULL);
+ return refs;
Unnecessary temporary variable?
[...]
Michael