From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16579 invoked by alias); 23 Jan 2015 20:33: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: 34362 Received: (qmail 19358 invoked from network); 23 Jan 2015 20:33:34 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=QHcKqTaKa4VXAWoO8K5S9P3gv8o+s9FYUFY9BQNG7Q8=; b=s4n2ie+if4KsLpBaUDE3f7jy5NB7eVsDYH7j1XIA/3LHw0Lrr1SigFbKzJl6+ZtGnR TCM4ie9pj2cvTc9XEkxgZQmEitTR2xbRDWdtF4fTGQqamNbfGPIwgq+bWewFAPFX2oT2 pMQArMBabfW1lMzPNCTHLOsZltEp9KH1LeBNrynczsxbBxEUAiRPpGNRnJO99j0RV4EF fmBv2Vrtt5jOmSfufgSKj4ttbJAQVyt3dgJjhzL6nuV5USIc2V4ArN6E00sRHj+qFj3Y ROaHhdp4QXLPX5q+4cIrgCTPm8C6Wr18RM5TIv/AYyhARQZZ3aCyZA96L2o5Spt2ASmG hXQQ== MIME-Version: 1.0 X-Received: by 10.50.13.97 with SMTP id g1mr3996570igc.42.1422045210943; Fri, 23 Jan 2015 12:33:30 -0800 (PST) In-Reply-To: <20150123194719.229de1fb@ntlworld.com> References: <150122211942.ZM28918@torch.brasslantern.com> <4302591421991433@web9g.yandex.ru> <150122215955.ZM29120@torch.brasslantern.com> <1300561422028154@web18g.yandex.ru> <20150123194719.229de1fb@ntlworld.com> Date: Fri, 23 Jan 2015 21:33:30 +0100 Message-ID: Subject: Re: Anyone want to help make zsh/db/gdbm work? From: Mikael Magnusson To: Peter Stephenson Cc: "zsh-workers@zsh.org" Content-Type: text/plain; charset=UTF-8 On Fri, Jan 23, 2015 at 8:47 PM, Peter Stephenson wrote: > On Fri, 23 Jan 2015 18:49:14 +0300 > ZyX wrote: >> 23.01.2015, 09:00, "Bart Schaefer" : >> > On Jan 23, 8:37am, ZyX wrote: >> > } It looks like if you forgot to `git add` Doc/Zsh/mod_db_gdbm.yo. I do >> > } not see it in the patch, only a small reference here. >> > >> > Actually what I didn't realize was that one has to diff against >> > origin/master for new files, rather than against the local master. >> >> I have run into this problem a few times: by default git diffs against >> index (not the current revision) and when you do `git add` then file >> is added to the index as a whole making just `git diff` not present >> it. > > The standard fix for this is "git diff --staged" (or --cached) but you > have to remember --- it's particular confusing if you've got some stuff > staged and some not as you only get to see diffs for one or other. I'm > not sure it's quite what Bart is talking about as that seems to be > about committed files. The best way to show a diff to someone is to finish what you're doing, commit it, and then use git format-patch -1. If you really want to diff the working tree without committing, git diff HEAD will always show index+worktree diffed to the last commit (eg, what would be committed with git commit -a), in addition to the other two variants mentioned already (git diff: worktree to index, git diff --cached: index to last commit). -- Mikael Magnusson