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

Blame returning nil when file does not exist in the git tree #258

Merged
merged 1 commit into from
Oct 20, 2017

Conversation

pettomartino
Copy link
Contributor

Related to #240

Instantiating Rugged::Blame with a new file(Rugged::Repository#status == index_new) will throw Rugged::TreeError with does not exist in the given tree.

@pettomartino pettomartino changed the title Blame returning nil when file does not exists in the git tree Blame returning nil when file does not exist in the git tree Aug 10, 2017
Copy link
Member

@doomspork doomspork left a comment

Choose a reason for hiding this comment

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

LGTM @pettomartino thank you for taking the initiative on this 👍

Any thoughts @mmozuras?

@doomspork
Copy link
Member

@pettomartino what is your twitter handle? 😀

@pettomartino
Copy link
Contributor Author

@doomspork same, @pettomartino

@durnin
Copy link

durnin commented Sep 22, 2017

Hello, is this getting merged anytime soon? I'm also trying to use pronto with pre-commit hook using --staged. Thanks!

@doomspork
Copy link
Member

@mmozuras any thoughts on this one, is it good to go?

@bjornlinder
Copy link

bjornlinder commented Oct 6, 2017

I tested out the changes in my pre-commit hook, didn't see the output I was expecting from pronto. Ideally we'd have pronto linting the newly added (staged) files. Here's what I'm going with for now:

if (( $(git diff --name-only --diff-filter=A HEAD | wc -l) > 0 ))
then
  pronto_output=$(pronto run)
else
  pronto_output=$(pronto run --staged)
fi

@mmozuras
Copy link
Member

@doomspork yup, looks good, sorry for taking so long 🙇

@bjornlinder I think that this issue is related to what you wrote about. Would love to read more of your thoughs on how to best approach this 😄.

@mmozuras mmozuras merged commit 697889f into prontolabs:master Oct 20, 2017
apiology pushed a commit to apiology/pronto that referenced this pull request Dec 27, 2019
Blame returning nil when file does not exist in the git tree
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants