- 03 Jul, 2017 1 commit
-
-
Next to including several files, our "common.h" header also declares various macros which are then used throughout the project. As such, we have to make sure to always include this file first in all implementation files. Otherwise, we might encounter problems or even silent behavioural differences due to macros or defines not being defined as they should be. So in fact, our header and implementation files should make sure to always include "common.h" first. This commit does so by establishing a common include pattern. Header files inside of "src" will now always include "common.h" as its first other file, separated by a newline from all the other includes to make it stand out as special. There are two cases for the implementation files. If they do have a matching header file, they will always include this one first, leading to "common.h" being transitively included as first file. If they do not have a matching header file, they instead include "common.h" as first file themselves. This fixes the outlined problems and will become our standard practice for header and source files inside of the "src/" from now on.
Patrick Steinhardt committed
-
- 10 Oct, 2014 5 commits
-
-
Keeping the cache around after read-tree is only one part of the optimisation opportunities. In order to share the cache between program instances, we need to write the TREE extension to the index. Do so, taking the opportunity to rename 'entries' to 'entry_count' to match the name given in the format description. The included test is rather trivial, but works as a sanity check.
Carlos Martín Nieto committed -
This wasn't used. We invalidate based on the full path, so we always go down the tree, never up.
Carlos Martín Nieto committed -
When reading from a tree, we know what every tree is going to look like, so we can fill in the tree cache completely, making use of the index for modification of trees a lot quicker.
Carlos Martín Nieto committed -
This simplifies freeing the entries quite a bit; though there aren't that many failure paths right now, introducing filling the cache from a tree will introduce more. This makes sure not to leak memory on errors.
Carlos Martín Nieto committed -
Carlos Martín Nieto committed
-
- 24 Sep, 2014 1 commit
-
-
Ciro Santilli committed
-
- 17 Apr, 2014 1 commit
-
-
While I was looking at the conflict cleanup code, I looked over at the tree cache code, since we clear the tree cache for each entry that gets removed and there is some redundancy there. I made some small tweaks to avoid extra calls to strchr and strlen in a few circumstances.
Russell Belfer committed
-
- 08 Jan, 2013 1 commit
-
-
Edward Thomson committed
-
- 13 Feb, 2012 1 commit
-
-
Signed-off-by: schu <schu-github@schulog.org>
schu committed
-
- 27 Sep, 2011 4 commits
-
-
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Carlos Martín Nieto committed -
Whenever a file is updated in the index, each tree leading towards it needs to be invalidated. Provide the supporting function. Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Carlos Martín Nieto committed -
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Carlos Martín Nieto committed -
Rename git_index_tree to git_tree_cache. Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Carlos Martín Nieto committed
-