fix: cleanup README and focus on windows
This commit is contained in:
@@ -74,7 +74,7 @@ Use bisect when:
|
||||
|
||||
## Useful Commands
|
||||
|
||||
```bash
|
||||
```powershell
|
||||
# Start bisect session
|
||||
git bisect start
|
||||
|
||||
@@ -112,7 +112,7 @@ git bisect log
|
||||
|
||||
Run the verification script to check your solution:
|
||||
|
||||
```bash
|
||||
```powershell
|
||||
.\verify.ps1
|
||||
```
|
||||
|
||||
@@ -152,7 +152,7 @@ The verification will check that:
|
||||
## Manual vs Automated Bisect
|
||||
|
||||
### Manual Bisect
|
||||
```bash
|
||||
```powershell
|
||||
git bisect start
|
||||
git bisect bad
|
||||
git bisect good HEAD~20
|
||||
@@ -165,7 +165,7 @@ git bisect reset
|
||||
```
|
||||
|
||||
### Automated Bisect
|
||||
```bash
|
||||
```powershell
|
||||
git bisect start
|
||||
git bisect bad
|
||||
git bisect good HEAD~20
|
||||
@@ -182,22 +182,28 @@ The test script should exit with:
|
||||
## Bisect Workflow Example
|
||||
|
||||
### Finding a Performance Regression
|
||||
```bash
|
||||
```powershell
|
||||
# App is slow now, was fast 50 commits ago
|
||||
git bisect start
|
||||
git bisect bad
|
||||
git bisect good HEAD~50
|
||||
|
||||
# Create test script
|
||||
echo '#!/bin/bash\ntime npm start | grep "Started in"' > test.sh
|
||||
chmod +x test.sh
|
||||
@'
|
||||
$output = npm start 2>&1 | Select-String "Started in"
|
||||
if ($output -match "Started in (\d+)") {
|
||||
if ([int]$Matches[1] -gt 5000) { exit 1 } # Slow
|
||||
else { exit 0 } # Fast
|
||||
}
|
||||
exit 1
|
||||
'@ | Out-File -FilePath test.ps1
|
||||
|
||||
git bisect run ./test.sh
|
||||
git bisect run pwsh test.ps1
|
||||
# Git finds the commit that made it slow
|
||||
```
|
||||
|
||||
### Finding When a Feature Broke
|
||||
```bash
|
||||
```powershell
|
||||
git bisect start
|
||||
git bisect bad
|
||||
git bisect good v1.0.0 # Last known good version
|
||||
|
||||
Reference in New Issue
Block a user