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

Re: Potential bug: truncated diff output

From
David Kastrup <dak@gnu.org>
Date
Jan 16, 2014, 06:31 UTC
Message-ID
<87lhyg4eux.fsf@fencepost.gnu.org>
In-Reply-To
<CAAyYaWo7wtsVGGxUeE3wwG6UHZ_qc8wcPu4Dk6=DsF8JtyF6_w@mail.gmail.com>
Misha Penkov <misha.penkov@gmail.com> writes:
Show 7 quoted lines
> I have a file in a git repo. It has changed during the last two
> commits. I want to see the changes made in these two commits. The
> following command should work:
>
>     git diff HEAD^^
>
> but that doesn't get me the expected results. Read on for details.
> As I mentioned in the first paragraph, I want to generate a patch that
> includes both commits:
>
>     $git diff HEAD^^ HEAD ieicej.cls
Show 7 quoted lines
> This looks wrong, since it doesn't include the last commit. For
> example, changes to line 3145 are not there. It appears to include
> changes from the second-last commit (e.g. the stuff around line 1714).
>
> My questions:
>
> 1) What am I doing wrong?

You did not commit all your changes. Some of them are either only in your working directory, or in working directory and index.

> 2) How can I get the diff to include all the commits in their
> entirety?
It did.
> 3) Is this a bug?
No.
-- 
David Kastrup
Previous: Misha PenkovNext: Johannes Sixt
Message 2 of 5 in “Potential bug: truncated diff output”
  1. Misha PenkovJan 16, 2014
  2. David KastrupJan 16, 2014
  3. Johannes SixtJan 16, 2014
  4. David KastrupJan 16, 2014
  5. Misha PenkovJan 16, 2014

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.