Make some strbuf_*() struct strbuf arguments const.
[gitweb.git] / builtin-reflog.c
index 0711728908f8e387fb061e537ab4a72f8feb63aa..125d455b97ca499806ff417871ab6ce7aad922c5 100644 (file)
@@ -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;