-
Bug
-
Resolution: Unresolved
-
Low
-
None
-
4.1.2
-
None
-
Severity 3 - Minor
There are two problems I'm running into when selecting multiple files in the committed files list (not sure what it's called: select a commit and it's the pane underneath the list of commits):
- Paths over a certain length (I think it's 130 characters) get "truncated", with everything from character 122 up to the last 7 characters replaced by " ... "
- Every path other than the first one is prepended with "//"
Here's an example: commit 8188e1e
The paths for this commit are (relative to the repo root):
src/main/java/org/nrg/xdat/om/base/BaseXnatAbstractresource.java src/main/java/org/nrg/xdat/om/base/BaseXnatExperimentdata.java src/main/java/org/nrg/xdat/om/base/BaseXnatImageassessordata.java src/main/java/org/nrg/xdat/om/base/BaseXnatImagescandata.java src/main/java/org/nrg/xdat/om/base/BaseXnatImagesessiondata.java src/main/java/org/nrg/xdat/om/base/BaseXnatProjectdata.java src/main/java/org/nrg/xdat/om/base/BaseXnatReconstructedimagedata.java src/main/java/org/nrg/xdat/om/base/BaseXnatSubjectdata.java src/main/java/org/nrg/xdat/shared/OmUtils.java
When I select all of these then paste into vim or Atom, I get the following:
/Users/username/Development/XNAT/1.7/plugins/xnat-data-models/src/main/java/org/nrg/xdat/om/base/BaseXnatAbstractresource.java ///Users/username/Development/XNAT/1.7/plugins/xnat-data-models/src/main/java/org/nrg/xdat/om/base/BaseXnatExperimentdata.java ///Users/username/Development/XNAT/1.7/plugins/xnat-data-models/src/main/java/org/nrg/xdat/om/base/BaseXnatImageassessor ... ata.java ///Users/username/Development/XNAT/1.7/plugins/xnat-data-models/src/main/java/org/nrg/xdat/om/base/BaseXnatImagescandata.java ///Users/username/Development/XNAT/1.7/plugins/xnat-data-models/src/main/java/org/nrg/xdat/om/base/BaseXnatImagesessiondata.java ///Users/username/Development/XNAT/1.7/plugins/xnat-data-models/src/main/java/org/nrg/xdat/om/base/BaseXnatProjectdata.java ///Users/username/Development/XNAT/1.7/plugins/xnat-data-models/src/main/java/org/nrg/xdat/om/base/BaseXnatReconstructed ... ata.java ///Users/username/Development/XNAT/1.7/plugins/xnat-data-models/src/main/java/org/nrg/xdat/om/base/BaseXnatSubjectdata.java ///Users/username/Development/XNAT/1.7/plugins/xnat-data-models/src/main/java/org/nrg/xdat/shared/OmUtils.java
The "//" is baffling to me: I have no idea what purpose that could serve, but at least it's easy to remove.
The truncation I can somewhat understand, although in some cases it actually makes a longer string that would have been there. For example, the third file in the list is named BaseXnatImageassessordata.java, meaning the "truncated" version is actually four characters longer than the actual name. But even though it makes sense it makes it difficult to use this copied text, because I need it to reference the files from that commit, so I have to go back and fill in the " ... " blanks.
I've tested this on two different machines, both running OS X 11.4 and Sourcetree 4.1.2, with the same results.
Note that this works properly if I select and copy each path individually: no truncation and no "//" prefix (not that there would be because there's only one line).
What I'd really like is the ability to copy paths relative to the repo root so that this:
/Users/username/Development/XNAT/1.7/plugins/xnat-data-models/src/main/java/org/nrg/xdat/om/base/BaseXnatAbstractresource.java
Becomes this:
src/main/java/org/nrg/xdat/om/base/BaseXnatAbstractresource.java
I'll create a separate suggestion for that.