summaryrefslogtreecommitdiff
path: root/fast-import.c
diff options
context:
space:
mode:
Diffstat (limited to 'fast-import.c')
-rw-r--r--fast-import.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/fast-import.c b/fast-import.c
index f9906586ee..eddae22ea1 100644
--- a/fast-import.c
+++ b/fast-import.c
@@ -1111,9 +1111,7 @@ static int store_object(
if (last->no_swap) {
last->data = *dat;
} else {
- struct strbuf tmp = *dat;
- *dat = last->data;
- last->data = tmp;
+ strbuf_swap(&last->data, dat);
}
last->offset = e->offset;
}