You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to stage a file with a full path. I have a failing test showing this doesn't work (cbilson/libgit2sharp@d849ca7b93538d85cc4a). I thought maybe using the posix helper on the path would fix it (cbilson/libgit2sharp@aae13a51b75d98a20b5c), but it didn't.
Any ideas? Should I just not try to do this? Thanks!
The text was updated successfully, but these errors were encountered:
Hey. Thanks for spotting this! As a side note, the index area is far from being achieved. ;-)
Correct me if I'm wrong but when a full path is being passed, I think LibGit2Sharp code should make sure that the caller is not trying to stage a file living outside of the working directory structure.
Two ways to make it happen:
Make libgit2 implement this and LibGit2Sharp will wrap it later (In good progress, I think :) )
Fake it now within LibGit2Sharp
Ensure the rooted passed path leads to a file within the working directory (eg. path.StartsWith(repo.Info.WorkingDirectory) or something similar)
Turn the full path into a relative path to the working directory
Use the relative path to delegate the staging to libgit2
When it's ready in libgit2, we'll just have to remove the boilerplate code
I would like to stage a file with a full path. I have a failing test showing this doesn't work (cbilson/libgit2sharp@d849ca7b93538d85cc4a). I thought maybe using the posix helper on the path would fix it (cbilson/libgit2sharp@aae13a51b75d98a20b5c), but it didn't.
Any ideas? Should I just not try to do this? Thanks!
The text was updated successfully, but these errors were encountered: