<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
So IIUC what you ideally want is to 1) use git to version your local
IdP config 2) be able to easily diff your local config against tags,
etc from the IdP repo?<br>
<br>
That really got me thinking that one ought to be able to set up a
remote in the local config repo that points at the IdP, pull in
selected commits and tags and relevant reachable objects from it,
and then be able to diff and so on against it directly.<br>
<br>
What I came up with is below. Essentially you use a custom refspec
to only pull down the remote's tags, mapping them to
namespace-qualified tags in the local repo.<br>
<br>
<tt>cd <your IdP> (the local IdP dir to be versioned)</tt><tt><br>
</tt><tt>git init</tt><tt><br>
</tt><tt>(git add and commit whatever you want to version locally)</tt><br>
<br>
Here's the special sauce:<br>
<br>
<tt># Use a repo HTTP URL, etc if not a committer</tt><tt><br>
</tt><tt>git remote add shibidp
<a class="moz-txt-link-abbreviated" href="mailto:git@git.shibboleth.net:java-identity-provider">git@git.shibboleth.net:java-identity-provider</a></tt><tt><br>
</tt><tt>git config remote.shibidp.fetch
+refs/tags/*:refs/tags/shibidp/*</tt><tt><br>
</tt><tt>git config remote.shibidp.tagOpt --no-tags</tt><tt><br>
</tt><tt>git fetch shibidp</tt><br>
<br>
Now you have a bunch of local tags imported from the shibidp remote
with a shibidp/ prefix:<br>
<br>
<tt># git tag --list</tt><tt><br>
</tt><tt><br>
</tt><tt>shibidp/3.0.0</tt><tt><br>
</tt><tt>shibidp/3.0.0-alpha1</tt><tt><br>
</tt><tt>shibidp/3.0.0-alpha2</tt><tt><br>
</tt><tt>shibidp/3.0.0-alpha3</tt><tt><br>
</tt><tt>shibidp/3.0.0-beta1</tt><tt><br>
</tt><tt>shibidp/3.0.0.11</tt><tt><br>
</tt><tt>shibidp/3.1.0</tt><tt><br>
</tt><tt>shibidp/3.1.0.1</tt><tt><br>
</tt><tt>shibidp/3.1.1</tt><tt><br>
</tt><tt>shibidp/3.1.1.1</tt><tt><br>
</tt><tt>shibidp/3.1.1.2</tt><tt><br>
</tt><tt>shibidp/3.1.2</tt><tt><br>
</tt><tt>shibidp/3.1.2.1</tt><tt><br>
</tt><tt>shibidp/3.2.0</tt><tt><br>
</tt><tt>shibidp/3.2.0.2</tt><tt><br>
</tt><tt>shibidp/3.2.1</tt><tt><br>
</tt><tt>shibidp/3.2.1.0</tt><tt><br>
</tt><tt>shibidp/3.2.1.1</tt><tt><br>
</tt><tt>shibidp/3.3.0</tt><tt><br>
</tt><tt>shibidp/3.3.0.0</tt><tt><br>
</tt><tt>shibidp/3.3.0.1</tt><tt><br>
</tt><tt>shibidp/3.3.1</tt><tt><br>
</tt><tt>shibidp/3.3.1.0</tt><tt><br>
</tt><tt>shibidp/3.3.1.1</tt><br>
<br>
So I think you can still create your own (unqualified) local tags
without stepping on one another. You also haven't polluted your
repo's branches with any remote tracking branches (although you
could if you wanted, by adding additional refspecs).<br>
<br>
Now one can use any of the git diffing and other tools as normal,
taking advantage of the fact that a commit-ish or tree-ish can
(usually) take an optional path (often colon-delimited), so you are
diffing apples to apples:<br>
<br>
<tt>git diff master:conf
shibidp/3.3.0:idp-conf/src/main/resources/conf</tt><tt><br>
</tt><tt><br>
git diff --ignore-all-space --ignore-blank-lines
master:conf/logback.xml
shibidp/3.3.0:idp-conf/src/main/resources/conf/logback.xml<br>
<br>
</tt><tt>git diff-tree -r HEAD:conf
shibidp/3.3.0:idp-conf/src/main/resources/conf</tt><br>
<br>
And so on.<br>
<br>
I was slightly amazed that this actually (seems to) work. Probably
there's some stuff that needs to be fine-tuned or tweaked, but maybe
is the skeleton of a general approach.<br>
<br>
Fwiw, I had this idea based on the well-known (?) historical way
that one can do something similar, even in Subversion and (gasp!)
CVS, to maintain local changes to third-party source, using
so-called vendor branches (import of a versioned tarball, etc) and
3-way merges. Maybe there is also some canonical Git workflow for
that as well.<br>
<br>
--Brent<br>
<br>
</body>
</html>