| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -573,15 +573,19 @@ def _get_fetch_info_from_stderr(self, proc, progress): | |||
| 573 | 573 | ||
| 574 | 574 | l_fil = len(fetch_info_lines) | |
| 575 | 575 | l_fhi = len(fetch_head_info) | |
| 576 | - if l_fil >= l_fhi: | ||
| 577 | - msg = "Fetch head does not contain enough lines to match with progress information\n" | ||
| 576 | + if l_fil != l_fhi: | ||
| 577 | + msg = "Fetch head lines do not match lines provided via progress information\n" | ||
| 578 | 578 | msg += "length of progress lines %i should be equal to lines in FETCH_HEAD file %i\n" | |
| 579 | - msg += "Will ignore extra progress lines." | ||
| 579 | + msg += "Will ignore extra progress lines or fetch head lines." | ||
| 580 | 580 | msg %= (l_fil, l_fhi) | |
| 581 | 581 | log.warn(msg) | |
| 582 | - fetch_info_lines = fetch_info_lines[:l_fhi] | ||
| 582 | + if l_fil < l_fhi: | ||
| 583 | + fetch_head_info = fetch_head_info[:l_fil] | ||
| 584 | + else: | ||
| 585 | + fetch_info_lines = fetch_info_lines[:l_fhi] | ||
| 586 | + # end truncate correct list | ||
| 583 | 587 | # end sanity check + sanitization | |
| 584 | - | ||
| 588 | + | ||
| 585 | 589 | output.extend(FetchInfo._from_line(self.repo, err_line, fetch_line) | |
| 586 | 590 | for err_line, fetch_line in zip(fetch_info_lines, fetch_head_info)) | |
| 587 | 591 | return output | |
| Back | FazBrowse Home | New Git URL |
0 commit comments