From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13053 invoked by alias); 26 Feb 2016 08:54:09 -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: 38033 Received: (qmail 25752 invoked from network); 26 Feb 2016 08:54:08 -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: From: "Jun T." Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: _git-reset doesn't complete newly staged files Message-Id: <0FD99C66-391B-4971-ABD2-3595A0EB21CB@kba.biglobe.ne.jp> Date: Fri, 26 Feb 2016 17:08:11 +0900 To: "zsh-workers@zsh.org" Mime-Version: 1.0 (Mac OS X Mail 6.6 \(1510\)) X-Mailer: Apple Mail (2.1510) X-Biglobe-Spnum: 51969 Suppose we are in a simple git repo with two files: % ls foo.c main.c Now create a new file and stage it: % vi bar.c % git add bar.c % git status # On branch master # Changes to be committed: # (use "git reset HEAD ..." to unstage) # # new file: bar.c # Then if I type % git reset HEAD foo.c main.c # bar.c is NOT offered. _git-reset() calls __git_tree_files(), which lists only the already tracked files. Maybe we could use git status -uno --porcelain | grep '^[ADM]' to get a list of staged files (files which can be reset)? In the case of 'git reset ' or 'git reset HEAD ', I think it would be better to offer only bar.c (because 'git reset HEAD main.c' is just a nop), but at least bar.c need be offered in addition to foo.c and main.c.