git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [GSoC][RFC] discussion about stashing with conflicts
@ 2019-04-07 13:08 Kapil Jain
  2019-04-07 18:38 ` Thomas Gummerer
  0 siblings, 1 reply; 8+ messages in thread
From: Kapil Jain @ 2019-04-07 13:08 UTC (permalink / raw)
  To: git, Johannes Schindelin, Thomas Gummerer

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 ?

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-04-08 21:55 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-07 13:08 [GSoC][RFC] discussion about stashing with conflicts Kapil Jain
2019-04-07 18:38 ` Thomas Gummerer
2019-04-08  5:48   ` Kapil Jain
2019-04-08 10:31     ` Duy Nguyen
2019-04-08 11:00       ` Kapil Jain
2019-04-08 11:09         ` Duy Nguyen
2019-04-08 14:27           ` Kapil Jain
2019-04-08 21:55             ` Thomas Gummerer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).