summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2017-08-02Merge branch 'bc/object-id' into bw/submodule-config-cleanupLibravatar Junio C Hamano45-374/+366
* bc/object-id: sha1_name: convert uses of 40 to GIT_SHA1_HEXSZ sha1_name: convert GET_SHA1* flags to GET_OID* sha1_name: convert get_sha1* to get_oid* Convert remaining callers of get_sha1 to get_oid. builtin/unpack-file: convert to struct object_id bisect: convert bisect_checkout to struct object_id builtin/update_ref: convert to struct object_id sequencer: convert to struct object_id remote: convert struct push_cas to struct object_id submodule: convert submodule config lookup to use object_id builtin/merge-tree: convert remaining caller of get_sha1 to object_id builtin/fsck: convert remaining caller of get_sha1 to object_id tag: convert gpg_verify_tag to use struct object_id commit: convert lookup_commit_graft to struct object_id
2017-08-02Merge branch 'bw/grep-recurse-submodules' into bw/submodule-config-cleanupLibravatar Junio C Hamano20-449/+246
* 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
2017-08-02grep: recurse in-process using 'struct repository'Libravatar Brandon Williams7-344/+88
Convert grep to use 'struct repository' which enables recursing into submodules to be handled in-process. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-08-02submodule: merge repo_read_gitmodules and gitmodules_configLibravatar Brandon Williams1-20/+17
Since 69aba5329 (submodule: add repo_read_gitmodules) there have been two ways to load a repository's .gitmodules file: 'repo_read_gitmodules()' is used if you have a repository object you are working with or 'gitmodules_config()' if you are implicitly working with 'the_repository'. Merge the logic of these two functions to remove duplicate code. In addition, 'repo_read_gitmodules()' can segfault by passing in a NULL pointer to 'git_config_from_file()' if a repository doesn't have a worktree. Instead check for the existence of a worktree before attempting to load the .gitmodules file. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-08-02submodule: check for unmerged .gitmodules outside of config parsingLibravatar Brandon Williams2-24/+24
Add 'is_gitmodules_unmerged()' function which can be used to determine in the '.gitmodules' file is unmerged based on the passed in index instead of relying on a global variable which is set during the submodule-config parsing. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-08-02submodule: check for unstaged .gitmodules outside of config parsingLibravatar Brandon Williams4-18/+20
Teach 'is_staging_gitmodules_ok()' to be able to determine in the '.gitmodules' file has unstaged changes based on the passed in index instead of relying on a global variable which is set during the submodule-config parsing. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-08-02submodule: remove fetch.recursesubmodules from submodule-config parsingLibravatar Brandon Williams3-15/+14
Remove the 'fetch.recursesubmodules' configuration option from the general submodule-config parsing and instead rely on using 'config_from_gitmodules()' in order to maintain backwards compatibility with this config being placed in the '.gitmodules' file. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-08-02submodule: remove submodule.fetchjobs from submodule-config parsingLibravatar Brandon Williams6-21/+40
The '.gitmodules' file should only contain information pertinent to configuring individual submodules (name to path mapping, URL where to obtain the submodule, etc.) while other configuration like the number of jobs to use when fetching submodules should be a part of the repository's config. Remove the 'submodule.fetchjobs' configuration option from the general submodule-config parsing and instead rely on using the 'config_from_gitmodules()' in order to maintain backwards compatibility with this config being placed in the '.gitmodules' file. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-08-02config: add config_from_gitmodulesLibravatar Brandon Williams2-0/+27
Add 'config_from_gitmodules()' function which can be used by 'fetch' and 'update_clone' in order to maintain backwards compatibility with configuration being stored in .gitmodules' since a future patch will remove reading these values in the submodule-config. This function should not be used anywhere other than in 'fetch' and 'update_clone'. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-08-02cache.h: add GITMODULES_FILE macroLibravatar Brandon Williams3-11/+12
Add a macro to be used when specifying the '.gitmodules' file and convert any existing hard coded '.gitmodules' file strings to use the new macro. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-07-24Git 2.14-rc1Libravatar Junio C Hamano1-1/+1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-07-24Merge https://github.com/git-l10n/git-poLibravatar Junio C Hamano7-18800/+20664
* https://github.com/git-l10n/git-po: l10n: git.pot: v2.14.0 round 2 (9 new, 2 removed) l10n: sv.po: Update Swedish translation (3206t0f0u) l10n: ko.po: Update Korean translation l10n: Update Catalan translation l10n: bg.po: Updated Bulgarian translation (3206t) l10n: vi.po(3206t): Update Vietnamese translation l10n: git.pot: v2.14.0 round 1 (34 new, 23 removed) l10n: ru.po: update Russian translation l10n: Fixes to Catalan translation
2017-07-24l10n: git.pot: v2.14.0 round 2 (9 new, 2 removed)Libravatar Jiang Xin1-10/+60
Generate po/git.pot from v2.14.0-rc0-40-g5eada8987e for git v2.14.0 l10n round 2. Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2017-07-24Merge branch 'master' of git://github.com/git-l10n/git-poLibravatar Jiang Xin7-18830/+20644
* 'master' of git://github.com/git-l10n/git-po: l10n: sv.po: Update Swedish translation (3206t0f0u) l10n: ko.po: Update Korean translation l10n: Update Catalan translation l10n: bg.po: Updated Bulgarian translation (3206t) l10n: vi.po(3206t): Update Vietnamese translation l10n: git.pot: v2.14.0 round 1 (34 new, 23 removed) l10n: ru.po: update Russian translation l10n: Fixes to Catalan translation
2017-07-22Merge branch 'master' of git://github.com/nafmo/git-l10n-svLibravatar Jiang Xin1-3103/+3271
* 'master' of git://github.com/nafmo/git-l10n-sv: l10n: sv.po: Update Swedish translation (3206t0f0u)
2017-07-21Sync with maintLibravatar Junio C Hamano1-0/+10
* maint: fixes from 'master' for 2.13.4
2017-07-21fixes from 'master' for 2.13.4Libravatar Junio C Hamano2-1/+11
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-07-21Merge branch 'ew/fd-cloexec-fix' into maintLibravatar Junio C Hamano1-3/+3
Portability/fallback fix. * ew/fd-cloexec-fix: set FD_CLOEXEC properly when O_CLOEXEC is not supported
2017-07-21Merge branch 'ks/fix-rebase-doc-picture' into maintLibravatar Junio C Hamano1-1/+1
Doc update. * ks/fix-rebase-doc-picture: doc: correct a mistake in an illustration
2017-07-21Merge branch 'js/alias-case-sensitivity' into maintLibravatar Junio C Hamano2-1/+8
A recent update broke an alias that contained an uppercase letter. * js/alias-case-sensitivity: alias: compare alias name *case-insensitively* t1300: demonstrate that CamelCased aliases regressed
2017-07-21Merge branch 'bb/unicode-10.0' into maintLibravatar Junio C Hamano1-13/+29
Update the character width tables. * bb/unicode-10.0: unicode: update the width tables to Unicode 10
2017-07-21Hopefully the final last-minute fix before -rc1Libravatar Junio C Hamano1-1/+11
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-07-21Merge branch 'ks/doc-fixes'Libravatar Junio C Hamano2-10/+11
Doc clean-up. * ks/doc-fixes: doc: reformat the paragraph containing the 'cut-line' doc: camelCase the i18n config variables to improve readability
2017-07-21Merge branch 'rj/cygwin-fread-reads-directories'Libravatar Junio C Hamano1-0/+1
It turns out that Cygwin also needs the fopen() wrapper that returns failure when a directory is opened for reading. * rj/cygwin-fread-reads-directories: config.mak.uname: set FREAD_READS_DIRECTORIES for cygwin
2017-07-21Merge branch 'jc/po-pritime-fix'Libravatar Junio C Hamano1-0/+21
We started using "%" PRItime, imitating "%" PRIuMAX and friends, as a way to format the internal timestamp value, but this does not play well with gettext(1) i18n framework, and causes "make pot" that is run by the l10n coordinator to create a broken po/git.pot file. This is a possible workaround for that problem. * jc/po-pritime-fix: Makefile: help gettext tools to cope with our custom PRItime format
2017-07-21config.mak.uname: set FREAD_READS_DIRECTORIES for cygwinLibravatar Ramsay Jones1-0/+1
Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-07-20A few more topics while waiting for the po/PRItime resolutionLibravatar Junio C Hamano1-0/+12
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-07-20Merge branch 'mt/p4-parse-G-output'Libravatar Junio C Hamano2-31/+166
Use "p4 -G" to make "p4 changes" output more Python-friendly to parse. * mt/p4-parse-G-output: git-p4: filter for {'code':'info'} in p4CmdList git-p4: parse marshal output "p4 -G" in p4 changes git-p4: git-p4 tests with p4 triggers
2017-07-20Merge branch 'ew/fd-cloexec-fix'Libravatar Junio C Hamano1-3/+3
Portability/fallback fix. * ew/fd-cloexec-fix: set FD_CLOEXEC properly when O_CLOEXEC is not supported
2017-07-20Merge branch 'jk/build-with-asan'Libravatar Junio C Hamano1-1/+6
A recent update made it easier to use "-fsanitize=" option while compiling but supported only one sanitize option. Allow more than one to be combined, joined with a comma, like "make SANITIZE=foo,bar". * jk/build-with-asan: Makefile: allow combining UBSan with other sanitizers
2017-07-20Merge branch 'jk/test-copy-bytes-fix'Libravatar Junio C Hamano1-0/+1
A test fix. * jk/test-copy-bytes-fix: t: handle EOF in test_copy_bytes()
2017-07-20Merge branch 'js/alias-case-sensitivity'Libravatar Junio C Hamano2-1/+8
A recent update broke an alias that contained an uppercase letter. * js/alias-case-sensitivity: alias: compare alias name *case-insensitively* t1300: demonstrate that CamelCased aliases regressed
2017-07-20l10n: sv.po: Update Swedish translation (3206t0f0u)Libravatar Peter Krefting1-3103/+3271
Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
2017-07-20RelNotes: mention "sha1dc: optionally use sha1collisiondetection as a submodule"Libravatar Ævar Arnfjörð Bjarmason1-0/+5
To note that merely cloning git.git without --recurse-submodules doesn't get you a full copy of the code anymore. See 5f6482d642 ("RelNotes: mention "log: make --regexp-ignore-case work with --perl-regexp"", 2017-07-20). Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-07-20RelNotes: mention "log: make --regexp-ignore-case work with --perl-regexp"Libravatar Ævar Arnfjörð Bjarmason1-0/+3
To inform users that they can use --regexp-ignore-case now, and that existing scripts which relied on that + PCRE may be buggy. See 9e3cbc59d5 ("log: make --regexp-ignore-case work with --perl-regexp", 2017-05-20). Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-07-20RelNotes: mention "log: add -P as a synonym for --perl-regexp"Libravatar Ævar Arnfjörð Bjarmason1-0/+2
To inform users that they can use the short form now. See 7531a2dd87 ("log: add -P as a synonym for --perl-regexp", 2017-05-25). Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-07-20Makefile: help gettext tools to cope with our custom PRItime formatLibravatar Junio C Hamano1-0/+21
We started using our own timestamp_t type and PRItime format specifier to go along with it, so that we can later change the underlying type and output format more easily, but this does not play well with gettext tools. Because gettext tools need to keep the *.po file portable across platforms, they have to special-case the format specifiers like PRIuMAX that are known types in inttypes.h, instead of letting CPP handle strings like "%" PRIuMAX " seconds ago" as an ordinary string concatenation. They fundamentally cannot do the same for our own custom type/format. Given that po/git.pot needs to be generated only once every release and by only one person, i.e. the l10n coordinator, let's update the Makefile rule to generate po/git.pot so that gettext tools are run on a munged set of sources in which all mentions of PRItime are replaced with PRIuMAX, which is what we happen to use right now. This way, developers do not have to care that PRItime does not play well with gettext, and translators do not have to care that we use our own PRItime. The credit for the idea to munge the source files goes to Dscho. Possible bugs are mine. Helped-by: Jiang Xin <worldhello.net@gmail.com> Helped-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-07-19l10n: ko.po: Update Korean translationLibravatar Changwoo Ryu1-3228/+3585
Signed-off-by: Changwoo Ryu <cwryu@debian.org>
2017-07-18doc: reformat the paragraph containing the 'cut-line'Libravatar Kaartic Sivaraam1-5/+6
The paragraph that describes the 'scissors' cleanup mode of 'commit' had the 'cut-line' in the middle of a sentence. This made it possible for the line to get wrapped on smaler windows. This shouldn't be the case as it makes it hard for the user to understand the structure of the cut-line. Reformat the pragraph to make the 'cut-line' stand on a line of it's own thus distinguishing it from the rest of the paragraph. This further prevents it from getting wrapped to some extent. Signed-off-by: Kaartic Sivaraam <kaarticsivaraam91196@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-07-18repository: have the_repository use the_indexLibravatar Brandon Williams1-1/+3
Have the index state which is stored in 'the_repository' be a pointer to the in-core index 'the_index'. This makes it easier to begin transitioning more parts of the code base to operate on a 'struct repository'. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-07-18repo_read_index: don't discard the indexLibravatar Brandon Williams2-2/+8
Have 'repo_read_index()' behave more like the other read_index family of functions and don't discard the index if it has already been populated and instead rely on the quick return of read_index_from which has: /* istate->initialized covers both .git/index and .git/sharedindex.xxx */ if (istate->initialized) return istate->cache_nr; Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-07-18A few more topics before 2.14-rc1Libravatar Junio C Hamano1-19/+45
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-07-18Merge branch 'jk/gc-pre-detach-under-hook'Libravatar Junio C Hamano2-0/+25
We run an early part of "git gc" that deals with refs before daemonising (and not under lock) even when running a background auto-gc, which caused multiple gc processes attempting to run the early part at the same time. This is now prevented by running the early part also under the GC lock. * jk/gc-pre-detach-under-hook: gc: run pre-detach operations under lock
2017-07-18Merge branch 'jn/hooks-pre-rebase-sample-fix'Libravatar Junio C Hamano1-3/+3
Code clean-up, that makes us in sync with Debian by one patch. * jn/hooks-pre-rebase-sample-fix: pre-rebase hook: capture documentation in a <<here document
2017-07-18Merge branch 'rs/progress-overall-throughput-at-the-end'Libravatar Junio C Hamano1-2/+6
The progress meter did not give a useful output when we haven't had 0.5 seconds to measure the throughput during the interval. Instead show the overall throughput rate at the end, which is a much more useful number. * rs/progress-overall-throughput-at-the-end: progress: show overall rate in last update
2017-07-18Merge branch 'tb/push-to-cygwin-unc-path'Libravatar Junio C Hamano5-0/+27
On Cygwin, similar to Windows, "git push //server/share/repository" ought to mean a repository on a network share that can be accessed locally, but this did not work correctly due to stripping the double slashes at the beginning. This may need to be heavily tested before it gets unleashed to the wild, as the change is at a fairly low-level code and would affect not just the code to decide if the push destination is local. There may be unexpected fallouts in the path normalization. * tb/push-to-cygwin-unc-path: cygwin: allow pushing to UNC paths
2017-07-18l10n: Update Catalan translationLibravatar Jordi Mas1-1071/+602
Signed-off-by: Jordi Mas <jmas@softcatala.org>
2017-07-17doc: camelCase the i18n config variables to improve readabilityLibravatar Kaartic Sivaraam1-5/+5
The i18n config variable used weren't readable as they were in the crude form of how git stores/uses it's config variables. Improve it's readability by replacing them with camelCased versions of config variables as it doesn't have any impact on it's usage. Signed-off-by: Kaartic Sivaraam <kaarticsivaraam91196@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-07-17t: handle EOF in test_copy_bytes()Libravatar Jeff King1-0/+1
The test_copy_bytes() function claims to read up to N bytes, or until it gets EOF. But we never handle EOF in our loop, and a short input will cause perl to go into an infinite loop of read() getting zero bytes. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-07-17set FD_CLOEXEC properly when O_CLOEXEC is not supportedLibravatar Eric Wong1-3/+3
FD_CLOEXEC only applies to the file descriptor, so it needs to be manipuluated via F_GETFD/F_SETFD. F_GETFL/F_SETFL are for file description flags. Verified via strace with o_cloexec set to zero. Signed-off-by: Eric Wong <e@80x24.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>