[gitg/wip/sindhus/interactive-rebase] Slice the git-rebase-todo array into 3 cols and n rows
- From: Sindhu Sundar <sindhus src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gitg/wip/sindhus/interactive-rebase] Slice the git-rebase-todo array into 3 cols and n rows
- Date: Mon, 9 Sep 2013 12:22:05 +0000 (UTC)
commit 9b85503c114f06904edecf0246c2fd7eb8c1bdb2
Author: Sindhu S <sindhus live in>
Date: Mon Sep 9 17:51:19 2013 +0530
Slice the git-rebase-todo array into 3 cols and n rows
gitg/gitg-rebase-parser.vala | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/gitg/gitg-rebase-parser.vala b/gitg/gitg-rebase-parser.vala
index 576d6c8..b069686 100644
--- a/gitg/gitg-rebase-parser.vala
+++ b/gitg/gitg-rebase-parser.vala
@@ -29,6 +29,7 @@ namespace Gitg
{
string contents;
int line_number=0;
+ string[,] rebase_array = {};
try
{
@@ -39,9 +40,18 @@ namespace Gitg
var file_lines = contents.split("\n");
while (file_lines[line_number][0] != '#')
{
- stdout.printf("\n" + file_lines[line_number]);
+ string[] temp_array = new string [3]
+ string current_line = file_lines[line_number];
+ var line_words = current_line.split(" ");
+ temp_array[0] = line_words[0];
+ temp_array[1] = line_words[1];
+ temp_array[2] = string.joinv(" ", line_words[2:line_words.length-1]);
+ rebase_array += temp_array;
+ stdout.printf("action:%s, sha:%s, msg:%s", temp_array[0], temp_array[1],
temp_array[2]);
line_number++;
}
+
+
}
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]