Modify

Opened 16 years ago

Closed 16 years ago

#3410 closed defect (fixed)

If caching is activated and the first commit is empty diff_tree() fails

Reported by: Christian Zuckschwerdt Owned by: Herbert Valerio Riedel
Priority: high Component: GitPlugin
Severity: critical Keywords:
Cc: Trac Release: 0.11

Description

If caching is activated (cached_repository = true) and the first commit is empty

diff_tree() fails when trying to remove the first output line:

Trac detected an internal error:
IndexError: list index out of range

Fix: in PyGIT.py line 636:

if tree1 is None and len(lines) > 0:

Attachments (2)

gitplugin_empty-commit-fix.txt (501 bytes) - added by Christian Zuckschwerdt 16 years ago.
gitplugin_empty-commit-fix.patch (501 bytes) - added by Christian Zuckschwerdt 16 years ago.

Download all attachments as: .zip

Change History (4)

Changed 16 years ago by Christian Zuckschwerdt

Changed 16 years ago by Christian Zuckschwerdt

comment:1 Changed 16 years ago by Christian Zuckschwerdt

This is a dup of #2807

comment:2 Changed 16 years ago by Herbert Valerio Riedel

Resolution: fixed
Status: newclosed

(In [4148]) GitPlugin: make diff_tree handle empty changesets (fixes #2807 and #3410)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Herbert Valerio Riedel.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.