From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8124 invoked by alias); 10 Mar 2016 12:46:36 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 38126 Received: (qmail 6082 invoked from network); 10 Mar 2016 12:46:34 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.1 X-Biglobe-Sender: Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 6.6 \(1510\)) Subject: Re: _git-reset doesn't complete newly staged files From: "Jun T." In-Reply-To: <20160309132444.GA2428@tarsus.local2> Date: Thu, 10 Mar 2016 21:03:59 +0900 Content-Transfer-Encoding: quoted-printable Message-Id: References: <20160309132444.GA2428@tarsus.local2> To: "zsh-workers@zsh.org" X-Mailer: Apple Mail (2.1510) X-Biglobe-Spnum: 54482 On 2016/03/09, at 22:24, Daniel Shahaf wrote: > Sorry for not replying earlier: I had this flagged for attention but > haven't spoken up sooner since I expected I wouldn't have time to = reply > to responses. You are exactly the one from whom I wanted to have comments.=20 > I think you're looking for =C2=ABgit diff-index --cached -z = --name-only > $treeish=C2=BB. What I was not sure was whether to offer conflicting files or not. 'git reset conflicting_file' leaves the working tree unmodified (so '<<<<<<< HEAD' etc. remain there) while the index becomes clean (conflict fixed) and you can commit it. I thought this would not be useful. But it is not an error anyway, and maybe there are someone who really want to do that (if they are going to run 'git reset' while there is a conflict, they may well know what they are doing). > I took the liberty of changing the tag and description you used, since > "staged files" isn't exactly right for this syntax: files that are in > $treeish but not staged may also be completed. I thought those files are 'staged for delete', but your more descriptive tag/description would be better. > Incidentally, it would be nice to have a docstring for = __git_ignore_line: Yes, and > Why does __git_ignore_line escape some characters with backslashes > before adding them to $ignored? I'm rather confused. Isn't it better to UN-quote them? % touch 'a b.txt' % git add this completes a\ b.txt, and % git add a\ b.txt this still completes a\ b.txt. Using ignored+=3D(${(Q)line[1,CURRENT-1]}) ignored+=3D(${(Q)line[CURRENT+1,-1]}) fixes this. Moreover, % git add *.txt this does not complete a\ b.txt anymore. Or there are something I've overlooked.