summaryrefslogtreecommitdiff
path: root/src/checkout.c
diff options
context:
space:
mode:
authorJochen Hunz <j.hunz@anchorpoint.app>2021-04-14 22:05:47 +0200
committerJochen Hunz <j.hunz@anchorpoint.app>2021-04-14 22:05:47 +0200
commit958205a33d9e9d078f41a9a3ac04dc7c657840c7 (patch)
tree52354de2213d4ddd8b205f37f894baa030b64261 /src/checkout.c
parentac77d306f539938aa599ba81faee52854c262328 (diff)
downloadlibgit2-958205a33d9e9d078f41a9a3ac04dc7c657840c7.tar.gz
implement GIT_CHECKOUT_DRY_RUN to allow notifications without touching the working directory
Diffstat (limited to 'src/checkout.c')
-rw-r--r--src/checkout.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/checkout.c b/src/checkout.c
index 65487993b..7d3b035a9 100644
--- a/src/checkout.c
+++ b/src/checkout.c
@@ -2606,6 +2606,9 @@ int git_checkout_iterator(
if ((error = checkout_get_actions(&actions, &counts, &data, workdir)) != 0)
goto cleanup;
+ if (data.strategy & GIT_CHECKOUT_DRY_RUN)
+ goto cleanup;
+
data.total_steps = counts[CHECKOUT_ACTION__REMOVE] +
counts[CHECKOUT_ACTION__REMOVE_CONFLICT] +
counts[CHECKOUT_ACTION__UPDATE_BLOB] +