-
Notifications
You must be signed in to change notification settings - Fork 71
History plugin not parsing date correctly #258
Comments
One way to check if the issue exists on a system: $log = git --no-pager log -q --grep '^AU: ' --date iso --all | out-string
$all_commits = $log | Select-String 'commit(.|\n)+?(?=\ncommit )' -AllMatches
$ind = 0
foreach ($commit in $all_commits.Matches.Value) {
$commit = $commit -split '\n'
$date = $commit[2].Replace('Date:','').Trim()
"Index: $ind, Date: $date"
$ind++
} If a non-date shows up for the date, the issue is there. |
On further investigation this happens with a merge commit. In that scenario, the next line after the commit line is of the format |
Ah, that must be it, we don't have merges with described AppVeyor system so that setup was never taken into consideration. |
It seems to me there are a couple of approaches we could take to fix:
If we want to do the second option, I think we could look at the commit line that normally contains "Date:" and if it doesn't contain "Date:" then assume it is a merge commit and don't include it. Any thoughts? |
Lets just add |
Perfect! |
I'm using Git version 2.34.1, and seem to be getting errors in the History plugin.
Appears the issue is here. (line 35)
For me the date is at index 3 instead of index 2.
Since my setup is new, I'm not sure if this is an issue specific to my git config, or more tied to the version of Git, or something that is more widely experienced. (I think it has never worked for me, but maybe others have different experience?)
The text was updated successfully, but these errors were encountered: