@@ -18,6 +18,12 @@ skipping more commits at a time, reducing the number of round trips.
* `protocol.version=2` speeds up fetches from repositories with many refs by
allowing the client to specify which refs to list before the server lists
them.
++
+* `push.forceIfIncludesWithLease=true` adds `--force-if-includes` as an
+additional option along with `--force-with-lease[=<refname>[:<expect>]`
+when "<refname>" or "<expect>" valus are unspecified for linkgit:git-push[1].
+Allows forced updates only if the local branch has incorporated changes
+from the remote-tracking ref.
feature.manyFiles::
Enable config options that optimize for repos with many files in the
@@ -540,6 +540,17 @@ static int git_push_config(const char *k, const char *v, void *cb)
else
*flags &= ~TRANSPORT_PUSH_FORCE_IF_INCLUDES;
+ return 0;
+ } else if (!strcmp(k, "feature.experimental")) {
+ /*
+ * Set `push.forceIfIncludesWithLease` to true,
+ * if experimental features are enabled.
+ */
+ if (git_config_bool(k, v))
+ *flags |= TRANSPORT_PUSH_FORCE_IF_INCLUDES;
+ else
+ *flags &= ~TRANSPORT_PUSH_FORCE_IF_INCLUDES;
+
return 0;
}
return git_default_config(k, v, NULL);
Set `push.forceIfIncludesWithLease` to `true` if experimental features are enabled. Signed-off-by: Srinidhi Kaushik <shrinidhi.kaushik@gmail.com> --- Documentation/config/feature.txt | 6 ++++++ builtin/push.c | 11 +++++++++++ 2 files changed, 17 insertions(+)