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

[GSoC][RFC] discussion about stashing with conflicts

From
KJKapil Jain <jkapil.cs@gmail.com>
Date
Apr 7, 2019, 13:08 UTC
Message-ID
<CAMknYEN1x5zDPn4vaZmw3ch-Oy2=NQ=cfF9YmXumcbZGWvTToQ@mail.gmail.com>
below is my understanding from reading the parts of code as suggested on IRC.

what is the use of ce_stage macro ? tells about stage of an index entry. if ce_stage says, stage #0 i.e staging area, then that index entry is in staging area and nothing needs to be done. else a temporary index entry is created and repo_read_index_unmerged() calls other function and tries to add it to index. if it fails, it issues an error.

is this correct interpretation ?
1) in repo_read_index_unmerged(), why don't we make the value of
`unmerged` 0, if adding index entry is successful; as the entry is no
longer unmerged ?
2) what is ADD_CACHE_SKIP_DFCHECK ?
i am unsure if i get its meaning, cache.h says that it means "Ok to
skip DF conflict checks"
what are DF conflict checks ? something about diffing to check for
conflicts ? if so why are we skipping it this entry had conflicts in
the past maybe it will create again.
3) what is cache_nr variable in index_state struct ? what is its use ?

Now, about add_index_entry_with_check(), i don't fully understand this function but concentrating on the part pointed by dscho. https://github.com/git/git/blob/v2.21.0/read-cache.c#L1284-L1294

    /*
     * Inserting a merged entry ("stage 0") into the index
     * will always replace all non-merged entries..
     */

so this is the part we need to play with for the project https://git.github.io/SoC-2019-Ideas/#teach-git-stash-to-handle-unmerged-index-entries try and change this in some-way to not replace those unmerged entries or store them some place else ?

Next: Thomas Gummerer
Message 1 of 8 in “[GSoC][RFC] discussion about stashing with conflicts”
  1. Kapil JainApr 7, 2019
  2. Thomas GummererApr 7, 2019
  3. Kapil JainApr 8, 2019
  4. Duy NguyenApr 8, 2019
  5. Kapil JainApr 8, 2019
  6. Duy NguyenApr 8, 2019
  7. Kapil JainApr 8, 2019
  8. Thomas GummererApr 8, 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.