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

Re: potential improvement to 'git log' with a range

From
SBSanti Béjar <santi@agolina.net>
Date
Apr 9, 2010, 23:33 UTC
Message-ID
<h2gadf1fd3d1004091633qe27d49f0m2ecb461e56f405b1@mail.gmail.com>
In-Reply-To
<w2j3abd05a91004091624mb2836ff4v118a1ae9ac5ca6e7@mail.gmail.com>
On Sat, Apr 10, 2010 at 1:24 AM, Aghiles <aghilesk@gmail.com> wrote:
Show 10 quoted lines
> If I type:
>
>    git log FETCH_HEAD~4..HEAD
>
> I get something. But if I type:
>
>    git log HEAD..FETCH_HEAD~4
>
> I get nothing. Is there a good reason for that ?
>
Yes.

$ git log -h usage: git log [<options>] [<since>..<until>] [[--] <path>...]

So <since> and <until> are not equivalent. It list commits in <until> but not in <since>.

In your case HEAD has commits not in FETCH_HEAD~4 (your first command) while FETCH_HEAD~4 does not have commits not in HEAD. So HEAD is a descendent of FETCH_HEAD~4.

Hope I didn't misunderstood your question.

HTH, Santi

Previous: AghilesNext: Sverre Rabbelier
Message 2 of 18 in “potential improvement to 'git log' with a range”
  1. AghilesApr 9, 2010
  2. Santi BéjarApr 9, 2010
  3. Sverre RabbelierApr 9, 2010
  4. AghilesApr 10, 2010
  5. Sverre RabbelierApr 10, 2010
  6. Linus TorvaldsApr 10, 2010
  7. AghilesApr 11, 2010
  8. Jakub NarebskiApr 11, 2010
  9. Martin GeislerJun 23, 2010
  10. Jakub NarebskiJun 23, 2010
  11. Martin GeislerJun 23, 2010
  12. Jakub NarebskiJun 23, 2010
  13. Martin GeislerJun 23, 2010
  14. Jay SoffianJun 23, 2010
  15. Junio C HamanoJun 23, 2010
  16. Jay SoffianJun 23, 2010
  17. Junio C HamanoJun 24, 2010
  18. Jay SoffianJun 24, 2010

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.