summaryrefslogtreecommitdiff
path: root/rebase-interactive.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2018-11-10 05:49:10 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-11-12 05:50:06 (GMT)
commit36e7ed69de2c07a0214e79bde45714b92ac30ff2 (patch)
tree97cb7b7dcbfe7385d6f21ff994fa60937e681069 /rebase-interactive.c
parent55e6b3547d4a678e56e3aef16ad3a3c90351325a (diff)
downloadgit-36e7ed69de2c07a0214e79bde45714b92ac30ff2.zip
git-36e7ed69de2c07a0214e79bde45714b92ac30ff2.tar.gz
git-36e7ed69de2c07a0214e79bde45714b92ac30ff2.tar.bz2
rebase-interactive.c: remove the_repository references
While at there add a forward declaration for struct strbuf. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'rebase-interactive.c')
-rw-r--r--rebase-interactive.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/rebase-interactive.c b/rebase-interactive.c
index 3cc1928..68aff1d 100644
--- a/rebase-interactive.c
+++ b/rebase-interactive.c
@@ -53,7 +53,7 @@ void append_todo_help(unsigned edit_todo, unsigned keep_empty,
}
}
-int edit_todo_list(unsigned flags)
+int edit_todo_list(struct repository *r, unsigned flags)
{
struct strbuf buf = STRBUF_INIT;
const char *todo_file = rebase_path_todo();
@@ -69,7 +69,7 @@ int edit_todo_list(unsigned flags)
strbuf_release(&buf);
- transform_todos(the_repository, flags | TODO_LIST_SHORTEN_IDS);
+ transform_todos(r, flags | TODO_LIST_SHORTEN_IDS);
if (strbuf_read_file(&buf, todo_file, 0) < 0)
return error_errno(_("could not read '%s'."), todo_file);
@@ -85,7 +85,7 @@ int edit_todo_list(unsigned flags)
if (launch_sequence_editor(todo_file, NULL, NULL))
return -1;
- transform_todos(the_repository, flags & ~(TODO_LIST_SHORTEN_IDS));
+ transform_todos(r, flags & ~(TODO_LIST_SHORTEN_IDS));
return 0;
}