-
Notifications
You must be signed in to change notification settings - Fork 451
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
Conversation
GitCommandLineParser.Verbs.AddOrStage | | ||
GitCommandLineParser.Verbs.Move | | ||
GitCommandLineParser.Verbs.Status | | ||
GitCommandLineParser.Verbs.CheckIgnore; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
c44e72e
to
51e73dc
Compare
[TestCase("send-pack")] | ||
[TestCase("rev-list")] | ||
[TestCase("update-ref")] | ||
public void AllowsPlaceholderCreation(string commandToRun) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: AllowsPlaceholderCreationWhileGitCommandIsRunning
?
51e73dc
to
c9ee2f7
Compare
c9ee2f7
to
34a54f9
Compare
e0fec6d
to
23d457d
Compare
This fixes #361