From: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
To: git@vger.kernel.org
Cc: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Subject: [PATCH v2 22/22] rebase-interactive.c: remove the_repository references
Date: Sat, 10 Nov 2018 06:49:10 +0100 [thread overview]
Message-ID: <20181110054910.10568-23-pclouds@gmail.com> (raw)
In-Reply-To: <20181110054910.10568-1-pclouds@gmail.com>
While at there add a forward declaration for struct strbuf.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
builtin/rebase--interactive.c | 2 +-
rebase-interactive.c | 6 +++---
rebase-interactive.h | 5 ++++-
3 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/builtin/rebase--interactive.c b/builtin/rebase--interactive.c
index bd7d39e2af..dd2a55ab1d 100644
--- a/builtin/rebase--interactive.c
+++ b/builtin/rebase--interactive.c
@@ -240,7 +240,7 @@ int cmd_rebase__interactive(int argc, const char **argv, const char *prefix)
break;
}
case EDIT_TODO:
- ret = edit_todo_list(flags);
+ ret = edit_todo_list(the_repository, flags);
break;
case SHOW_CURRENT_PATCH: {
struct child_process cmd = CHILD_PROCESS_INIT;
diff --git a/rebase-interactive.c b/rebase-interactive.c
index 3cc19283ff..68aff1dac2 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;
}
diff --git a/rebase-interactive.h b/rebase-interactive.h
index 971da03776..17b6c9f6d0 100644
--- a/rebase-interactive.h
+++ b/rebase-interactive.h
@@ -1,8 +1,11 @@
#ifndef REBASE_INTERACTIVE_H
#define REBASE_INTERACTIVE_H
+struct strbuf;
+struct repository;
+
void append_todo_help(unsigned edit_todo, unsigned keep_empty,
struct strbuf *buf);
-int edit_todo_list(unsigned flags);
+int edit_todo_list(struct repository *r, unsigned flags);
#endif
--
2.19.1.1231.g84aef82467
next prev parent reply other threads:[~2018-11-10 5:49 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-10 5:48 [PATCH v2 00/22] Kill the_index part 5 Nguyễn Thái Ngọc Duy
2018-11-10 5:48 ` [PATCH v2 01/22] wt-status.c: remove implicit dependency on the_index Nguyễn Thái Ngọc Duy
2018-11-10 5:48 ` [PATCH v2 02/22] wt-status.c: remove implicit dependency the_repository Nguyễn Thái Ngọc Duy
2018-11-10 5:48 ` [PATCH v2 03/22] list-objects-filter.c: remove implicit dependency on the_index Nguyễn Thái Ngọc Duy
2018-11-10 5:48 ` [PATCH v2 04/22] list-objects.c: reduce the_repository references Nguyễn Thái Ngọc Duy
2018-11-10 5:48 ` [PATCH v2 05/22] notes-merge.c: remove implicit dependency on the_index Nguyễn Thái Ngọc Duy
2018-11-10 5:48 ` [PATCH v2 06/22] notes-merge.c: remove implicit dependency the_repository Nguyễn Thái Ngọc Duy
2018-11-10 5:48 ` [PATCH v2 07/22] transport.c: remove implicit dependency on the_index Nguyễn Thái Ngọc Duy
2018-11-10 5:48 ` [PATCH v2 08/22] sequencer.c: " Nguyễn Thái Ngọc Duy
2018-11-10 5:48 ` [PATCH v2 09/22] sequencer.c: remove implicit dependency on the_repository Nguyễn Thái Ngọc Duy
2018-11-10 5:48 ` [PATCH v2 10/22] blame.c: remove implicit dependency the_repository Nguyễn Thái Ngọc Duy
2018-11-10 5:48 ` [PATCH v2 11/22] bisect.c: remove the_repository reference Nguyễn Thái Ngọc Duy
2018-11-10 5:49 ` [PATCH v2 12/22] branch.c: " Nguyễn Thái Ngọc Duy
2018-11-10 5:49 ` [PATCH v2 13/22] bundle.c: remove the_repository references Nguyễn Thái Ngọc Duy
2018-11-10 5:49 ` [PATCH v2 14/22] cache-tree.c: " Nguyễn Thái Ngọc Duy
2018-11-10 5:49 ` [PATCH v2 15/22] delta-islands.c: " Nguyễn Thái Ngọc Duy
2018-11-10 5:49 ` [PATCH v2 16/22] diff-lib.c: " Nguyễn Thái Ngọc Duy
2018-11-10 5:49 ` [PATCH v2 17/22] line-log.c: remove the_repository reference Nguyễn Thái Ngọc Duy
2018-11-10 5:49 ` [PATCH v2 18/22] notes-cache.c: remove the_repository references Nguyễn Thái Ngọc Duy
2018-11-10 5:49 ` [PATCH v2 19/22] pack-check.c: " Nguyễn Thái Ngọc Duy
2018-11-10 5:49 ` [PATCH v2 20/22] pack-*.c: " Nguyễn Thái Ngọc Duy
2018-11-10 5:49 ` [PATCH v2 21/22] rerere.c: " Nguyễn Thái Ngọc Duy
2018-11-10 5:49 ` Nguyễn Thái Ngọc Duy [this message]
2018-11-12 5:53 ` [PATCH v2 00/22] Kill the_index part 5 Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181110054910.10568-23-pclouds@gmail.com \
--to=pclouds@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).