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

Fix file not found errors when running from a subdirectory w/ project.git = true #1087

Merged
merged 4 commits into from Dec 1, 2017

Conversation

3 participants
@lloydmeta
Contributor

lloydmeta commented Nov 30, 2017

Closes #1086

  • Add back --full-name when invoking Git
  • Add a test
Closes #1086
* Add back --full-name when invoking Git
* Add a test

@lloydmeta lloydmeta changed the title from Closes #1086 to Fix file not found errors when running from a subdirectory w/ project.git = true Nov 30, 2017

@@ -46,6 +46,7 @@ class GitOpsImpl(private[util] val workingDirectory: AbsoluteFile)
Seq(
"git",
"ls-files",
"--full-name",

This comment has been minimized.

@pjrt

pjrt Nov 30, 2017

Collaborator

What should the behavior be for files not in the directory? As I understand this, this will get ALL files, even ones not in the directory you are in.

@pjrt

pjrt Nov 30, 2017

Collaborator

What should the behavior be for files not in the directory? As I understand this, this will get ALL files, even ones not in the directory you are in.

This comment has been minimized.

@lloydmeta

lloydmeta Dec 1, 2017

Contributor

Can you double check that ?

That's not the behaviour that I'm seeing:

  1. Using git from the commandline
  2. In the refined test I just added

https://github.com/lloydmeta/scalafmt/blob/a5d46c9c6899391f0eab1a310660e73fc8888335/scalafmt-tests/src/test/scala/org/scalafmt/util/GitOpsTest.scala#L96-L105

  1. In the man pages
--full-name
           When run from a subdirectory, the command usually outputs paths
           relative to the current directory. This option forces paths to be
           output relative to the project top directory.
@lloydmeta

lloydmeta Dec 1, 2017

Contributor

Can you double check that ?

That's not the behaviour that I'm seeing:

  1. Using git from the commandline
  2. In the refined test I just added

https://github.com/lloydmeta/scalafmt/blob/a5d46c9c6899391f0eab1a310660e73fc8888335/scalafmt-tests/src/test/scala/org/scalafmt/util/GitOpsTest.scala#L96-L105

  1. In the man pages
--full-name
           When run from a subdirectory, the command usually outputs paths
           relative to the current directory. This option forces paths to be
           output relative to the project top directory.

This comment has been minimized.

@pjrt

pjrt Dec 1, 2017

Collaborator

Well u added a test to prove that that was the case, that's enough to shut me up :)

@pjrt

pjrt Dec 1, 2017

Collaborator

Well u added a test to prove that that was the case, that's enough to shut me up :)

@pjrt

pjrt approved these changes Dec 1, 2017 edited

Looks good! Not really sure why I removed that flag to begin with (more than likely it was confusion with how GitOps used to work and the first refactor). But the test looks good. I'll give @olafurpg some time to review if he wants, otherwise I'll merge this tomorrow.

@olafurpg

LGTM 👍 Thanks @lloydmeta

@olafurpg olafurpg merged commit fd461b5 into scalameta:master Dec 1, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@lloydmeta lloydmeta deleted the lloydmeta:fix-nested-git-bug branch Dec 1, 2017

@olafurpg olafurpg added this to the v1.3.1 milestone Jan 1, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment