{"thread":{"id":"716","subject":"[PATCH] update cogito cg-diff to use new git diff format","startedAt":"2005-05-25T19:38:26Z","lastAt":"2005-05-25T19:38:26Z","messageCount":1,"participants":["McMullan, Jason"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"3947","messageId":"1117049907.11542.9.camel@jmcmullan.timesys","threadId":"716","inReplyTo":null,"subject":"[PATCH] update cogito cg-diff to use new git diff format","fromName":"McMullan, Jason","fromEmail":"jason.mcmullan@timesys.com","sentAt":"2005-05-25T19:38:26Z","receivedAt":"2005-05-25T19:38:26Z","isPatch":true,"sender":{"key":"jason.mcmullan@timesys.com","avatar":null},"body":"Updates cg-Xdiffdo to handle the new cg-diff-* output format\n\n(Not strictly necessary, since git-diff-* -p is better anyway, but if\nsomeone is relying on cg-* Porcelain....)\n\nSigned-Off-By: Jason McMullan <jason.mcmullan@timesys.com>\n\nIndex: cg-Xdiffdo\n===================================================================\n--- be7e79d03a25ad69405c8e17c024f0c83a9d16cd/cg-Xdiffdo  (mode:100755)\n+++ uncommitted/cg-Xdiffdo  (mode:100755)\n@@ -48,13 +48,13 @@\n \n while [ \"$1\" ]; do\n \tdeclare -a param\n-\tparam=($1);\n-\top=${param[0]:0:1}\n-\tmode=${param[0]:1}\n-\ttype=${param[1]}\n-\tsha=${param[2]}\n-\tname=${param[3]}\n+\tparam=($1 $2);\n+\tmode=${param[0]:1}\"->\"${param[1]}\n+\tsha=${param[2]}\"->\"${param[3]}\n+\top=${param[4]}\n+\tname=${param[5]}\n \n+\ttype=`git-cat-file -t $sha`\n \tif [ \"$filter\" ] && (echo \"$name\" | grep -vqxFf $filter); then\n \t\tshift; continue\n \tfi\n@@ -72,15 +72,15 @@\n \t([ -d \"$dir1\" ] && [ -d \"$dir2\" ]) || mkdir -p \"$dir1\" \"$dir2\"\n \n \tcase $op in\n-\t\"+\")\n+\t\"A\")\n \t\tmkbanner \"$loc2\" $id2 \"$name\" $mode $sha\n \t\tdiff -L \"/dev/null  (tree:$id1)\" -L \"$label\" -u /dev/null \"$loc2\"\n \t\t;;\n-\t\"-\")\n+\t\"D\")\n \t\tmkbanner \"$loc1\" $id1 \"$name\" $mode $sha\n \t\tdiff -L \"$label\" -L \"/dev/null  (tree:$id2)\" -u \"$loc1\" /dev/null\n \t\t;;\n-\t\"*\")\n+\t\"M\")\n \t\tmodes=(${mode/->/ });\n \t\tmode1=${modes[0]}; mode2=${modes[1]}\n \t\tshas=(${sha/->/ });\n@@ -94,7 +94,7 @@\n \tesac\n \n \t#rm -f \"$loc1\" \"$loc2\"\n-\tshift\n+\tshift 2\n done\n \n rm -rf \"$diffdir\"\n\n\n-- \nJason McMullan <jason.mcmullan@timesys.com>\nTimeSys Corporation\n\n"}]}