Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--builtin-reflog.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/builtin-reflog.c b/builtin-reflog.c
index 0711728908..125d455b97 100644
--- a/builtin-reflog.c
+++ b/builtin-reflog.c
@@ -441,6 +441,17 @@ static void set_reflog_expiry_param(struct cmd_reflog_expire_cb *cb, int slot, c
}
}
+ /*
+ * If unconfigured, make stash never expire
+ */
+ if (!strcmp(ref, "refs/stash")) {
+ if (!(slot & EXPIRE_TOTAL))
+ cb->expire_total = 0;
+ if (!(slot & EXPIRE_UNREACH))
+ cb->expire_unreachable = 0;
+ return;
+ }
+
/* Nothing matched -- use the default value */
if (!(slot & EXPIRE_TOTAL))
cb->expire_total = default_reflog_expire;