-
1. Re: Switching between local GIT branches causes GIT connector to no longer be able to read a commit?
hchiorean Feb 25, 2015 3:17 AM (in response to mashama)What do you mean by "switching branches" ? Also, what does your connector configuration look like ?
-
2. Re: Re: Switching between local GIT branches causes GIT connector to no longer be able to read a commit?
mashama Feb 25, 2015 10:17 AM (in response to hchiorean)By "switches branches" I mean using "git checkout [branch]" to switch between local branches. Here is my Wildfly standalone.xml configuration file as it pertains to the ModeShape GIT connector tidbits:
<subsystem xmlns="urn:jboss:domain:modeshape:2.0"> <repository name="carroll"> <external-sources> <source name="git" classname="org.modeshape.connector.git.GitConnector" cacheTtlSeconds="5" directoryPath="C:\\CHP\\git\\carroll"> <projection> default:/carroll => / </projection> </source> </external-sources> </repository> <repository name="nogece"> <external-sources> <source name="git" classname="org.modeshape.connector.git.GitConnector" cacheTtlSeconds="5" directoryPath="C:\\CHP\\git\\nogece"> <projection> default:/nogece => / </projection> </source> </external-sources> </repository> <repository name="zing"> <external-sources> <source name="git" classname="org.modeshape.connector.git.GitConnector" cacheTtlSeconds="5" directoryPath="C:\\CHP\\git\\zing"> <projection> default:/zing => / </projection> </source> </external-sources> </repository> <webapp name="modeshape-rest.war"/> <webapp name="modeshape-webdav.war"/> <webapp name="modeshape-explorer.war"/> </subsystem>
-
3. Re: Re: Switching between local GIT branches causes GIT connector to no longer be able to read a commit?
hchiorean Feb 25, 2015 10:35 AM (in response to mashama)Are you accessing the commit using /tree/<path> (Git connector - ModeShape 4 - Project Documentation Editor) ? Does the same problem show up if you try using the ID of the commit via /commit/ID ? If you're using the ID of the commit, do both branches have a commit with this ID ?
-
4. Re: Switching between local GIT branches causes GIT connector to no longer be able to read a commit?
mashama Feb 26, 2015 12:21 PM (in response to hchiorean)I am accessing the commit using /tree/<path>. The same problem exists when accessing the commit via /commit/<ID>. Only one of the branches has the commit ID.
-
5. Re: Switching between local GIT branches causes GIT connector to no longer be able to read a commit?
hchiorean Feb 27, 2015 2:54 AM (in response to mashama)Using /commit/ID will/should only work if a commit with ID is present in the current branch (as pointed to by HEAD). So in that case the behavior is to be expected if one of your branches does not contain the commit.
On the other hand, if using a /tree/<branch>/<path-to-commit> style path, then <branch> should be used and not HEAD. As long as <path-to-commit> exists in <branch> it should be returned. So if that is your case, feel free to log a JIRA.
-
6. Re: Switching between local GIT branches causes GIT connector to no longer be able to read a commit?
mashama Feb 27, 2015 9:23 AM (in response to hchiorean)I have created MODE-2436.