Commit feddc78
committed
fix(dotfiles): sanitize remote branch name before git reset --hard
Branch names resolved from git rev-parse or symbolic-ref (which may
follow the network-supplied remote HEAD) are now rejected when they
start with '-' or contain '..', both of which git would misparse as
flags or path expressions. Falls back to 'main' in those cases.1 parent d1efbd8 commit feddc78
1 file changed
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
93 | 98 | | |
94 | 99 | | |
95 | 100 | | |
| |||
0 commit comments