RFR: Ignore `path=` lines in git credential fill output.
Erik Duveblad via github.com
duke at openjdk.java.net
Wed Jun 26 18:18:36 UTC 2019
On Wed, 26 Jun 2019 15:06:36 GMT, JornVernee via github.com <duke at openjdk.java.net> wrote:
> On Wed, 26 Jun 2019 14:46:42 GMT, JornVernee via github.com <duke at openjdk.java.net> wrote:
>> On Wed, 26 Jun 2019 14:46:38 GMT, JornVernee via github.com <duke at openjdk.java.net> wrote:
>>> I'm trying out skara, but when running `git fork https://github.com/openjdk/panama git-panama` I'm getting the following exception:
>>> Exception in thread "main" java.io.IOException: 'git credential' returned unexpected line: path=
>>> at org.openjdk.skara.cli/org.openjdk.skara.cli.GitCredentials.fill(GitCredentials.java:101)
>>> at org.openjdk.skara.cli/org.openjdk.skara.cli.GitFork.main(GitFork.java:130)
>>> at org.openjdk.skara.cli/org.openjdk.skara.cli.GitSkara.main(GitSkara.java:130)
>>> Looks like `path=` is not handled yet?
>>> This PR adds some handling that ignores lines starting with `path=` for now, but maybe any unknown line should be ignored instead of throwing an exception, what do you think?
>>> - 2149adba: Ignore `path=` lines in git credential fill output.
>>> Pull request:
>>> Fetch command:
>>> git fetch https://github.com/openjdk/skara.git 2149adba:pr/7
>> Issue created at: https://bugs.openjdk.java.net/browse/SKARA-21
> webrev is a 404 for me...
Thanks @JornVernee for your contribution! :tada:
The patch looks good, have you tried it with a credential with a `path`? I'm thinking that if the user has a `path` set for a credential then we should probably pass that `path` back to `git credential approve` in `GitCredentials::approve`. Won't we otherwise set the credential for the entire host, or am I missing something? Looking at the [man page](https://git-scm.com/docs/git-credential) it seems like we should pass the `path` back to `git credential approve`
More information about the skara-dev