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

Re: Commit is marked as new, despite on it already on branch

From
Bagas Sanjaya <bagasdotme@gmail.com>
Date
Sep 29, 2021, 06:31 UTC
Message-ID
<7ebed419-8588-7574-c25a-9018d07881c7@gmail.com>
In-Reply-To
<691467377.20210928163616@yandex.ru>
On 28/09/21 20.36, Eugen Konkov wrote:
Show 137 quoted lines
> Hi.
> 
> Here is comparison of two branches. All same commits are marked as '='
> But in my situaltion commit is marked as new '>'
> 
> Here is my main 'dev' branch
> *   8fd53c7d (HEAD -> dev, local/dev) Merge branch 'frontend' into test-dev
> |\
> | * 3da9e49c (local/frontend, frontend) 'Save/sync' button is active always
> | * d192d9a7 Added library 'materialize' and facelifted the contractor table
> |/
> * 0cb280f5 Do not export test data
> *   ce1df25f Merge branch 'frontend' into dev
> |\
> | * da78b64f Display disabled element title
> | * 5f741628 Gen podio ref using document or agreement info
> | * 2d756923 Added ref to 'Podio'
> | * 129c972d Clean forms when load o reload the page
> | * d96c45e4 Use production and test modes in parallel
> | * 20bf7186 Added refs to download document and sandbox link for agreement
> * | a0e338cb Display only tick for user experience
> * | 2b2fb1d5 Merge branch 'frontend' into dev
> |\|
> | * d868d72b Added fonts link and some changes for user experience
> | * 74426fd0 Added message to say "The docn has been used. Use another docn."
> | * b183803b Fill client passport form by parsed passport data
> | * b40234ed Fill client form by parsed client data string
> |/
> * ed3f3026 Invert data to show provider as 'true' value
> 
> Here we see our interesting commit:
> a0e338cb Display only tick for user experience
> 
> Here is branch I do comparison to:
> *   ec655271 (HEAD, xtucha/dev) Merge branch 'frontend' into dev
> |\
> | * a6085d95 'Save/sync' button is active always
> | * bbca694b Added library 'materialize' and facelifted the contractor table
> | * 92103b2d Display only tick for user experience
> | *   4f0a1881 Merge branch 'frontend' into dev
> | |\
> * | | 0cb280f5 Do not export test data
> * | |   ce1df25f Merge branch 'frontend' into dev
> |\ \ \
> | | |/
> | |/|
> | * | da78b64f Display disabled element title
> | * | 5f741628 Gen podio ref using document or agreement info
> | * | 2d756923 Added ref to 'Podio'
> | * | 129c972d Clean forms when load o reload the page
> | * | d96c45e4 Use production and test modes in parallel
> | * | 20bf7186 Added refs to download document and sandbox link for agreement
> * | | a0e338cb Display only tick for user experience
> * | | 2b2fb1d5 Merge branch 'frontend' into dev
> |\| |
> | |/
> |/|
> | * d868d72b Added fonts link and some changes for user experience
> | * 74426fd0 Added message to say "The docn has been used. Use another docn."
> | * b183803b Fill client passport form by parsed passport data
> | * b40234ed Fill client form by parsed client data string
> |/
> * ed3f3026 Invert data to show provider as 'true' value
> 
> 
> $git log --graph --decorate --pretty=oneline --abbrev-commit --cherry-mark --boundary --left-right dev...xtucha/dev
> <   8fd53c7d (HEAD -> dev, local/dev) Merge branch 'frontend' into test-dev
> |\
> | = 3da9e49c (local/frontend, frontend) 'Save/sync' button is active always
> | = d192d9a7 Added library 'materialize' and facelifted the contractor table
> |/
> | > ec655271 (xtucha/dev) Merge branch 'frontend' into dev
> |/|
> | = a6085d95 'Save/sync' button is active always
> | = bbca694b Added library 'materialize' and facelifted the contractor table
> | > 92103b2d Display only tick for user experience
> | >   4f0a1881 Merge branch 'frontend' into dev
> | |\
> | | o da78b64f Display disabled element title
> | o ed3f3026 Invert data to show provider as 'true' value
> o 0cb280f5 Do not export test data
> 
> Here you can see that '92103b2d Display only tick for user experience' commit is marked as new
> 
> If I do explicite comarison of a0e338cb and 92103b2d, then we see that is marked as '='
> 
> git range-diff a0e338cb...92103b2d
> -:  -------- > 1:  20bf7186 Added refs to download document and sandbox link for agreement
> -:  -------- > 2:  d96c45e4 Use production and test modes in parallel
> -:  -------- > 3:  129c972d Clean forms when load o reload the page
> -:  -------- > 4:  2d756923 Added ref to 'Podio'
> -:  -------- > 5:  5f741628 Gen podio ref using document or agreement info
> -:  -------- > 6:  da78b64f Display disabled element title
> 1:  a0e338cb = 7:  92103b2d Display only tick for user experience
> 
> if I do range-diff between branches dev...xtucha/dev
> git range-diff 8fd53c7d...ec655271
> -:  -------- > 1:  92103b2d Display only tick for user experience
> 1:  d192d9a7 = 2:  bbca694b Added library 'materialize' and facelifted the contractor tabl
> 2:  3da9e49c = 3:  a6085d95 'Save/sync' button is active always
> 
> We again see 'Display only tick for user experience' commit as new
> 
> 
> I think problem arise because git does not see that all three commits:
>     
> | | o da78b64f Display disabled element title
> | o ed3f3026 Invert data to show provider as 'true' value
> o 0cb280f5 Do not export test data
> 
> have same fork-point  "ed3f3026 Invert data to show provider as 'true' value"
> 
> 
> Probably because git merge-base get analyzed only left branch and not right:
> $ git merge-base ec655271 8fd53c7d
> 0cb280f544113926e1059568811f99c311489d4c
> 
> 
> 
> 
> 
> I expect that end of out should look like this:
> 
> | |  |
> | |  * da78b64f Display disabled element title
> | * |   0cb280f5 Do not export test data
> | |  |
> ........
> | |  /
> ---
> |/
> o ed3f3026 Invert data to show provider as 'true' value
> 
> 
> 
> 
> 
Can you create minimal reproducible case so that everyone here can test it?
-- 
An old man doll... just what I always wanted! - Clara
Previous: Eugen Konkov
Message 2 of 2 in “Commit is marked as new, despite on it already on branch”
  1. Eugen KonkovSep 28, 2021
  2. Bagas SanjayaSep 29, 2021

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.