Commit Graph

11 Commits

Author SHA1 Message Date
Russell Belfer
9cd423583f API updates for submodule.h 2012-11-27 13:18:28 -08:00
Ben Straub
54b2a37ac7 Clean up config.h 2012-11-27 13:18:28 -08:00
Russell Belfer
331e7de900 Extensions to rmdir and mkdir utilities
* Rework GIT_DIRREMOVAL values to GIT_RMDIR flags, allowing
  combinations of flags
* Add GIT_RMDIR_EMPTY_PARENTS flag to remove parent dirs that
  are left empty after removal
* Add GIT_MKDIR_VERIFY_DIR to give an error if item is a file,
  not a dir (previously an EEXISTS error was ignored, even for
  files) and enable this flag for git_futils_mkpath2file call
* Improve accuracy of error messages from git_futils_mkdir
2012-11-09 13:52:06 -08:00
Edward Thomson
f45ec1a076 index refactoring 2012-10-29 20:04:21 -05:00
yorah
a1abe66aca Add config level support in the config API
Added `struct git_config_entry`: a git_config_entry contains the key, the value, and the config file level from which a config element was found.
Added `git_config_open_level`: build a single-level focused config object from a multi-level one.

We are now storing `git_config_entry`s in the khash of the config_file
2012-10-23 12:48:38 +02:00
Russell Belfer
0d64bef941 Add complex checkout test and then fix checkout
This started as a complex new test for checkout going through the
"typechanges" test repository, but that revealed numerous issues
with checkout, including:

* complete failure with submodules
* failure to create blobs with exec bits
* problems when replacing a tree with a blob because the tree
  "example/" sorts after the blob "example" so the delete was
  being processed after the single file blob was created

This fixes most of those problems and includes a number of other
minor changes that made it easier to do that, including improving
the TYPECHANGE support in diff/status, etc.
2012-10-09 11:59:34 -07:00
Russell Belfer
17b06f4d47 Add missing accessor for fetchRecurseSubmodules
When `git_submodule` became an opaque structure, I forgot to add
accessor functions for the fetchRecurseSubmodules config setting.
This fixes that.
2012-09-07 15:49:08 -07:00
Russell Belfer
fed886d990 Test for gitmodules only submodule def
This should confirm that issue #835 is fixed where a submodule that
is only declared in the .gitmodules file was not accessible via the
submodule APIs.
2012-09-05 15:54:32 -07:00
Russell Belfer
5f4a61aea8 Working implementation of git_submodule_status
This is a big redesign of the git_submodule_status API and the
implementation of the redesigned API.  It also fixes a number of
bugs that I found in other parts of the submodule API while
writing the tests for the status part.

This also fixes a couple of bugs in the iterators that had not
been noticed before - one with iterating when there is a gitlink
(i.e. separate-work-dir) and one where I was treating anything
even vaguely submodule-like as a submodule, more aggressively
than core git does.
2012-08-24 11:00:27 -07:00
Russell Belfer
0c8858de8c Fix valgrind issues and leaks
This fixes up a number of problems flagged by valgrind and also
cleans up the internal `git_submodule` allocation handling
overall with a simpler model.
2012-08-24 11:00:27 -07:00
Russell Belfer
aa13bf05c8 Major submodule rewrite
This replaces the old submodule API with a new extended API that
supports most of the things that can be done with `git submodule`.
2012-08-24 11:00:26 -07:00