From: Jonas Fonseca Date: Tue, 14 Oct 2008 05:55:05 +0000 (+0200) Subject: Use "--" to separate file argument to git-checkout X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=0417853c9a1ea412bc1680cd7bd6c92c21b803b5;p=tig.git Use "--" to separate file argument to git-checkout --- diff --git a/tig.c b/tig.c index 507ecdb..f436571 100644 --- a/tig.c +++ b/tig.c @@ -4394,7 +4394,7 @@ status_revert(struct status *status, enum line_type type, bool has_none) char file_sq[SIZEOF_STR]; if (sq_quote(file_sq, 0, status->old.name) >= sizeof(file_sq) || - !string_format(cmd, "git checkout %s%s", opt_cdup, file_sq)) + !string_format(cmd, "git checkout -- %s%s", opt_cdup, file_sq)) return FALSE; return run_confirm(cmd, "Are you sure you want to overwrite any changes?");