[ http://jira.codehaus.org/browse/SCM-598?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=252797#action_252797 ]
Mark Struberg commented on SCM-598: ----------------------------------- hmm, to me the getAbsolutePath looks ok. The reason in the context is the following: f.getPath() _might_ only return the relative path (if no absolute is used in the configuration). Thus I use f.getAbsolutePath() to decide if we should get rid of the path prefix. This is needed because some git commands do not like absolute paths as parameters. What java version are you using, what linux version are you using? I successfully tested this with Sun java impls starting from 1.4.2 up to the latest 1.6.0_21 under Fedora 9-14 32 and 64 bit versions. LieGrue, strub > String index out of bounds while trying to commit limited file set to Git > ------------------------------------------------------------------------- > > Key: SCM-598 > URL: http://jira.codehaus.org/browse/SCM-598 > Project: Maven SCM > Issue Type: Bug > Components: maven-scm-provider-git > Affects Versions: 1.4 > Environment: Ubuntu 10 > Reporter: Aleksandr Zhuikov > Assignee: Olivier Lamy > Fix For: 1.5 > > Attachments: GitCommandLineUtils.java.patch, Screenshot.png > > > I encountered String index out of bounds while trying to commit limited file > set to Git. > if statement was checking if file's absolute path was starting with working > directory absoulute path, but stripping absoulute path from the value > returned by getPath(). At least in Linux this getPath and getAbsolutePath did > not return the same. > I have actually submitted the fix to Github repo, but it appeared to be a > wrong place :) Attachment has screenshot with diff from Github. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira