gitweb.git
pack: move check_pack_index_ptr(), nth_packed_object_of... Jonathan Tan Fri, 18 Aug 2017 22:20:32 +0000 (15:20 -0700)

pack: move check_pack_index_ptr(), nth_packed_object_offset()

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

pack: move nth_packed_object_{sha1,oid}Jonathan Tan Fri, 18 Aug 2017 22:20:31 +0000 (15:20 -0700)

pack: move nth_packed_object_{sha1,oid}

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

pack: move clear_delta_base_cache(), packed_object_info... Jonathan Tan Fri, 18 Aug 2017 22:20:30 +0000 (15:20 -0700)

pack: move clear_delta_base_cache(), packed_object_info(), unpack_entry()

Both sha1_file.c and packfile.c now need read_object(), so a copy of
read_object() was created in packfile.c.

This patch makes both mark_bad_packed_object() and has_packed_and_bad()
global. Unlike most of the other patches in this series, these 2
functions need to remain global.

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

pack: move unpack_object_header()Jonathan Tan Fri, 18 Aug 2017 22:20:29 +0000 (15:20 -0700)

pack: move unpack_object_header()

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

pack: move get_size_from_delta()Jonathan Tan Fri, 18 Aug 2017 22:20:28 +0000 (15:20 -0700)

pack: move get_size_from_delta()

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

pack: move unpack_object_header_buffer()Jonathan Tan Fri, 18 Aug 2017 22:20:27 +0000 (15:20 -0700)

pack: move unpack_object_header_buffer()

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

pack: move {,re}prepare_packed_git and approximate_obje... Jonathan Tan Fri, 18 Aug 2017 22:20:26 +0000 (15:20 -0700)

pack: move {,re}prepare_packed_git and approximate_object_count

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

pack: move install_packed_git()Jonathan Tan Fri, 18 Aug 2017 22:20:25 +0000 (15:20 -0700)

pack: move install_packed_git()

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

pack: move add_packed_git()Jonathan Tan Fri, 18 Aug 2017 22:20:24 +0000 (15:20 -0700)

pack: move add_packed_git()

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

pack: move unuse_pack()Jonathan Tan Fri, 18 Aug 2017 22:20:23 +0000 (15:20 -0700)

pack: move unuse_pack()

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

pack: move use_pack()Jonathan Tan Fri, 18 Aug 2017 22:20:22 +0000 (15:20 -0700)

pack: move use_pack()

The function open_packed_git() needs to be temporarily made global. Its
scope will be restored to static in a subsequent commit.

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

pack: move pack-closing functionsJonathan Tan Fri, 18 Aug 2017 22:20:21 +0000 (15:20 -0700)

pack: move pack-closing functions

The function close_pack_fd() needs to be temporarily made global. Its
scope will be restored to static in a subsequent commit.

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

pack: move release_pack_memory()Jonathan Tan Fri, 18 Aug 2017 22:20:20 +0000 (15:20 -0700)

pack: move release_pack_memory()

The function unuse_one_window() needs to be temporarily made global. Its
scope will be restored to static in a subsequent commit.

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

pack: move open_pack_index(), parse_pack_index()Jonathan Tan Fri, 18 Aug 2017 22:20:19 +0000 (15:20 -0700)

pack: move open_pack_index(), parse_pack_index()

alloc_packed_git() in packfile.c is duplicated from sha1_file.c. In a
subsequent commit, alloc_packed_git() will be removed from sha1_file.c.

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

pack: move pack_report()Jonathan Tan Fri, 18 Aug 2017 22:20:18 +0000 (15:20 -0700)

pack: move pack_report()

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

pack: move static state variablesJonathan Tan Fri, 18 Aug 2017 22:20:17 +0000 (15:20 -0700)

pack: move static state variables

sha1_file.c declares some static variables that store packfile-related
state. Move them to packfile.c.

They are temporarily made global, but subsequent commits will restore
their scope back to static.

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

pack: move pack name-related functionsJonathan Tan Fri, 18 Aug 2017 22:20:16 +0000 (15:20 -0700)

pack: move pack name-related functions

Currently, sha1_file.c and cache.h contain many functions, both related
to and unrelated to packfiles. This makes both files very large and
causes an unclear separation of concerns.

Create a new file, packfile.c, to hold all packfile-related functions
currently in sha1_file.c. It has a corresponding header packfile.h.

In this commit, the pack name-related functions are moved. Subsequent
commits will move the other functions.

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Sync with maintJunio C Hamano Wed, 23 Aug 2017 21:36:38 +0000 (14:36 -0700)

Sync with maint

* maint:
Prepare for 2.14.2

Prepare for 2.14.2Junio C Hamano Wed, 23 Aug 2017 21:36:03 +0000 (14:36 -0700)

Prepare for 2.14.2

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'jt/t1450-fsck-corrupt-packfile' into... Junio C Hamano Wed, 23 Aug 2017 21:33:52 +0000 (14:33 -0700)

Merge branch 'jt/t1450-fsck-corrupt-packfile' into maint

A test update.

* jt/t1450-fsck-corrupt-packfile:
tests: ensure fsck fails on corrupt packfiles

Merge branch 'jb/t8008-cleanup' into maintJunio C Hamano Wed, 23 Aug 2017 21:33:52 +0000 (14:33 -0700)

Merge branch 'jb/t8008-cleanup' into maint

Code clean-up.

* jb/t8008-cleanup:
t8008: rely on rev-parse'd HEAD instead of sha1 value

Merge branch 'jt/subprocess-handshake' into maintJunio C Hamano Wed, 23 Aug 2017 21:33:52 +0000 (14:33 -0700)

Merge branch 'jt/subprocess-handshake' into maint

Code cleanup.

* jt/subprocess-handshake:
sub-process: refactor handshake to common function
Documentation: migrate sub-process docs to header
convert: add "status=delayed" to filter process protocol
convert: refactor capabilities negotiation
convert: move multiple file filter error handling to separate function
convert: put the flags field before the flag itself for consistent style
t0021: write "OUT <size>" only on success
t0021: make debug log file name configurable
t0021: keep filter log files on comparison

Merge branch 'dc/fmt-merge-msg-microcleanup' into maintJunio C Hamano Wed, 23 Aug 2017 21:33:52 +0000 (14:33 -0700)

Merge branch 'dc/fmt-merge-msg-microcleanup' into maint

Code cleanup.

* dc/fmt-merge-msg-microcleanup:
fmt-merge-msg: fix coding style

Merge branch 'ah/doc-wserrorhighlight' into maintJunio C Hamano Wed, 23 Aug 2017 21:33:51 +0000 (14:33 -0700)

Merge branch 'ah/doc-wserrorhighlight' into maint

Doc update.

* ah/doc-wserrorhighlight:
doc: add missing values "none" and "default" for diff.wsErrorHighlight

Merge branch 'cc/ref-is-hidden-microcleanup' into maintJunio C Hamano Wed, 23 Aug 2017 21:33:50 +0000 (14:33 -0700)

Merge branch 'cc/ref-is-hidden-microcleanup' into maint

Code cleanup.

* cc/ref-is-hidden-microcleanup:
refs: use skip_prefix() in ref_is_hidden()

Merge branch 'js/run-process-parallel-api-fix' into... Junio C Hamano Wed, 23 Aug 2017 21:33:49 +0000 (14:33 -0700)

Merge branch 'js/run-process-parallel-api-fix' into maint

API fix.

* js/run-process-parallel-api-fix:
run_processes_parallel: change confusing task_cb convention

Merge branch 'rs/pack-objects-pbase-cleanup' into maintJunio C Hamano Wed, 23 Aug 2017 21:33:48 +0000 (14:33 -0700)

Merge branch 'rs/pack-objects-pbase-cleanup' into maint

Code clean-up.

* rs/pack-objects-pbase-cleanup:
pack-objects: remove unnecessary NULL check

Merge branch 'jt/fsck-code-cleanup' into maintJunio C Hamano Wed, 23 Aug 2017 21:33:48 +0000 (14:33 -0700)

Merge branch 'jt/fsck-code-cleanup' into maint

Code clean-up.

* jt/fsck-code-cleanup:
fsck: cleanup unused variable
object: remove "used" field from struct object
fsck: remove redundant parse_tree() invocation

Merge branch 'rs/stat-data-unaligned-reads-fix' into... Junio C Hamano Wed, 23 Aug 2017 21:33:47 +0000 (14:33 -0700)

Merge branch 'rs/stat-data-unaligned-reads-fix' into maint

Code clean-up.

* rs/stat-data-unaligned-reads-fix:
dir: support platforms that require aligned reads

Merge branch 'rs/move-array' into maintJunio C Hamano Wed, 23 Aug 2017 21:33:46 +0000 (14:33 -0700)

Merge branch 'rs/move-array' into maint

Code clean-up.

* rs/move-array:
ls-files: don't try to prune an empty index
apply: use COPY_ARRAY and MOVE_ARRAY in update_image()
use MOVE_ARRAY
add MOVE_ARRAY

Merge branch 'rs/bswap-ubsan-fix' into maintJunio C Hamano Wed, 23 Aug 2017 21:33:46 +0000 (14:33 -0700)

Merge branch 'rs/bswap-ubsan-fix' into maint

Code clean-up.

* rs/bswap-ubsan-fix:
bswap: convert get_be16, get_be32 and put_be32 to inline functions
bswap: convert to unsigned before shifting in get_be32

Merge branch 'dl/credential-cache-socket-in-xdg-cache... Junio C Hamano Wed, 23 Aug 2017 21:33:45 +0000 (14:33 -0700)

Merge branch 'dl/credential-cache-socket-in-xdg-cache' into maint

A recently added test for the "credential-cache" helper revealed
that EOF detection done around the time the connection to the cache
daemon is torn down were flaky. This was fixed by reacting to
ECONNRESET and behaving as if we got an EOF.

* dl/credential-cache-socket-in-xdg-cache:
credential-cache: interpret an ECONNRESET as an EOF

Merge branch 'hb/gitweb-project-list' into maintJunio C Hamano Wed, 23 Aug 2017 21:33:44 +0000 (14:33 -0700)

Merge branch 'hb/gitweb-project-list' into maint

When a directory is not readable, "gitweb" fails to build the
project list. Work this around by skipping such a directory.

It might end up hiding a problem under the rug and a better
solution might be to loudly complain to the administrator pointing
out the problematic directory, but this will at least make it
"work".

* hb/gitweb-project-list:
gitweb: skip unreadable subdirectories

Merge branch 'ks/commit-abort-on-empty-message-fix... Junio C Hamano Wed, 23 Aug 2017 21:33:44 +0000 (14:33 -0700)

Merge branch 'ks/commit-abort-on-empty-message-fix' into maint

"git commit" when seeing an totally empty message said "you did not
edit the message", which is clearly wrong. The message has been
corrected.

* ks/commit-abort-on-empty-message-fix:
commit: check for empty message before the check for untouched template

Merge branch 'jk/reflog-walk' into maintJunio C Hamano Wed, 23 Aug 2017 21:33:43 +0000 (14:33 -0700)

Merge branch 'jk/reflog-walk' into maint

Numerous bugs in walking of reflogs via "log -g" and friends have
been fixed.

* jk/reflog-walk:
reflog-walk: apply --since/--until to reflog dates
reflog-walk: stop using fake parents
rev-list: check reflog_info before showing usage
get_revision_1(): replace do-while with an early return
log: do not free parents when walking reflog
log: clarify comment about reflog cycles
revision: disallow reflog walking with revs->limited
t1414: document some reflog-walk oddities

Merge branch 'jc/http-sslkey-and-ssl-cert-are-paths... Junio C Hamano Wed, 23 Aug 2017 21:33:43 +0000 (14:33 -0700)

Merge branch 'jc/http-sslkey-and-ssl-cert-are-paths' into maint

The http.{sslkey,sslCert} configuration variables are to be
interpreted as a pathname that honors "~[username]/" prefix, but
weren't, which has been fixed.

* jc/http-sslkey-and-ssl-cert-are-paths:
http.c: http.sslcert and http.sslkey are both pathnames

Merge branch 'jk/ref-filter-colors' into maintJunio C Hamano Wed, 23 Aug 2017 21:33:42 +0000 (14:33 -0700)

Merge branch 'jk/ref-filter-colors' into maint

"%C(color name)" in the pretty print format always produced ANSI
color escape codes, which was an early design mistake. They now
honor the configuration (e.g. "color.ui = never") and also tty-ness
of the output medium.

* jk/ref-filter-colors:
ref-filter: consult want_color() before emitting colors
pretty: respect color settings for %C placeholders
rev-list: pass diffopt->use_colors through to pretty-print
for-each-ref: load config earlier
color: check color.ui in git_default_config()
ref-filter: pass ref_format struct to atom parsers
ref-filter: factor out the parsing of sorting atoms
ref-filter: make parse_ref_filter_atom a private function
ref-filter: provide a function for parsing sort options
ref-filter: move need_color_reset_at_eol into ref_format
ref-filter: abstract ref format into its own struct
ref-filter: simplify automatic color reset
t: use test_decode_color rather than literal ANSI codes
docs/for-each-ref: update pointer to color syntax
check return value of verify_ref_format()

Merge branch 'js/git-gui-msgfmt-on-windows' into maintJunio C Hamano Wed, 23 Aug 2017 21:33:42 +0000 (14:33 -0700)

Merge branch 'js/git-gui-msgfmt-on-windows' into maint

Because recent Git for Windows do come with a real msgfmt, the
build procedure for git-gui has been updated to use it instead of a
hand-rolled substitute.

* js/git-gui-msgfmt-on-windows:
git-gui (MinGW): make use of MSys2's msgfmt
git gui: allow for a long recentrepo list
git gui: de-dup selected repo from recentrepo history
git gui: cope with duplicates in _get_recentrepo
git-gui: remove duplicate entries from .gitconfig's gui.recentrepo

The third batch post 2.14Junio C Hamano Wed, 23 Aug 2017 21:16:00 +0000 (14:16 -0700)

The third batch post 2.14

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'mg/format-ref-doc-fix'Junio C Hamano Wed, 23 Aug 2017 21:13:14 +0000 (14:13 -0700)

Merge branch 'mg/format-ref-doc-fix'

Doc fix.

* mg/format-ref-doc-fix:
Documentation/git-for-each-ref: clarify peeling of tags for --format
Documentation: use proper wording for ref format strings

Merge branch 'sb/submodule-parallel-update'Junio C Hamano Wed, 23 Aug 2017 21:13:14 +0000 (14:13 -0700)

Merge branch 'sb/submodule-parallel-update'

Code clean-up.

* sb/submodule-parallel-update:
submodule.sh: remove unused variable

Merge branch 'jc/diff-sane-truncate-no-more'Junio C Hamano Wed, 23 Aug 2017 21:13:13 +0000 (14:13 -0700)

Merge branch 'jc/diff-sane-truncate-no-more'

Code clean-up.

* jc/diff-sane-truncate-no-more:
diff: retire sane_truncate_fn

Merge branch 'hv/t5526-andand-chain-fix'Junio C Hamano Wed, 23 Aug 2017 21:13:13 +0000 (14:13 -0700)

Merge branch 'hv/t5526-andand-chain-fix'

Test fix.

* hv/t5526-andand-chain-fix:
t5526: fix some broken && chains

Merge branch 'as/grep-quiet-no-match-exit-code-fix'Junio C Hamano Wed, 23 Aug 2017 21:13:12 +0000 (14:13 -0700)

Merge branch 'as/grep-quiet-no-match-exit-code-fix'

"git grep -L" and "git grep --quiet -L" reported different exit
codes; this has been corrected.

* as/grep-quiet-no-match-exit-code-fix:
git-grep: correct exit code with --quiet and -L

Merge branch 'kw/commit-keep-index-when-pre-commit... Junio C Hamano Wed, 23 Aug 2017 21:13:11 +0000 (14:13 -0700)

Merge branch 'kw/commit-keep-index-when-pre-commit-is-not-run'

"git commit" used to discard the index and re-read from the filesystem
just in case the pre-commit hook has updated it in the middle; this
has been optimized out when we know we do not run the pre-commit hook.

* kw/commit-keep-index-when-pre-commit-is-not-run:
commit: skip discarding the index if there is no pre-commit hook

Merge branch 'sb/sha1-file-cleanup'Junio C Hamano Wed, 23 Aug 2017 21:13:10 +0000 (14:13 -0700)

Merge branch 'sb/sha1-file-cleanup'

Code clean-up.

* sb/sha1-file-cleanup:
sha1_file: make read_info_alternates static

Merge branch 'rs/t1002-do-not-use-sum'Junio C Hamano Wed, 23 Aug 2017 21:13:09 +0000 (14:13 -0700)

Merge branch 'rs/t1002-do-not-use-sum'

Test simplification.

* rs/t1002-do-not-use-sum:
t1002: stop using sum(1)

Merge branch 'kd/stash-with-bash-4.4'Junio C Hamano Wed, 23 Aug 2017 21:13:08 +0000 (14:13 -0700)

Merge branch 'kd/stash-with-bash-4.4'

bash 4.4 or newer gave a warning on NUL byte in command
substitution done in "git stash"; this has been squelched.

* kd/stash-with-bash-4.4:
stash: prevent warning about null bytes in input

Merge branch 'ah/doc-empty-string-is-false'Junio C Hamano Wed, 23 Aug 2017 21:13:08 +0000 (14:13 -0700)

Merge branch 'ah/doc-empty-string-is-false'

Doc update.

* ah/doc-empty-string-is-false:
doc: clarify "config --bool" behaviour with empty string

Merge branch 'kw/rebase-progress'Junio C Hamano Wed, 23 Aug 2017 21:13:07 +0000 (14:13 -0700)

Merge branch 'kw/rebase-progress'

"git rebase", especially when it is run by mistake and ends up
trying to replay many changes, spent long time in silence. The
command has been taught to show progress report when it spends
long time preparing these many changes to replay (which would give
the user a chance to abort with ^C).

* kw/rebase-progress:
rebase: turn on progress option by default for format-patch
format-patch: have progress option while generating patches

Merge branch 'ks/prepare-commit-msg-sample-fix'Junio C Hamano Wed, 23 Aug 2017 21:13:07 +0000 (14:13 -0700)

Merge branch 'ks/prepare-commit-msg-sample-fix'

An "oops" fix to a topic that is already in 'master'.

* ks/prepare-commit-msg-sample-fix:
hook: use correct logical variable

Merge branch 'nm/stash-untracked'Junio C Hamano Wed, 23 Aug 2017 21:13:07 +0000 (14:13 -0700)

Merge branch 'nm/stash-untracked'

"git stash -u" used the contents of the committed version of the
".gitignore" file to decide which paths are ignored, even when the
file has local changes. The command has been taught to instead use
the locally modified contents.

* nm/stash-untracked:
stash: clean untracked files before reset

Merge branch 'jt/sha1-file-cleanup'Junio C Hamano Wed, 23 Aug 2017 21:13:07 +0000 (14:13 -0700)

Merge branch 'jt/sha1-file-cleanup'

Preparatory code clean-up.

* jt/sha1-file-cleanup:
sha1_file: remove read_packed_sha1()
sha1_file: set whence in storage-specific info fn

treewide: correct several "up-to-date" to "up to date"Martin Ågren Wed, 23 Aug 2017 17:49:35 +0000 (19:49 +0200)

treewide: correct several "up-to-date" to "up to date"

Follow the Oxford style, which says to use "up-to-date" before the noun,
but "up to date" after it. Don't change plumbing (specifically
send-pack.c, but transport.c (git push) also has the same string).

This was produced by grepping for "up-to-date" and "up to date". It
turned out we only had to edit in one direction, removing the hyphens.

Fix a typo in Documentation/git-diff-index.txt while we're there.

Reported-by: Jeffrey Manian <jeffrey.manian@gmail.com>
Reported-by: STEVEN WHITE <stevencharleswhitevoices@gmail.com>
Signed-off-by: Martin Ågren <martin.agren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation/user-manual: update outdated example... Martin Ågren Wed, 23 Aug 2017 17:49:34 +0000 (19:49 +0200)

Documentation/user-manual: update outdated example output

Since commit f7673490 ("more terse push output", 2007-11-05), git push
has a completely different output format than the one shown in the user
manual for a non-fast-forward push.

Signed-off-by: Martin Ågren <martin.agren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

vcs-svn: move remaining repo_tree functions to fast_exp... Jonathan Nieder Wed, 23 Aug 2017 00:04:47 +0000 (17:04 -0700)

vcs-svn: move remaining repo_tree functions to fast_export.h

These used to be for manipulating the in-memory repo_tree structure,
but nowadays they are convenience wrappers to handle a few git-vs-svn
mismatches:

1. Git does not track empty directories but Subversion does. When
looking up a path in git that Subversion thinks exists and finding
nothing, we can safely assume that the path represents a
directory. This is needed when a later Subversion revision
modifies that directory.

2. Subversion allows deleting a file by copying. In Git fast-import
we have to handle that more explicitly as a deletion.

These are details of the tool's interaction with git fast-import.
Move them to fast_export.c, where other such details are handled.

This way the function names do not start with a repo_ prefix that
would clash with the repository object introduced in
v2.14.0-rc0~38^2~16 (repository: introduce the repository object,
2017-06-22) or an svn_ prefix that would clash with libsvn (in case
someone wants to link this code with libsvn some day).

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

vcs-svn: remove repo_delete wrapper functionJonathan Nieder Wed, 23 Aug 2017 00:02:15 +0000 (17:02 -0700)

vcs-svn: remove repo_delete wrapper function

Since v1.7.10-rc0~118^2~4^2~4^2~3 (vcs-svn: pass paths through to
fast-import, 2010-12-13) this is an alias for fast_export_delete.
Remove the unnecessary layer of indirection.

No functional change intended.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

vcs-svn: remove custom mode constantsJonathan Nieder Wed, 23 Aug 2017 00:01:34 +0000 (17:01 -0700)

vcs-svn: remove custom mode constants

In the rest of Git, these modes are spelled as S_IFDIR,
S_IFREG | 0644, S_IFREG | 0755, and S_IFLNK. Use the same constants
in svn-fe for simplicity and consistency.

No functional change intended.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

vcs-svn: remove more unused prototypes and declarationsJonathan Nieder Wed, 23 Aug 2017 00:00:57 +0000 (17:00 -0700)

vcs-svn: remove more unused prototypes and declarations

I forgot to remove these in v1.7.10-rc0~118^2~4^2~5^2~4 (vcs-svn:
eliminate repo_tree structure, 2010-12-10).

This finishes what was started in commit 36f63b50 (vcs-svn: remove
unused prototypes, 2017-08-21).

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Doc: clarify that pack-objects makes packs, pluralJonathan Tan Wed, 23 Aug 2017 00:40:10 +0000 (17:40 -0700)

Doc: clarify that pack-objects makes packs, plural

The documentation for pack-objects describes that it creates "a packed
archive of objects", which is confusing because it may create multiple
packs if --max-pack-size is set. Update the documentation to clarify
this, and explaining in which cases such a feature would be useful.

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

ThreadSanitizer: add suppressionsMartin Ågren Mon, 21 Aug 2017 17:43:48 +0000 (19:43 +0200)

ThreadSanitizer: add suppressions

Add a file .tsan-suppressions and list two functions in it: want_color()
and transfer_debug(). Both of these use the pattern

static int foo = -1;
if (foo < 0)
foo = bar();

where bar always returns the same non-negative value. This can cause
ThreadSanitizer to diagnose a race when foo is written from two threads.
That is indeed a race, although it arguably doesn't matter in practice
since it's always the same value that is written.

Add NEEDSWORK-comments to the functions so that this problem is not
forever swept way under the carpet.

The suppressions-file is used by setting the environment variable
TSAN_OPTIONS to, e.g., "suppressions=$(pwd)/.tsan-suppressions". Observe
that relative paths such as ".tsan-suppressions" might not work.

Signed-off-by: Martin Ågren <martin.agren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

strbuf_setlen: don't write to strbuf_slopbufMartin Ågren Mon, 21 Aug 2017 17:43:47 +0000 (19:43 +0200)

strbuf_setlen: don't write to strbuf_slopbuf

strbuf_setlen(., 0) writes '\0' to sb.buf[0], where buf is either
allocated and unique to sb, or the global slopbuf. The slopbuf is meant
to provide a guarantee that buf is not NULL and that a freshly
initialized buffer contains the empty string, but it is not supposed to
be written to. That strbuf_setlen writes to slopbuf has at least two
implications:

First, it's wrong in principle. Second, it might be hiding misuses which
are just waiting to wreak havoc. Third, ThreadSanitizer detects a race
when multiple threads write to slopbuf at roughly the same time, thus
potentially making any more critical races harder to spot.

Avoid writing to strbuf_slopbuf in strbuf_setlen. Let's instead assert
on the first byte of slopbuf being '\0', since it helps ensure the
promised invariant of buf[len] == '\0'. (We know that "len" was already
0, or someone has messed with "alloc". If someone has fiddled with the
fields that much beyond the correct interface, they're on their own.)

This is a function which is used in many places, possibly also in hot
code paths. There are two branches in strbuf_setlen already, and we are
adding a third and possibly a fourth (in the assert). In hot code paths,
we hopefully reuse the buffer in order to avoid continous reallocations.
Thus, after a start-up phase, we should always take the same path,
which might help branch prediction, and we would never make the assert.
If a hot code path continuously reallocates, we probably have bigger
performance problems than this new safety-check.

Simple measurements do not contradict this reasoning. 100000000 times
resetting a buffer and adding the empty string takes 5.29/5.26 seconds
with/without this patch (best of three). Releasing at every iteration
yields 18.01/17.87. Adding a 30-character string instead of the empty
string yields 5.61/5.58 and 17.28/17.28(!).

This patch causes the git binary emitted by gcc 5.4.0 -O2 on my machine
to grow from 11389848 bytes to 11497184 bytes, an increase of 0.9%.

I also tried to piggy-back on the fact that we already check alloc,
which should already tell us whether we are using the slopbuf:

if (sb->alloc) {
if (len > sb->alloc - 1)
die("BUG: strbuf_setlen() beyond buffer");
sb->buf[len] = '\0';
} else {
if (len)
die("BUG: strbuf_setlen() beyond buffer");
assert(!strbuf_slopbuf[0]);
}
sb->len = len;

That didn't seem to be much slower (5.38, 18.02, 5.70, 17.32 seconds),
but it does introduce some minor code duplication. The resulting git
binary was 11510528 bytes large (another 0.1% increase).

Signed-off-by: Martin Ågren <martin.agren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

refs: retry acquiring reference locks for 100msMichael Haggerty Mon, 21 Aug 2017 11:51:34 +0000 (13:51 +0200)

refs: retry acquiring reference locks for 100ms

The philosophy of reference locking has been, "if another process is
changing a reference, then whatever I'm trying to do to it will
probably fail anyway because my old-SHA-1 value is probably no longer
current". But this argument falls down if the other process has locked
the reference to do something that doesn't actually change the value
of the reference, such as `pack-refs` or `reflog expire`. There
actually *is* a decent chance that a planned reference update will
still be able to go through after the other process has released the
lock.

So when trying to lock an individual reference (e.g., when creating
"refs/heads/master.lock"), if it is already locked, then retry the
lock acquisition for approximately 100 ms before giving up. This
should eliminate some unnecessary lock conflicts without wasting a lot
of time.

Add a configuration setting, `core.filesRefLockTimeout`, to allow this
setting to be tweaked.

Note: the function `get_files_ref_lock_timeout_ms()` cannot be private
to the files backend because it is also used by `write_pseudoref()`
and `delete_pseudoref()`, which are defined in `refs.c` so that they
can be used by other reference backends.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

merge: save merge state earlierMichael J Gruber Wed, 23 Aug 2017 12:10:45 +0000 (14:10 +0200)

merge: save merge state earlier

If the `git merge` process is killed while waiting for the editor to
finish, the merge state is lost but the prepared merge msg and tree is kept.
So, a subsequent `git commit` creates a squashed merge even when the
user asked for proper merge commit originally.

Demonstrate the problem with a test crafted after the in t7502. The test
requires EXECKEEPSPID (thus does not run under MINGW).

Save the merge state earlier (in the non-squash case) so that it does
not get lost. This makes the test pass.

Reported-by: hIpPy <hippy2981@gmail.com>
Signed-off-by: Michael J Gruber <git@grubix.eu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

merge: split write_merge_state in twoMichael J Gruber Wed, 23 Aug 2017 12:10:44 +0000 (14:10 +0200)

merge: split write_merge_state in two

write_merge_state() writes out the merge heads, mode, and msg. But we
may want to write out heads, mode without the msg. So, split out heads
(+mode) into a separate function write_merge_heads() that is called by
write_merge_state().

No funtional change so far, except when these non-atomic writes are
interrupted: we write heads-mode-msg now when we used to write
heads-msg-mode.

Signed-off-by: Michael J Gruber <git@grubix.eu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

merge: clarify call chainMichael J Gruber Wed, 23 Aug 2017 12:10:43 +0000 (14:10 +0200)

merge: clarify call chain

prepare_to_commit() cannot be reached in the non-squash case:
It is called by merge_trivial() and finish_automerge() only, but the
calls to the latter are somewhat hard to track:

If option_commit is not set, the code in cmd_merge() uses a fake
conflict return code (ret=1) to avoid writing the tree, which also
avoids setting automerge_was_ok (just as in the proper ret==1 case), so
that finish_automerge() is not called.

To ensure that no code change breaks that assumption, safe-guard
prepare_to_commit() by a BUG() statement.

Suggested-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Michael J Gruber <git@grubix.eu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

pack-objects: take lock before accessing `remaining`Martin Ågren Mon, 21 Aug 2017 17:43:46 +0000 (19:43 +0200)

pack-objects: take lock before accessing `remaining`

When checking the conditional of "while (me->remaining)", we did not
hold the lock. Calling find_deltas would still be safe, since it checks
"remaining" (after taking the lock) and is able to handle all values. In
fact, this could (currently) not trigger any bug: a bug could happen if
`remaining` transitioning from zero to non-zero races with the evaluation
of the while-condition, but these are always separated by the
data_ready-mechanism.

Make sure we have the lock when we read `remaining`. This does mean we
release it just so that find_deltas can take it immediately again. We
could tweak the contract so that the lock should be taken before calling
find_deltas, but let's defer that until someone can actually show that
"unlock+lock" has a measurable negative impact.

Signed-off-by: Martin Ågren <martin.agren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

convert: always initialize attr_action in convert_attrsMartin Ågren Mon, 21 Aug 2017 17:43:45 +0000 (19:43 +0200)

convert: always initialize attr_action in convert_attrs

convert_attrs contains an "if-else". In the "if", we set attr_action
twice, and the first assignment has no effect. In the "else", we do not
set it at all. Since git_check_attr always returns the same value, we'll
always end up in the "if", so there is no problem right now. But
convert_attrs is obviously trying not to rely on such an
implementation-detail of another component.

Make the initialization of attr_action after the if-else. Remove the
earlier assignments.

Suggested-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Martin Ågren <martin.agren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

rerere: allow approxidate in gc.rerereResolved/gc.rerer... Junio C Hamano Sat, 19 Aug 2017 18:43:39 +0000 (11:43 -0700)

rerere: allow approxidate in gc.rerereResolved/gc.rerereUnresolved

These two configuration variables are described in the documentation
to take an expiry period expressed in the number of days:

gc.rerereResolved::
Records of conflicted merge you resolved earlier are
kept for this many days when 'git rerere gc' is run.
The default is 60 days.

gc.rerereUnresolved::
Records of conflicted merge you have not resolved are
kept for this many days when 'git rerere gc' is run.
The default is 15 days.

There is no strong reason not to allow a more general "approxidate"
expiry specification, e.g. "5.days.ago", or "never".

Rename the config_get_expiry() helper introduced in the previous
step to git_config_get_expiry_in_days() and move it to a more
generic place, config.c, and use date.c::parse_expiry_date() to do
so. Give it an ability to allow the caller to tell among three
cases (i.e. there is no "gc.rerereResolved" config, there is and it
is correctly parsed into the *expiry variable, and there was an
error in parsing the given value). The current caller can work
correctly without using the return value, though.

In the future, we may find other variables that only allow an
integer that specifies "this many days" or other unit of time, and
when it happens we may need to drop "_days" suffix from the name of
the function and instead pass the "scale" value as another parameter.

But this will do for now.

Signed-off-by: Junio C Hamano <gitster@pobox.com>

rerere: represent time duration in timestamp_t internallyJunio C Hamano Sat, 19 Aug 2017 18:16:01 +0000 (11:16 -0700)

rerere: represent time duration in timestamp_t internally

The two configuration variables, gc.rerereResolved and
gc.rerereUnresolved, are measured in days and are passed as such
into the prune_one() helper function, which worked in time_t to see
if an entry in the rerere database is past its expiry.

Instead, have the caller turn the number of days into the expiry
timestamp. Further, use timestamp_t instead of time_t. This will
make it possible to extend the way the configuration variable is
spelled by using date.c::parse_expiry_date() that gives the expiry
timestamp in timestamp_t.

Signed-off-by: Junio C Hamano <gitster@pobox.com>

t4200: parameterize "rerere gc" custom expiry testJunio C Hamano Tue, 22 Aug 2017 21:25:09 +0000 (14:25 -0700)

t4200: parameterize "rerere gc" custom expiry test

The test creates a rerere database entry that is two days old, and
tries to expire with three different custom expiry configuration
(keep ones less than 5 days old, keep ones used less than 5 days
ago, and expire everything right now).

We'll be introducing a different way to spell the same "5 days" and
"right now" parameter in a later step; parameterize the test to make
it easier to test the new spelling when it happens.

Signed-off-by: Junio C Hamano <gitster@pobox.com>

t4200: gather "rerere gc" togetherJunio C Hamano Tue, 22 Aug 2017 21:20:24 +0000 (14:20 -0700)

t4200: gather "rerere gc" together

Move the "rerere gc with custom expiry" test up, so that it is close
to the existing basic "rerere gc" tests.

Signed-off-by: Junio C Hamano <gitster@pobox.com>

t4200: make "rerere gc" test more robustJunio C Hamano Tue, 22 Aug 2017 21:14:03 +0000 (14:14 -0700)

t4200: make "rerere gc" test more robust

The test blindly trusted that there may be _some_ entries left in
the rerere database, and used them by updating their timestamps to
see if the gc threshold variables are honoured correctly. This
won't work if there is no entry in the database when the test
begins.

Instead, clear the rerere database, and populate it with a few known
entries (which are bogus, but for the purpose of testing "garbage
collection", it does not matter---we want to make sure we collect
old cruft, even if the files are corrupt rerere database entries),
and use them for the expiry test.

Signed-off-by: Junio C Hamano <gitster@pobox.com>

t4200: give us a clean slate after "rerere gc" testsJunio C Hamano Tue, 22 Aug 2017 20:49:02 +0000 (13:49 -0700)

t4200: give us a clean slate after "rerere gc" tests

The "multiple identical conflicts" test counts the number of entries
in the rerere database after trying a handful of mergy operations
and recording their resolutions, but without initializing the rerere
database to a known state, allowing the state left by previous tests
to trigger a false failure. Make it robust by cleaning the database
before it starts.

Signed-off-by: Junio C Hamano <gitster@pobox.com>

gitweb: add 'raw' blob_plain link in history overviewJob Snijders Tue, 22 Aug 2017 20:07:29 +0000 (22:07 +0200)

gitweb: add 'raw' blob_plain link in history overview

For people that work with very large plain text files it may be easier
if one can bypass viewing the htmlized blob and instead click directly
to the raw file (rather then click through 'blob' and then to 'raw').

Signed-off-by: Job Snijders <job@instituut.net>
Reviewed-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

The second batch post 2.14Junio C Hamano Tue, 22 Aug 2017 17:33:58 +0000 (10:33 -0700)

The second batch post 2.14

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'mh/packed-ref-store'Junio C Hamano Tue, 22 Aug 2017 17:29:16 +0000 (10:29 -0700)

Merge branch 'mh/packed-ref-store'

The "ref-store" code reorganization continues.

* mh/packed-ref-store: (32 commits)
files-backend: cheapen refname_available check when locking refs
packed_ref_store: handle a packed-refs file that is a symlink
read_packed_refs(): die if `packed-refs` contains bogus data
t3210: add some tests of bogus packed-refs file contents
repack_without_refs(): don't lock or unlock the packed refs
commit_packed_refs(): remove call to `packed_refs_unlock()`
clear_packed_ref_cache(): don't protest if the lock is held
packed_refs_unlock(), packed_refs_is_locked(): new functions
packed_refs_lock(): report errors via a `struct strbuf *err`
packed_refs_lock(): function renamed from lock_packed_refs()
commit_packed_refs(): use a staging file separate from the lockfile
commit_packed_refs(): report errors rather than dying
packed_ref_store: make class into a subclass of `ref_store`
packed-backend: new module for handling packed references
packed_read_raw_ref(): new function, replacing `resolve_packed_ref()`
packed_ref_store: support iteration
packed_peel_ref(): new function, extracted from `files_peel_ref()`
repack_without_refs(): take a `packed_ref_store *` parameter
get_packed_ref(): take a `packed_ref_store *` parameter
rollback_packed_refs(): take a `packed_ref_store *` parameter
...

Merge branch 'sb/retire-t1200'Junio C Hamano Tue, 22 Aug 2017 17:29:16 +0000 (10:29 -0700)

Merge branch 'sb/retire-t1200'

A test script that outlived its usefulness has been removed.

* sb/retire-t1200:
t1200: remove t1200-tutorial.sh

Merge branch 'rs/win32-syslog-leakfix'Junio C Hamano Tue, 22 Aug 2017 17:29:16 +0000 (10:29 -0700)

Merge branch 'rs/win32-syslog-leakfix'

Memory leak in an error codepath has been plugged.

* rs/win32-syslog-leakfix:
win32: plug memory leak on realloc() failure in syslog()

Merge branch 'rs/unpack-entry-leakfix'Junio C Hamano Tue, 22 Aug 2017 17:29:15 +0000 (10:29 -0700)

Merge branch 'rs/unpack-entry-leakfix'

Memory leak in an error codepath has been plugged.

* rs/unpack-entry-leakfix:
sha1_file: release delta_stack on error in unpack_entry()

Merge branch 'rs/strbuf-getwholeline-fix'Junio C Hamano Tue, 22 Aug 2017 17:29:15 +0000 (10:29 -0700)

Merge branch 'rs/strbuf-getwholeline-fix'

A helper function to read a single whole line into strbuf
mistakenly triggered OOM error at EOF under certain conditions,
which has been fixed.

* rs/strbuf-getwholeline-fix:
strbuf: clear errno before calling getdelim(3)

Merge branch 'rs/merge-microcleanup'Junio C Hamano Tue, 22 Aug 2017 17:29:14 +0000 (10:29 -0700)

Merge branch 'rs/merge-microcleanup'

Code clean-up.

* rs/merge-microcleanup:
merge: use skip_prefix()

Merge branch 'rs/fsck-obj-leakfix'Junio C Hamano Tue, 22 Aug 2017 17:29:13 +0000 (10:29 -0700)

Merge branch 'rs/fsck-obj-leakfix'

Memory leak in an error codepath has been plugged.

* rs/fsck-obj-leakfix:
fsck: free buffers on error in fsck_obj()

Merge branch 'rs/t4062-obsd'Junio C Hamano Tue, 22 Aug 2017 17:29:13 +0000 (10:29 -0700)

Merge branch 'rs/t4062-obsd'

Test portability fix.

* rs/t4062-obsd:
t4062: use less than 256 repetitions in regex

Merge branch 'rs/find-pack-entry-bisection'Junio C Hamano Tue, 22 Aug 2017 17:29:11 +0000 (10:29 -0700)

Merge branch 'rs/find-pack-entry-bisection'

Code clean-up.

* rs/find-pack-entry-bisection:
sha1_file: avoid comparison if no packed hash matches the first byte

Merge branch 'rs/apply-lose-prefix-length'Junio C Hamano Tue, 22 Aug 2017 17:29:10 +0000 (10:29 -0700)

Merge branch 'rs/apply-lose-prefix-length'

Code clean-up.

* rs/apply-lose-prefix-length:
apply: remove prefix_length member from apply_state

Merge branch 'rj/add-chmod-error-message'Junio C Hamano Tue, 22 Aug 2017 17:29:10 +0000 (10:29 -0700)

Merge branch 'rj/add-chmod-error-message'

Message fix.

* rj/add-chmod-error-message:
builtin/add: add detail to a 'cannot chmod' error message

Merge branch 'jk/hashcmp-memcmp'Junio C Hamano Tue, 22 Aug 2017 17:29:09 +0000 (10:29 -0700)

Merge branch 'jk/hashcmp-memcmp'

Code clean-up.

* jk/hashcmp-memcmp:
hashcmp: use memcmp instead of open-coded loop

Merge branch 'jk/drop-sha1-entry-pos'Junio C Hamano Tue, 22 Aug 2017 17:29:08 +0000 (10:29 -0700)

Merge branch 'jk/drop-sha1-entry-pos'

Code clean-up.

* jk/drop-sha1-entry-pos:
sha1_file: drop experimental GIT_USE_LOOKUP search

Merge branch 'ur/svn-local-zone'Junio C Hamano Tue, 22 Aug 2017 17:29:07 +0000 (10:29 -0700)

Merge branch 'ur/svn-local-zone'

"git svn" used with "--localtime" option did not compute the tz
offset for the timestamp in question and instead always used the
current time, which has been corrected.

* ur/svn-local-zone:
git svn fetch: Create correct commit timestamp when using --localtime

Merge branch 'pw/am-signoff'Junio C Hamano Tue, 22 Aug 2017 17:29:07 +0000 (10:29 -0700)

Merge branch 'pw/am-signoff'

"git am -s" has been taught that some input may end with a trailer
block that is not Signed-off-by: and it should refrain from adding
an extra blank line before adding a new sign-off in such a case.

* pw/am-signoff:
am: fix signoff when other trailers are present

Merge branch 'rs/t3700-clean-leftover'Junio C Hamano Tue, 22 Aug 2017 17:29:07 +0000 (10:29 -0700)

Merge branch 'rs/t3700-clean-leftover'

A test fix.

* rs/t3700-clean-leftover:
t3700: fix broken test under !POSIXPERM

Merge branch 'jc/perl-git-comment-typofix'Junio C Hamano Tue, 22 Aug 2017 17:29:06 +0000 (10:29 -0700)

Merge branch 'jc/perl-git-comment-typofix'

A comment fix.

* jc/perl-git-comment-typofix:
perl/Git.pm: typofix in a comment

Merge branch 'rs/in-obsd-basename-dirname-take-const'Junio C Hamano Tue, 22 Aug 2017 17:29:05 +0000 (10:29 -0700)

Merge branch 'rs/in-obsd-basename-dirname-take-const'

Portability fix.

* rs/in-obsd-basename-dirname-take-const:
test-path-utils: handle const parameter of basename and dirname

Merge branch 'rs/obsd-getcwd-workaround'Junio C Hamano Tue, 22 Aug 2017 17:29:04 +0000 (10:29 -0700)

Merge branch 'rs/obsd-getcwd-workaround'

Test portability fix for BSDs.

* rs/obsd-getcwd-workaround:
t0001: skip test with restrictive permissions if getpwd(3) respects them

Merge branch 'mf/no-dashed-subcommands'Junio C Hamano Tue, 22 Aug 2017 17:29:03 +0000 (10:29 -0700)

Merge branch 'mf/no-dashed-subcommands'

Code clean-up.

* mf/no-dashed-subcommands:
scripts: use "git foo" not "git-foo"

Merge branch 'ma/parse-maybe-bool'Junio C Hamano Tue, 22 Aug 2017 17:29:03 +0000 (10:29 -0700)

Merge branch 'ma/parse-maybe-bool'

Code clean-up.

* ma/parse-maybe-bool:
parse_decoration_style: drop unused argument `var`
treewide: deprecate git_config_maybe_bool, use git_parse_maybe_bool
config: make git_{config,parse}_maybe_bool equivalent
config: introduce git_parse_maybe_bool_text
t5334: document that git push --signed=1 does not work
Doc/git-{push,send-pack}: correct --sign= to --signed=

Merge branch 'ab/ref-filter-no-contains'Junio C Hamano Tue, 22 Aug 2017 17:29:02 +0000 (10:29 -0700)

Merge branch 'ab/ref-filter-no-contains'

A test fix.

* ab/ref-filter-no-contains:
tests: don't give unportable ">" to "test" built-in, use -gt

Merge branch 'bw/clone-recursive-quiet'Junio C Hamano Tue, 22 Aug 2017 17:29:01 +0000 (10:29 -0700)

Merge branch 'bw/clone-recursive-quiet'

"git clone --recurse-submodules --quiet" did not pass the quiet
option down to submodules.

* bw/clone-recursive-quiet:
clone: teach recursive clones to respect -q

Merge branch 'bw/grep-recurse-submodules'Junio C Hamano Tue, 22 Aug 2017 17:29:01 +0000 (10:29 -0700)

Merge branch 'bw/grep-recurse-submodules'

"git grep --recurse-submodules" has been reworked to give a more
consistent output across submodule boundary (and do its thing
without having to fork a separate process).

* bw/grep-recurse-submodules:
grep: recurse in-process using 'struct repository'
submodule: merge repo_read_gitmodules and gitmodules_config
submodule: check for unmerged .gitmodules outside of config parsing
submodule: check for unstaged .gitmodules outside of config parsing
submodule: remove fetch.recursesubmodules from submodule-config parsing
submodule: remove submodule.fetchjobs from submodule-config parsing
config: add config_from_gitmodules
cache.h: add GITMODULES_FILE macro
repository: have the_repository use the_index
repo_read_index: don't discard the index