Skip to content
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

Wrong exception when .git/hooks directory missing #33

Merged
merged 3 commits into from
Mar 17, 2015

Conversation

F1LT3R
Copy link
Contributor

@F1LT3R F1LT3R commented Mar 16, 2015

The follow issue can be closed using the code in this pull request.

This should check both:

  1. If you are in a Git Repository directory
  2. If your Git Repository directory has a hooks/ directory

Different exceptions are raised for each and should give the user more clues to fixing the issue.

@@ -587,9 +587,12 @@ class SprintlyTool:

# ensure the current directory is a git repository
directory = os.getcwd()
git_directory = hooks_directory = os.path.join(directory, '.git')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of doing multiple assignments (eg git_directory = hooks_directory = ..., just use git_directory as the base on line 591 instead of directory.

Otherwise, this looks solid.

@F1LT3R
Copy link
Contributor Author

F1LT3R commented Mar 17, 2015

Is that better @justinabrahms ?

@F1LT3R
Copy link
Contributor Author

F1LT3R commented Mar 17, 2015

I suspect this might close Issue 32

justinabrahms added a commit that referenced this pull request Mar 17, 2015
Wrong exception when .git/hooks directory missing
@justinabrahms justinabrahms merged commit c49af40 into sprintly:master Mar 17, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants