projects
/
gitlive
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
41072f7
)
GitMonitor.vala
author
Alan Knowles
<alan@roojs.com>
Fri, 5 Sep 2014 03:55:10 +0000
(11:55 +0800)
committer
Alan Knowles
<alan@roojs.com>
Fri, 5 Sep 2014 03:55:10 +0000
(11:55 +0800)
GitMonitor.vala
patch
|
blob
|
history
diff --git
a/GitMonitor.vala
b/GitMonitor.vala
index
09e2886
..
6a67288
100644
(file)
--- a/
GitMonitor.vala
+++ b/
GitMonitor.vala
@@
-123,6
+123,24
@@
public class GitMonitorQueue : MonitorNamePathDir {
return ret;
}
return ret;
}
+
+ public static bool GitMonitorQueue.queueHas(Array<GitMonitorQueue> list , GitMonitorQueue cmd_s, string action)) {
+ for(var i =0; i < list.length; i++) {
+ var test = list.index(i);
+ if (list.index(i).gitpath != cmd_s.gitpath) {
+ continue
+ }
+ if (list.index(i).vname != cmd_s.vname) {
+ continue
+ }
+ if (list.index(i).action != action) {
+ continue
+ }
+ return true;
+ }
+ return false;
+ }
+
}
}
@@
-695,7
+713,7
@@
public class GitMonitor : Monitor
var cmd = new GitMonitorQueue(dest);
cmd.action = "commit";
cmd.message = "MOVED " + cmd_s.vname + " to " + cmd_d.vname;
var cmd = new GitMonitorQueue(dest);
cmd.action = "commit";
cmd.message = "MOVED " + cmd_s.vname + " to " + cmd_d.vname;
- if (GitMonitorQueue.queueHas(cmd_s, "add")) {
+ if (GitMonitorQueue.queueHas(
this.queue,
cmd_s, "add")) {
cmd.message = cmd_d.vname;
}
cmd.message = cmd_d.vname;
}