Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Updated _git completion (not attached)



On Mon, Feb 28, 2011 at 17:33, Wayne Davison
<wayned@xxxxxxxxxxxxxxxxxxxxx> wrote:
>>
>> On Sat, Feb 19, 2011 at 02:39:57PM +0100, Simon Ruderich wrote:
>> - It seems like git checkout doesn't list only modified files but all
>> files.

> One thing to keep in mind is that it is right for it to list all
> (known-to-git) files after a tag or hash, since the user may want to change
> the file to a prior state.  It is only the default "git checkout FILE" that
> only really has meaning for changed files.

> And, I had thought for sure that
> git didn't allow filenames after git checkout -f (and indeed, the current
> completion code doesn't complete files after it), but in my testing of git
> 1.7.1, it accepted files to force w/o complaint.

If no tree-ish is given it uses HEAD as the tree-ish to look for files
in.  Perhaps it should only list files modified between HEAD and the
working tree when the tree-ish is HEAD.

> For instance, "git checkout -f zsh-4.3.9 ChangeLog" changes to that version,
> and if the file is tweaked and followed by "git checkout -f ChangeLog", the
> zsh-4.3.9 content is restored.  In both cases it seems to me that the -f was
> superfluous, but allowed (since the commands do the same thing w/o the -f).

I don’t see how -f should change anything in the completion.



Messages sorted by: Reverse Date, Date, Thread, Author