diff options
author | Jochen Hunz <j.hunz@anchorpoint.app> | 2021-04-14 22:05:47 +0200 |
---|---|---|
committer | Jochen Hunz <j.hunz@anchorpoint.app> | 2021-04-14 22:05:47 +0200 |
commit | 958205a33d9e9d078f41a9a3ac04dc7c657840c7 (patch) | |
tree | 52354de2213d4ddd8b205f37f894baa030b64261 /src/checkout.c | |
parent | ac77d306f539938aa599ba81faee52854c262328 (diff) | |
download | libgit2-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.c | 3 |
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] + |