summaryrefslogtreecommitdiff
path: root/builtin-checkout.c
diff options
context:
space:
mode:
authorDaniel Barkalow <barkalow@iabervon.org>2008-02-21 10:50:42 -0500
committerJunio C Hamano <gitster@pobox.com>2008-02-21 15:34:23 -0800
commit75ea38df66910dcb9d09f1320ae2787b5bc8211e (patch)
tree4b01de86f92c929da4410e2a8b7fe0482e91edbc /builtin-checkout.c
parent6010d2d957fb05838cd3ab887ac261752ff8ff87 (diff)
downloadgit-75ea38df66910dcb9d09f1320ae2787b5bc8211e.tar.gz
builtin-checkout.c: Remove unused prefix arguments in switch_branches path
This path doesn't actually care where in the tree you started out, since it must change the whole thing anyway. With the gratuitous bug removed, the argument is unused. Signed-off-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-checkout.c')
-rw-r--r--builtin-checkout.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/builtin-checkout.c b/builtin-checkout.c
index f51b77a6bc..e89b8f8ee0 100644
--- a/builtin-checkout.c
+++ b/builtin-checkout.c
@@ -205,8 +205,7 @@ static void setup_branch_path(struct branch_info *branch)
}
static int merge_working_tree(struct checkout_opts *opts,
- struct branch_info *old, struct branch_info *new,
- const char *prefix)
+ struct branch_info *old, struct branch_info *new)
{
int ret;
struct lock_file *lock_file = xcalloc(1, sizeof(struct lock_file));
@@ -429,8 +428,7 @@ static void update_refs_for_switch(struct checkout_opts *opts,
adjust_to_tracking(new, opts);
}
-static int switch_branches(struct checkout_opts *opts,
- struct branch_info *new, const char *prefix)
+static int switch_branches(struct checkout_opts *opts, struct branch_info *new)
{
int ret = 0;
struct branch_info old;
@@ -471,7 +469,7 @@ static int switch_branches(struct checkout_opts *opts,
opts->force = 1;
}
- ret = merge_working_tree(opts, &old, new, prefix);
+ ret = merge_working_tree(opts, &old, new);
if (ret)
return ret;
@@ -569,5 +567,5 @@ int cmd_checkout(int argc, const char **argv, const char *prefix)
die("Cannot switch branch to a non-commit.");
}
- return switch_branches(&opts, &new, prefix);
+ return switch_branches(&opts, &new);
}