Skip to content

Cannot execute git command to checkout a pull request #6124

Closed

Description

@charleschege

Describe the bug

Running git fetch origin pull/92/head:0.6 on bash shell runs the command successfully, fetching a pull request and storing it in the branch called 0.6 in the command. However, nushell is unable to do this, I have tried adding quotes.

How to reproduce

Run git fetch origin pull/92/head:0.6 on nu shell

Expected behavior

❯ git fetch origin pull/92/head:0.6
Error: nu::parser::extra_positional (link)

  × Extra positional argument.
   ╭─[entry #25:1:1]
 1 │ git fetch origin pull/92/head:0.6
   ·                  ────────┬───────
   ·                          ╰── extra positional argument
   ╰────
  help: Usage: git fetch {flags} (repository)

Screenshots

No response

Configuration

No response

Additional context

No response

Activity

  1. fdncred commented on Jul 25, 2022

    @fdncred
    Contributor

    I've seen this many times. I wouldn't be surprised if there was another issue. I'm pretty sure it has to do with the custom completions not accommodating all parameters. I typically put a ^ in front when this happens and it fixes the problem. Long term, the git custom completions need to be updated.

  2. Kangaxx-0 commented on Jul 29, 2022

    @Kangaxx-0
    Contributor

    This is because git fetch is being considered as internal command, if you check out config nu from terminal, you should see a custom command extern "git fetch", please try to remove it and it should do the magic

  3. jansol commented on Nov 1, 2022

    @jansol

    git push --force-with-lease also fails due to the same problem.

  4. fdncred commented on Nov 1, 2022

    @fdncred
    Contributor

    Yup, every sub command or parameter that isn't implemented in the nushell custom completions will exhibit this same error.

  5. added this to the v0.74 milestone on Dec 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    category:bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions