aboutsummaryrefslogtreecommitdiffstats
path: root/builtin/stash.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin/stash.c')
-rw-r--r--builtin/stash.c39
1 files changed, 25 insertions, 14 deletions
diff --git a/builtin/stash.c b/builtin/stash.c
index 1399a1bbe2..c212b1c0b2 100644
--- a/builtin/stash.c
+++ b/builtin/stash.c
@@ -249,7 +249,8 @@ static int do_clear_stash(void)
ref_stash, &obj, 0);
}
-static int clear_stash(int argc, const char **argv, const char *prefix)
+static int clear_stash(int argc, const char **argv, const char *prefix,
+ struct repository *repo UNUSED)
{
struct option options[] = {
OPT_END()
@@ -652,7 +653,8 @@ restore_untracked:
return ret;
}
-static int apply_stash(int argc, const char **argv, const char *prefix)
+static int apply_stash(int argc, const char **argv, const char *prefix,
+ struct repository *repo UNUSED)
{
int ret = -1;
int quiet = 0;
@@ -726,7 +728,8 @@ static int get_stash_info_assert(struct stash_info *info, int argc,
return 0;
}
-static int drop_stash(int argc, const char **argv, const char *prefix)
+static int drop_stash(int argc, const char **argv, const char *prefix,
+ struct repository *repo UNUSED)
{
int ret = -1;
int quiet = 0;
@@ -748,7 +751,8 @@ cleanup:
return ret;
}
-static int pop_stash(int argc, const char **argv, const char *prefix)
+static int pop_stash(int argc, const char **argv, const char *prefix,
+ struct repository *repo UNUSED)
{
int ret = -1;
int index = 0;
@@ -778,7 +782,8 @@ cleanup:
return ret;
}
-static int branch_stash(int argc, const char **argv, const char *prefix)
+static int branch_stash(int argc, const char **argv, const char *prefix,
+ struct repository *repo UNUSED)
{
int ret = -1;
const char *branch = NULL;
@@ -816,7 +821,8 @@ cleanup:
return ret;
}
-static int list_stash(int argc, const char **argv, const char *prefix)
+static int list_stash(int argc, const char **argv, const char *prefix,
+ struct repository *repo UNUSED)
{
struct child_process cp = CHILD_PROCESS_INIT;
struct option options[] = {
@@ -889,7 +895,8 @@ static void diff_include_untracked(const struct stash_info *info, struct diff_op
do_diff_cache(&info->b_commit, diff_opt);
}
-static int show_stash(int argc, const char **argv, const char *prefix)
+static int show_stash(int argc, const char **argv, const char *prefix,
+ struct repository *repo UNUSED)
{
int i;
int ret = -1;
@@ -1017,7 +1024,8 @@ static int do_store_stash(const struct object_id *w_commit, const char *stash_ms
return 0;
}
-static int store_stash(int argc, const char **argv, const char *prefix)
+static int store_stash(int argc, const char **argv, const char *prefix,
+ struct repository *repo UNUSED)
{
int quiet = 0;
const char *stash_msg = NULL;
@@ -1491,7 +1499,8 @@ done:
return ret;
}
-static int create_stash(int argc, const char **argv, const char *prefix UNUSED)
+static int create_stash(int argc, const char **argv, const char *prefix UNUSED,
+ struct repository *repo UNUSED)
{
int ret;
struct strbuf stash_msg_buf = STRBUF_INIT;
@@ -1827,12 +1836,14 @@ static int push_stash(int argc, const char **argv, const char *prefix,
return ret;
}
-static int push_stash_unassumed(int argc, const char **argv, const char *prefix)
+static int push_stash_unassumed(int argc, const char **argv, const char *prefix,
+ struct repository *repo UNUSED)
{
return push_stash(argc, argv, prefix, 0);
}
-static int save_stash(int argc, const char **argv, const char *prefix)
+static int save_stash(int argc, const char **argv, const char *prefix,
+ struct repository *repo UNUSED)
{
int keep_index = -1;
int only_staged = 0;
@@ -1878,7 +1889,7 @@ static int save_stash(int argc, const char **argv, const char *prefix)
int cmd_stash(int argc,
const char **argv,
const char *prefix,
- struct repository *repo UNUSED)
+ struct repository *repo)
{
pid_t pid = getpid();
const char *index_file;
@@ -1916,9 +1927,9 @@ int cmd_stash(int argc,
(uintmax_t)pid);
if (fn)
- return !!fn(argc, argv, prefix);
+ return !!fn(argc, argv, prefix, repo);
else if (!argc)
- return !!push_stash_unassumed(0, NULL, prefix);
+ return !!push_stash_unassumed(0, NULL, prefix, repo);
/* Assume 'stash push' */
strvec_push(&args, "push");