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

Re: [problem with name-rev]

From
Phil Hord <phil.hord@gmail.com>
Date
Aug 20, 2019, 19:57 UTC
Message-ID
<CABURp0qHnzpwr8dPtPZpA+1C=tEsoybh2V00iHpyrJ2AM8XHzQ@mail.gmail.com>
In-Reply-To
<87k1b7k4w1.fsf@mat.ucm.es>
On Tue, Aug 20, 2019 at 12:35 PM Uwe Brauer <oub@mat.ucm.es> wrote:
Show 35 quoted lines
>
> Take the following part of what I did
>
> git init
> echo 1 > 1
> git add 1
> git commit -m 1
> echo 1.1 > 1
> git add .
> git commit -m 1.1
> git checkout -b foo master~1
> echo 1.2 > 1
> git add .
> git commit -m 1.2
> echo 1.2.1 > 1
> git add .
> git commit -m 1.2.1
> git checkout master
>
> There are 4  commits.
>
> But
>
> Git --log --graph --decorate
>
> Returns
> * commit 98922f82932cd1bef58bebf0229367922bca45fc (HEAD -> master)
> | Author: Uwe Brauer <oub@mat.ucm.es>
> | Date:   Tue Aug 20 21:19:59 2019 +0200
> |
> |     1.1
> |
> * commit 8f565d59c356a6038e3d8a7f5dcd2e4a39ae1bb4
>   Author: Uwe Brauer <oub@mat.ucm.es>
>   Date:   Tue Aug 20 21:19:59 2019 +0200

Try adding '--all' to include all refs, not just the current HEAD, to begin logging from. Here is what I see after running your setup script.

$  git log --graph --decorate --all
* commit 3262040f2d8d5f31b4918bda9987e6b5f788531f (foo)
| Author: Phil Hord <phord@purestorage.com>
| Date:   Tue Aug 20 12:44:32 2019
|
|     1.2.1
|
* commit fc66c4311bf954d455f468581f2913dffa0f9c2b
| Author: Phil Hord <phord@purestorage.com>
| Date:   Tue Aug 20 12:44:32 2019
|
|     1.2
|
| * commit 109e5d4baef4e99cf636189ba1499af817ab0bb1 (HEAD -> master)
|/  Author: Phil Hord <phord@purestorage.com>
|   Date:   Tue Aug 20 12:44:32 2019
|
|       1.1
|
* commit 5c1e93ed7c5b3b241d5adfadb365a6bca5d60d3a
  Author: Phil Hord <phord@purestorage.com>
  Date:   Tue Aug 20 12:44:32 2019
      1

You could also mention only the refs you are interested in instead of including all of them. $ git log --graph --decorate foo master

Previous: Uwe BrauerNext: Uwe Brauer
Message 11 of 13 in “git log --graph with a sort of local revision number”
  1. Uwe BrauerAug 15, 2019
  2. Rafael AscensãoAug 18, 2019
  3. Uwe BrauerAug 18, 2019
  4. Uwe BrauerAug 18, 2019
  5. [SOLVED] (was: git log --graph with a sort of local revision number)Uwe Brauer, Aug 18, 2019
  6. [problem with name-rev] (was: git log --graph with a sort of local revision number)Uwe Brauer, Aug 20, 2019
  7. SZEDER GáborAug 20, 2019
  8. Rafael AscensãoAug 20, 2019
  9. Junio C HamanoAug 20, 2019
  10. Uwe BrauerAug 20, 2019
  11. Phil HordAug 20, 2019
  12. Uwe BrauerAug 21, 2019
  13. Uwe BrauerAug 21, 2019

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.