[gitg/wip/sindhus/interactive-rebase: 1/2] Add support for interactive rebase; and option - reword
- From: Sindhu Sundar <sindhus src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gitg/wip/sindhus/interactive-rebase: 1/2] Add support for interactive rebase; and option - reword
- Date: Mon, 9 Sep 2013 11:46:14 +0000 (UTC)
commit e2ffbaada66d6708b7ef5c39d2e6a628429b2dd3
Author: Sindhu S <sindhus live in>
Date: Sun Sep 8 00:11:41 2013 +0530
Add support for interactive rebase; and option - reword
gitg now has a command line argument --rebase-editor.
Starting gitg thus will invoke `git rebase -i M~N`
on the currently checkedout branch for the current repository,
where N is derived from the row that was selected before
interactive rebase was initiated. M currently is fixed to be
HEAD.
gitg/Makefile.am | 1 +
gitg/gitg-application.vala | 13 +++++++++++++
gitg/gitg-rebase-window.vala | 33 +++++++++++++++++++++++++++++++++
3 files changed, 47 insertions(+), 0 deletions(-)
---
diff --git a/gitg/Makefile.am b/gitg/Makefile.am
index cea2e78..52972fc 100644
--- a/gitg/Makefile.am
+++ b/gitg/Makefile.am
@@ -42,6 +42,7 @@ VALASOURCES = \
gitg-clone-dialog.vala \
gitg-author-details-dialog.vala \
gitg-resource.vala \
+ gitg-rebase-window.vala \
gitg-application.vala \
gitg-plugins-engine.vala \
gitg-ui-elements.vala \
diff --git a/gitg/gitg-application.vala b/gitg/gitg-application.vala
index 2395d2e..aa08a9e 100644
--- a/gitg/gitg-application.vala
+++ b/gitg/gitg-application.vala
@@ -41,6 +41,7 @@ public class Application : Gtk.Application
{
public static bool quit = false;
public static string activity;
+ public static string rebase;
public static bool no_wd = false;
public static ApplicationCommandLine command_line;
@@ -63,6 +64,9 @@ public class Application : Gtk.Application
{"no-wd", 0, 0, OptionArg.NONE,
ref no_wd, N_("Do not try to load a repository from the current working directory"),
null},
+ {"rebase", '\0', 0, OptionArg.STRING,
+ ref rebase, N_("Start gitg in rebase mode"), null},
+
{null}
};
}
@@ -72,6 +76,7 @@ public class Application : Gtk.Application
static construct
{
Options.activity = "";
+ Options.rebase = "";
}
private static void show_version_and_quit()
@@ -157,6 +162,14 @@ public class Application : Gtk.Application
return 0;
}
+ if (Options.rebase != "")
+ {
+ stderr.printf("Starting rebase: %s", Options.rebase);
+ var rebase_window = new RebaseWindow();
+ rebase_window.start();
+ return 0;
+ }
+
if (!cmd.get_is_remote())
{
Options.command_line = cmd;
diff --git a/gitg/gitg-rebase-window.vala b/gitg/gitg-rebase-window.vala
new file mode 100644
index 0000000..9c5d35a
--- /dev/null
+++ b/gitg/gitg-rebase-window.vala
@@ -0,0 +1,33 @@
+/*
+ * This file is part of gitg
+ *
+ * Copyright (C) 2013 - Sindhu S
+ *
+ * gitg is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * gitg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with gitg. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+
+namespace Gitg
+{
+
+public class RebaseWindow : Gtk.Window
+{
+ public RebaseWindow()
+ {
+ this.title = "gitg Rebase";
+
+ }
+}
+
+}
\ No newline at end of file
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]