git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Eric Frederich <eric.frederich@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>,
	Git Mailing List <git@vger.kernel.org>
Subject: Re: Get a git diff without taking index into account
Date: Wed, 18 Feb 2015 17:30:13 -0500	[thread overview]
Message-ID: <20150218223013.GA16287@peff.net> (raw)
In-Reply-To: <CAAoZyYOT_OQZ+rrwFvnsVBV_sYRA4Oti3vRNnE6_RaV9w8qxdg@mail.gmail.com>

On Wed, Feb 18, 2015 at 04:38:55PM -0500, Eric Frederich wrote:

> Also, how would I go about detecting untracked files the way status does?
> There is no way to specify a HEAD per git command using switches or
> environment variables.
> I can't change the HEAD of the Git repo because other processes may be
> using it at the same time.

Untracked files are a function of the index, not of the HEAD. So you
would load whatever tree you like into your index (either "the" index,
or a temporary one you specify with GIT_INDEX_FILE), and then "git
ls-files -o".

-Peff

      parent reply	other threads:[~2015-02-18 22:30 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-18 14:57 Get a git diff without taking index into account Eric Frederich
2015-02-18 15:06 ` Eric Frederich
2015-02-18 15:37   ` Junio C Hamano
2015-02-18 15:42     ` Eric Frederich
2015-02-18 16:33       ` Junio C Hamano
2015-02-18 18:27         ` Eric Frederich
2015-02-18 18:32           ` Jeff King
2015-02-18 19:36             ` Eric Frederich
2015-02-18 21:38             ` Eric Frederich
2015-02-18 22:16               ` Junio C Hamano
2015-02-18 22:30               ` Jeff King [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150218223013.GA16287@peff.net \
    --to=peff@peff.net \
    --cc=eric.frederich@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).