From 96259e4797a0fcc3f6e25f5074d3228e0747a3ec Mon Sep 17 00:00:00 2001 From: Graham Campbell Date: Sun, 22 Apr 2018 20:46:06 +0100 Subject: [PATCH] Be compatible with bitbucket by allowing short hashes --- src/Gitonomy/Git/Parser/DiffParser.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Gitonomy/Git/Parser/DiffParser.php b/src/Gitonomy/Git/Parser/DiffParser.php index c9f011b..c11d240 100644 --- a/src/Gitonomy/Git/Parser/DiffParser.php +++ b/src/Gitonomy/Git/Parser/DiffParser.php @@ -64,9 +64,9 @@ protected function doParse() // 4. File informations $isBinary = false; if ($this->expects('index ')) { - $oldIndex = $this->consumeHash(); + $oldIndex = $this->consumeShortHash(); $this->consume('..'); - $newIndex = $this->consumeHash(); + $newIndex = $this->consumeShortHash(); if ($this->expects(' ')) { $vars = $this->consumeRegexp('/\d{6}/'); $newMode = $oldMode = $vars[0];