Skip to content
This repository has been archived by the owner on Mar 12, 2019. It is now read-only.

Commit

Permalink
Fix: Taking tickets when the current working dir is not the root yiel…
Browse files Browse the repository at this point in the history
…ds an error.
  • Loading branch information
nvie committed Mar 13, 2010
1 parent f5672b6 commit bb6768e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/gitit.py
Expand Up @@ -439,7 +439,7 @@ def finish_ticket(self, sha, new_status):
i.status = new_status
msg = '%s ticket \'%s\'' % (i.status, sha7)
i.save()
git.command_lines('commit', ['-m', msg, match])
git.command_lines('commit', ['-m', msg, match], explicit_git_dir=True)
git.change_head_branch(curr_branch)
abs_ticket_dir = os.path.join(repo.find_root(), it.TICKET_DIR)
git.command_lines('reset', ['HEAD', abs_ticket_dir])
Expand All @@ -462,7 +462,7 @@ def reopen_ticket(self, sha):
msg = 'ticket \'%s\' reopened' % sha7
i.status = 'open'
i.save()
git.command_lines('commit', ['-m', msg, match])
git.command_lines('commit', ['-m', msg, match], explicit_git_dir=True)
git.change_head_branch(curr_branch)
abs_ticket_dir = os.path.join(repo.find_root(), it.TICKET_DIR)
git.command_lines('reset', ['HEAD', abs_ticket_dir])
Expand All @@ -481,7 +481,7 @@ def take_ticket(self, sha):
msg = 'ticket \'%s\' taken by %s' % (sha7, fullname)
i.assigned_to = fullname
i.save()
git.command_lines('commit', ['-m', msg, match])
git.command_lines('commit', ['-m', msg, match], explicit_git_dir=True)
git.change_head_branch(curr_branch)
abs_ticket_dir = os.path.join(repo.find_root(), it.TICKET_DIR)
git.command_lines('reset', ['HEAD', abs_ticket_dir])
Expand All @@ -499,7 +499,7 @@ def leave_ticket(self, sha):
msg = 'ticket \'%s\' left alone' % sha7
i.assigned_to = '-'
i.save()
git.command_lines('commit', ['-m', msg, match])
git.command_lines('commit', ['-m', msg, match], explicit_git_dir=True)
git.change_head_branch(curr_branch)
abs_ticket_dir = os.path.join(repo.find_root(), it.TICKET_DIR)
git.command_lines('reset', ['HEAD', abs_ticket_dir])
Expand Down

0 comments on commit bb6768e

Please sign in to comment.