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

Add check-ignore as command that allows placeholders to be created #362

Merged
merged 4 commits into from
Oct 12, 2018

Conversation

kewillford
Copy link
Member

This fixes #361

GitCommandLineParser.Verbs.AddOrStage |
GitCommandLineParser.Verbs.Move |
GitCommandLineParser.Verbs.Status |
GitCommandLineParser.Verbs.CheckIgnore;
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we always want to allow check-ignore, or only when it has a --stdin parameter? What about other verbs that take a --stdin parameter, could they be in a similar boat?

Copy link
Member Author

Choose a reason for hiding this comment

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

@wilbaker would like to at some point completely remove this check and allow all commands to create placeholders but there are a bunch of tests that fail, mainly conflict and reset ones I believe. I don't think we need to check for --stdin since this command is only checking if a path is ignored or excluded.

Yes other commands would be in this same boat if a third party app started the command and kept it around while trying to do read files. I will see what all the commands are that fall into this category.

Copy link
Member Author

Choose a reason for hiding this comment

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

Commands that could be waiting on stdin

check-attr
check-ignore
check-mailmap
checkout-index
commit-graph
diff-tree
fetch-pack
hash-object
index-pack
name-rev
notes
reset  -  Experimental
send-pack
rev-list
update-index
update-ref

The fact that these wait on stdin isn't necessarily an issue, but placeholders will not be able to be created if these are running and waiting on input.

Copy link
Member Author

Choose a reason for hiding this comment

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

Running some tests and the failures are for:

check-ignore
check-mailmap
checkout-index
reset
update-index

Most of the others are in the list to not get the lock which is probably where check-ignore and check-mailmap belong. I'll update the PR. The others will have to stay for now since they are changing the index.

GitCommandLineParser.Verbs.AddOrStage |
GitCommandLineParser.Verbs.Move |
GitCommandLineParser.Verbs.Status |
GitCommandLineParser.Verbs.CheckIgnore;
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we add a functional test that fails without this change?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep I was looking into this and we have one for AddOrStage that we can copy from.

[TestCase("send-pack")]
[TestCase("rev-list")]
[TestCase("update-ref")]
public void AllowsPlaceholderCreation(string commandToRun)
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: AllowsPlaceholderCreationWhileGitCommandIsRunning?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add check-ignore to the list of commands allowed to create placeholders
3 participants