git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Thomas Gummerer <t.gummerer@gmail.com>
To: Kapil Jain <jkapil.cs@gmail.com>
Cc: Duy Nguyen <pclouds@gmail.com>, git <git@vger.kernel.org>,
	Johannes Schindelin <Johannes.Schindelin@gmx.de>
Subject: Re: [GSoC][RFC] discussion about stashing with conflicts
Date: Mon, 8 Apr 2019 22:55:35 +0100	[thread overview]
Message-ID: <20190408215535.GB32487@hank.intra.tgummerer.com> (raw)
In-Reply-To: <CAMknYENGZBQ6-8sJ5UrKS_ZLLoz79K8FYUHFQqSpV2JrkSuf6w@mail.gmail.com>

On 04/08, Kapil Jain wrote:
> while understanding add_index_entry_with_check()
> i got to do_invalidate_path().
> 
> the commit hash for do_invalidate_path() function is
> `749864627c2d3c33bbc56d7ba0b5542af698cc40`
> 
> in the commit message it is explained that, cache-tree is used to
> store object names of index file objects and it is kept separate from
> index file because adding it would change index file format.
> 
> the part i couldn't understand is:
> "During various index manupulations, we selectively invalidate
> the parts so that the next write-tree can bypass regenerating
> tree objects for unchanged parts of the directory hierarchy."
> 
> what exactly does invalidating means here ?

FWIW, I don't think you need to understand cache-tree for the stash
GSoC project.  Your time is probably better spent taking what you
learned, and trying to make that into a proposal, as the application
period is coming to an end.

That said, since we are talking about a cache here, invalidating means
simply making part of the cache invalid, which means the caches
contents need to be re-calculated next time they are needed.

For the cache-tree in particular that means that we need to
re-calculate tree objects that have been invalidated, while we can
just re-use the ones that have not.

If you want to have a look at the cache-tree, you can use
't/helper/test-tool dump-cache-tree .git/index' from your locally
built git, which will dump the cache-tree that can be found
'.git/index'.  Compare the output of that command just after you did
'git reset --hard' on your repository (of course it needs some
contents), and after you modified some file, and added it to the index
using 'git add'.  In the latter case you will notice some directories
that are marked as 'invalid'.

      reply	other threads:[~2019-04-08 21:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190408215535.GB32487@hank.intra.tgummerer.com \
    --to=t.gummerer@gmail.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=jkapil.cs@gmail.com \
    --cc=pclouds@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).