GitRepo.vala
authorAlan Knowles <alan@roojs.com>
Wed, 7 Nov 2018 07:08:29 +0000 (15:08 +0800)
committerAlan Knowles <alan@roojs.com>
Wed, 7 Nov 2018 07:08:29 +0000 (15:08 +0800)
GitRepo.vala

index 1606431..cdb73b9 100644 (file)
@@ -338,7 +338,7 @@ public class GitRepo : Object
        }
        return false;
     }
-    
+        
     public void loadActiveTicket()
     {
        this.activeTicket = null;
@@ -350,7 +350,7 @@ public class GitRepo : Object
        if (ticket_id.length < 1) {
                return;
                }
-               this.activeTicket = RooTicket.singleton().getById(ticket_id);
+               this.activeTicket = RooTicket.singleton().getById(ticket_id.strip());
        
        
     }
@@ -382,12 +382,12 @@ public class GitRepo : Object
                                            var ret = this.git(cmd);
                                            stash = ret.length> 1 ;
                                            
+                                               
                                            cmd = { "stash" };                  
                                            if (stash) { this.git(cmd); }
                                            
                                            cmd = { "checkout", branchname  };
                                            this.git(cmd);
-                                           
                                  } catch(Error e) {
                                                GitMonitor.gitmonitor.pauseError(e.message);
                                                return false;           
@@ -399,7 +399,8 @@ public class GitRepo : Object
                                                    this.push();
                                               //cmd = { "commit",   "-a" , "-m",  "merge master changes" };
                                       //git chethis.git( cmd );
-                                           }   
+                                           }
+                                           
                                   } catch(Error e) {
                                            string[] cmd = { "checkout", "master"  };
                                            this.git(cmd);
@@ -409,6 +410,7 @@ public class GitRepo : Object
                                                         + e.message
                                                );
                                                return false;           
+                                        
                                        }
                                   try {                                        
                                           string[]  cmd = { "stash", "pop"  };