aboutsummaryrefslogtreecommitdiffstats
path: root/diffcore-rotate.c
diff options
context:
space:
mode:
Diffstat (limited to 'diffcore-rotate.c')
-rw-r--r--diffcore-rotate.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/diffcore-rotate.c b/diffcore-rotate.c
index 445f060ab0..73ca20b331 100644
--- a/diffcore-rotate.c
+++ b/diffcore-rotate.c
@@ -2,14 +2,15 @@
* Copyright (C) 2021, Google LLC.
* Based on diffcore-order.c, which is Copyright (C) 2005, Junio C Hamano
*/
-#include "cache.h"
+#include "git-compat-util.h"
+#include "gettext.h"
#include "diff.h"
#include "diffcore.h"
void diffcore_rotate(struct diff_options *opt)
{
struct diff_queue_struct *q = &diff_queued_diff;
- struct diff_queue_struct outq;
+ struct diff_queue_struct outq = DIFF_QUEUE_INIT;
int rotate_to, i;
if (!q->nr)
@@ -30,7 +31,6 @@ void diffcore_rotate(struct diff_options *opt)
return;
}
- DIFF_QUEUE_CLEAR(&outq);
rotate_to = i;
for (i = rotate_to; i < q->nr; i++)