patch : gitporcess: Added git rebase interactive

4 views
Skip to first unread message

Rajesh Sola

unread,
Nov 26, 2008, 1:06:39 AM11/26/08
to ba...@devslashzero.com, tea...@googlegroups.com

   We set environment variable to GIT_EDITOR to gedit

We will replace it with our own UI later

Signed-off-by: Rajesh Sola <raj...@lisor.org>


diff --git a/src/gitprocess.cpp b/src/gitprocess.cpp

index 510578c..1b7fe5d 100644

--- a/src/gitprocess.cpp

+++ b/src/gitprocess.cpp

@@ -75,7 +75,25 @@ void GitProcess::setupChildProcess()

}

#endif

}

+void GitProcess::rebaseInteractive()

+{

+ emit notify("Getting help for command");

+ QStringList env = QProcess::systemEnvironment();

+ QStringList args;

+ args << "rebase";

+ args << "-i";

+ args << "HEAD~10";

+ env << "GIT_EDITOR=/usr/bin/gedit";

+ setEnvironment(env);

+ emit notify("rebase");

+ emit initOutputDialog();

+ QByteArray array = runGit(args,false,true);

+ notifyOutputDialog(QString(array));

+ sendGitOutput();

+ emit doneOutputDialog();

+

+}

QByteArray GitProcess::readAllStandardOutput()

{

#if defined Q_OS_UNIX

diff --git a/src/gitprocess.h b/src/gitprocess.h

index 535cc23..e44df13 100644

--- a/src/gitprocess.h

+++ b/src/gitprocess.h

@@ -97,6 +97,7 @@ Q_OBJECT

void getBranches();

void getRemoteBranches();

void getStatus();

+ void rebaseInteractive();

void cherryPick(QString);

//void checkout(QString ref);

void reset(QString ref,int type=0);

================================
Regards,
Rajesh Sola...
Reply all
Reply to author
Forward
0 new messages