git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Get a git diff without taking index into account

From
Eric Frederich <eric.frederich@gmail.com>
Date
Feb 18, 2015, 18:27 UTC
Message-ID
<CAAoZyYOst-5cD7qtV=T3Oahja1JN1ZmeyAcELrn7xD0bMc7Mrg@mail.gmail.com>
In-Reply-To
<xmqqfva341sf.fsf@gitster.dls.corp.google.com>

Thanks for the reply. My immediate concern is not to fix the documentation but to get some sort of status or diff. I want to avoid using an index because I want to allow multiple processes to do different diffs at the same time.

Right now I can put trees into the repo and get trees out without using the index but I had to write routines that use the lower level commands. If I could use the index it would be a couple of out of the box commands and I wouldn't have to write my own routine. While I've already written ones for "git add" and "git checkout" I'm trying to avoid writing one for "git diff"

I looks like this is unavoidable. Oh well... thanks for the help.

On Wed, Feb 18, 2015 at 11:33 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 20 quoted lines
> Eric Frederich <eric.frederich@gmail.com> writes:
>
>> This is from "git help diff".  It seems to imply that I should be able to do it.
>> It mentions nothing of the index.
>
> Most of the documentation on early subcommands (and "git diff"
> certainly is one of the early subcommands) were written back when
> everybody knew that Git almost always talks about _tracked_ files
> that are known to the index, and the only time it even cares about
> untracked ones that are not in the index was when it tries to help
> users by reminding what the user may have forgot to "git add".
>
> Documentation pages do not bother repeating "this only looks at
> tracked paths" for this reason; Git is about tracked files by
> default.
>
> Perhaps you can suggest how to improve the description of commands
> without being too repetitive?
>
> Thanks.
Previous: Junio C HamanoNext: Jeff King
Message 6 of 11 in “Get a git diff without taking index into account”
  1. Eric FrederichFeb 18, 2015
  2. Eric FrederichFeb 18, 2015
  3. Junio C HamanoFeb 18, 2015
  4. Eric FrederichFeb 18, 2015
  5. Junio C HamanoFeb 18, 2015
  6. Eric FrederichFeb 18, 2015
  7. Jeff KingFeb 18, 2015
  8. Eric FrederichFeb 18, 2015
  9. Eric FrederichFeb 18, 2015
  10. Junio C HamanoFeb 18, 2015
  11. Jeff KingFeb 18, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.