From: "McMullan, Jason" <jason.mcmullan@timesys.com>
To: <git@vger.kernel.org>
Subject: [PATCH] update cogito cg-diff to use new git diff format
Date: Wed, 25 May 2005 15:38:26 -0400
Date: Wed, 25 May 2005 15:32:01 -0400 [thread overview]
Message-ID: <1117049907.11542.9.camel@jmcmullan.timesys> (raw)
[-- Attachment #1: Type: text/plain, Size: 1552 bytes --]
Updates cg-Xdiffdo to handle the new cg-diff-* output format
(Not strictly necessary, since git-diff-* -p is better anyway, but if
someone is relying on cg-* Porcelain....)
Signed-Off-By: Jason McMullan <jason.mcmullan@timesys.com>
Index: cg-Xdiffdo
===================================================================
--- be7e79d03a25ad69405c8e17c024f0c83a9d16cd/cg-Xdiffdo (mode:100755)
+++ uncommitted/cg-Xdiffdo (mode:100755)
@@ -48,13 +48,13 @@
while [ "$1" ]; do
declare -a param
- param=($1);
- op=${param[0]:0:1}
- mode=${param[0]:1}
- type=${param[1]}
- sha=${param[2]}
- name=${param[3]}
+ param=($1 $2);
+ mode=${param[0]:1}"->"${param[1]}
+ sha=${param[2]}"->"${param[3]}
+ op=${param[4]}
+ name=${param[5]}
+ type=`git-cat-file -t $sha`
if [ "$filter" ] && (echo "$name" | grep -vqxFf $filter); then
shift; continue
fi
@@ -72,15 +72,15 @@
([ -d "$dir1" ] && [ -d "$dir2" ]) || mkdir -p "$dir1" "$dir2"
case $op in
- "+")
+ "A")
mkbanner "$loc2" $id2 "$name" $mode $sha
diff -L "/dev/null (tree:$id1)" -L "$label" -u /dev/null "$loc2"
;;
- "-")
+ "D")
mkbanner "$loc1" $id1 "$name" $mode $sha
diff -L "$label" -L "/dev/null (tree:$id2)" -u "$loc1" /dev/null
;;
- "*")
+ "M")
modes=(${mode/->/ });
mode1=${modes[0]}; mode2=${modes[1]}
shas=(${sha/->/ });
@@ -94,7 +94,7 @@
esac
#rm -f "$loc1" "$loc2"
- shift
+ shift 2
done
rm -rf "$diffdir"
--
Jason McMullan <jason.mcmullan@timesys.com>
TimeSys Corporation
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
reply other threads:[~2005-05-25 19:36 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1117049907.11542.9.camel@jmcmullan.timesys \
--to=jason.mcmullan@timesys.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).