-
-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with long file paths #25
Comments
@eltoncezar LOL... I see how that can be a problem. Thinking about what the best way to address this... Obviously the file paths need to be truncated to a maximum length, and I think it makes sense to truncate them working backwards from the end of the filename/path. That way you will always at least see the filename itself, even if you are missing some of the beginning parts of the path which can usually be inferred. Let me know if that makes sense - I will try and put in a fix for this later today. |
Yeah, it's a tricky problem to address. I think that there are 3 options:
I think that ideally, we should set a maximum length, try to keep the full filename and truncate the preceding folder structure. |
Thx for the suggestions. I think I will try out the option I suggested of setting the max length of the path and work backwards from the end of the string, that way we get as much as possible useful information for locating the file, and maximize the chance that unique parts of the path are shown. The only scenario I think this doesn't handle is when the filename itself exceeds the max length. In that case it might be best to so something like: I'll let you know once I implement so that you can give it a try! |
I ended up doing it like this: This is deployed in git-sim version 0.1.5. Please upgrade using |
@eltoncezar Let me know when you get a chance to test this out, and if the fix works OK for you. |
@eltoncezar Closing since this should be fixed now. Feel free to reopen if any issues. |
I ran
git-sim status
on my repo, and this was the result:The text was updated successfully, but these errors were encountered: