This is incorrect in general case.

Consider this
```
git branch -m oldname -- newname
```
---

This works as expected: the branch `oldname` is renamed to `newname`.

The point of `--` should be to signal the end of options. When the parser sees it, it stops parsing any more options and removes `--` itself.

I've provided a comprehensive explanation earlier https://github.com/elixir-lang/elixir/issues/2263#issuecomment-42754348.

---

This is also the reason I did not want to agree with the explanation that "it removes -- if it's the first argument". This is incorrect.

The way the `ruby` program works as it does is because it essentially uses `parse_head`, then interprets the first argument as a script name and passes the rest of the arguments unmodified to the script.

But a command like `git` essentially uses `parse` – i.e. it allows options to be passed after positional arguments. In the invocation of `git branch` above we can see the `--` is not the first positional argument and it still gets ignored. This happens precisely because `git branch` doesn't interpret its first positional argument before parsing the rest of the argv.

/cc @josevalim