File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed
Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,12 @@ public string GetCommitTime(string commitHash)
4141
4242 public void RunGitShow ( string commit , string filePath , string outputFile )
4343 {
44+ // Ensure the file path is properly formatted for Git
45+ if ( filePath . StartsWith ( "/" ) )
46+ {
47+ filePath = filePath . Substring ( 1 ) ; // Remove the leading slash if it exists
48+ }
49+
4450 string quotedFilePath = $ "\" { filePath } \" ";
4551
4652 var startInfo = new ProcessStartInfo
Original file line number Diff line number Diff line change @@ -68,6 +68,8 @@ cd /path/to/your/git/repository
6868GitContentSearch.exe <file-path> <search-string> [--earliest-commit=<commit>] [--latest-commit=<commit>]
6969```
7070
71+ Note: Make sure the file path does not start with a forward slash (/), as this can cause errors when Git tries to locate the file.
72+
7173### Arguments
7274
7375* `<file-path>`: The path to the Content file within the Git repository.
You can’t perform that action at this time.
0 commit comments