Re: Find out on which branch a commit was originally made) (was ANNOUNCE git-what-branch)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> There's still a bug in there somewhere; 

JIC someone actually wants to use that script -- you'll need this:

--- git-show-merge-path	2010-09-23 20:13:59.000000000 +0000
+++ git-show-merge-path	2010-09-24 01:09:10.000000000 +0000
@@ -90,21 +89,21 @@
         	desc[id] = 1;
 	 if (sizeof(commits[id]["parent"])>1)
             if (!desc[commits[id]["parent"][0]]) {
-	       mapping reached = ([]);
-	       if (commits[id]["Branch"])
-	          reached = commits[id]["Branch"]&branchnames;
 	       int comtime = (int)commits[id]["committer"][-2];
                write("%.12s %-56.56s %.12s\n", id, 
 	              squeeze_subject(commits[id][""][1]),
 		      cal->Second(comtime)->format_time_xshort() );
-               if (sizeof(reached)>0) {
-	          branchnames -= reached;
-                  write("# Merged into %s\n", 
-		          String.implode_nicely(indices(reached)) );
-		  if (sizeof(branchnames)==0)
-		     exit(0);
-	       }
 	    }
+	 if (mapping reached = commits[id]["Branch"]) {
+	    reached = reached&branchnames;
+            if (sizeof(reached)>0) {
+               branchnames -= reached;
+               write("# Merged into %s\n",
+		       String.implode_nicely(indices(reached)) );
+	       if (sizeof(branchnames)==0)
+		  exit(0);
+	    }
+	 }
       }
       m_delete(commits, id);
    }
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]