| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
I'm looking for someone to review this PR and provide me with some feedback. |
Sorry, something went wrong.
|
I think this looks pretty good. Was there some issue you were trying to solve with this? Were you having problems? I am curios as to why this is an issue and what, if anything, could be broken by this change (it seems pretty innocuous). Thanks for the contribution! |
Sorry, something went wrong.
|
Was tree_entry.path() returning broken paths on windows? Something like C:/path/to\\file\\location? |
Sorry, something went wrong.
|
To start, what nodegit returns differs from what the native git client (git ls-tree) returns, even on Windows. On all platforms, paths in a git repository are reported in posix form (using forward slash as the path separator). $ git ls-tree --name-only -r HEAD README.md lib/README.md lib/blame.js ... test/tests/blame.js ... Where this becomes a problem is when I'm building paths in the TreeWalker. On Windows, I keep having to change backslashes to forward slashes. Otherwise, when I turn around to retrieve a path from the repository, it isn't found. To me, that's where the main inconsistently comes from. If I give a path back to nodegit that nodegit gave to me, it can't find the path in the repository. There's really no place for backslashes here. Paths in a git repository do not represent real paths (until the part of a checkout). They represent part of the object's identity. Therefore, nodegit shouldn't report different values (and thus break the object's identity) when run on different operating systems. |
Sorry, something went wrong.
|
Thanks! |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
No description provided.