- //f.repo = new imports.Scm.Git.Repo({ repopath: f.gitpath })
-
-
- }
-
- public bool shouldIgnore()
- {
-
-
- // vim.. what a seriously brain dead program..
- if (this.name == "4913") {
- return true;
- }
-
- if (this.name[0] == '.') {
- // except!
- if (this.name == ".htaccess") {
- return false;
- }
- if (this.name == ".gitignore") {
- return false;
- }
- return true;
- }
-
-
- if (this.name[this.name.length -1] == '~') {
- return true;
- }
- // netbeans / android studio.. silly temp files..
-
- if (Regex.match_simple("___jb_old___$", this.name)) {
- return true;
- }
- if (Regex.match_simple("___jb_bak___$", this.name)) {
- return true;
- }
- //if (f.name.match(/^nbproject/)) {
- // return true;
- //}
- // ignore anything in top level!!!!
- if (this.gitpath.length < 1) {
- return true;
- }
-
- return false;
- }
-
- /** -- statics --*/
-
- public static int indexOfAdd( Array<GitMonitorQueue> add_files, string add)
- {
- for(var i =0; i < add_files.length; i++) {
- if (add_files.index(i).vname == add) {
- return i;
- }
- }
- return -1;
- }
- public static int indexOfMessage(Array<GitMonitorQueue> messages, string message) {
- for(var i =0; i < messages.length; i++) {
- if (messages.index(i).message == message) {
- return i;
- }
- }
- return -1;
- }
- public static string messageToString(Array<GitMonitorQueue> messages ) {
- string[] ret = {};
- for(var i =0; i < messages.length; i++) {
- ret+= messages.index(i).message;
- }
- return string.joinv("\n",ret);
- }
- public static string queueArrayToString(Array<GitMonitorQueue> list) {
- var ret = "";
- for(var i =0; i < list.length; i++) {
-
- ret += (ret.length > 0 ? ", " : "") + list.index(i).vname;
- }
- return ret;
-
- }
-
- public static bool 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;
- }
- public string fullpath()
- {
- return this.gitpath + "/" + this.vname;
- }
-
-
-
-}