8000 Set default range counts by simonhamp · Pull Request #211 · gitonomy/gitlib · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Set default range counts #211

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Gitonomy/Git/Parser/DiffParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ protected function doParse()
while ($this->expects('@@ ')) {
$vars = $this->consumeRegexp('/-(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))?/');
$rangeOldStart = (int) $vars[1];
$rangeOldCount = (int) $vars[2];
$rangeOldCount = (int) ($vars[2] ?? 1);
$rangeNewStart = (int) $vars[3];
$rangeNewCount = isset($vars[4]) ? (int) $vars[4] : (int) $vars[2]; // @todo Ici, t'as pris un gros raccourci mon loulou
$rangeNewCount = (int) ($vars[4] ?? 1);
$this->consume(' @@');
$this->consumeTo("\n");
$this->consumeNewLine();
Expand Down
0