summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2017-07-20object: remove "used" field from struct objectLibravatar Jonathan Tan3-12/+15
The "used" field in struct object is only used by builtin/fsck. Remove that field and modify builtin/fsck to use a flag instead. Signed-off-by: Jonathan Tan <jonathantanmy@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-07-20fsck: remove redundant parse_tree() invocationLibravatar Jonathan Tan1-12/+1
If obj->type == OBJ_TREE, an invocation of fsck_walk() will invoke parse_tree() and return quickly if that returns nonzero, so it is of no use for traverse_one_object() to invoke parse_tree() in this situation before invoking fsck_walk(). Remove that code. The behavior of traverse_one_object() is changed slightly in that it now returns -1 instead of 1 in the case that parse_tree() fails, but this is not an issue because its only caller (traverse_reachable) does not care about the value as long as it is nonzero. This code was introduced in commit 271b8d2 ("builtin-fsck: move away from object-refs to fsck_walk", 2008-02-25). The same issue existed in that commit. Signed-off-by: Jonathan Tan <jonathantanmy@google.com> Reviewed-by: Jonathan Nieder <jrnieder@gmail.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-13Git 2.14-rc0Libravatar Junio C Hamano2-5/+13
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-07-13Merge branch 'jk/build-with-asan'Libravatar Junio C Hamano2-3/+16
The build procedure has been improved to allow building and testing Git with address sanitizer more easily. * jk/build-with-asan: Makefile: disable unaligned loads with UBSan Makefile: turn off -fomit-frame-pointer with sanitizers Makefile: add helper for compiling with -fsanitize test-lib: turn on ASan abort_on_error by default test-lib: set ASAN_OPTIONS variable before we run git
2017-07-13Merge branch 'sb/pull-rebase-submodule'Libravatar Junio C Hamano8-41/+193
"git pull --rebase --recurse-submodules" learns to rebase the branch in the submodules to an updated base. * sb/pull-rebase-submodule: builtin/fetch cleanup: always set default value for submodule recursing pull: optionally rebase submodules (remote submodule changes only) builtin/fetch: parse recurse-submodules-default at default options parsing builtin/fetch: factor submodule recurse parsing out to submodule config
2017-07-13Merge branch 'sb/hashmap-customize-comparison'Libravatar Junio C Hamano20-409/+431
Update the hashmap API so that data to customize the behaviour of the comparison function can be specified at the time a hashmap is initialized. * sb/hashmap-customize-comparison: hashmap: migrate documentation from Documentation/technical into header patch-ids.c: use hashmap correctly hashmap.h: compare function has access to a data field
2017-07-13Merge branch 'ab/grep-lose-opt-regflags'Libravatar Junio C Hamano4-32/+35
Code cleanup. * ab/grep-lose-opt-regflags: grep: remove redundant REG_NEWLINE when compiling fixed regex grep: remove regflags from the public grep_opt API grep: remove redundant and verbose re-assignments to 0 grep: remove redundant "fixed" field re-assignment to 0 grep: adjust a redundant grep pattern type assignment grep: remove redundant double assignment to 0
2017-07-12Sync with v2.13.3Libravatar Junio C Hamano1-0/+9
2017-07-12Git 2.13.3Libravatar Junio C Hamano2-1/+10
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-07-12Merge branch 'kn/ref-filter-branch-list' into maintLibravatar Junio C Hamano3-7/+54
The rewrite of "git branch --list" using for-each-ref's internals that happened in v2.13 regressed its handling of color.branch.local; this has been fixed. * kn/ref-filter-branch-list: ref-filter.c: drop return from void function branch: set remote color in ref-filter branch immediately branch: use BRANCH_COLOR_LOCAL in ref-filter format branch: only perform HEAD check for local branches
2017-07-12Merge branch 'ks/typofix-commit-c-comment' into maintLibravatar Junio C Hamano1-1/+1
Typofix. * ks/typofix-commit-c-comment: builtin/commit.c: fix a typo in the comment
2017-07-12Merge branch 'jk/reflog-walk-maint' into maintLibravatar Junio C Hamano3-12/+42
After "git branch --move" of the currently checked out branch, the code to walk the reflog of HEAD via "log -g" and friends incorrectly stopped at the reflog entry that records the renaming of the branch. * jk/reflog-walk-maint: reflog-walk: include all fields when freeing complete_reflogs reflog-walk: don't free reflogs added to cache reflog-walk: duplicate strings in complete_reflogs list reflog-walk: skip over double-null oid due to HEAD rename
2017-07-12Hopefully the last batch before -rc0Libravatar Junio C Hamano1-0/+9
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-07-12Merge branch 'ks/fix-rebase-doc-picture'Libravatar Junio C Hamano1-1/+1
Doc update. * ks/fix-rebase-doc-picture: doc: correct a mistake in an illustration
2017-07-12Merge branch 'rs/wt-status-cleanup'Libravatar Junio C Hamano1-3/+4
Code cleanup. * rs/wt-status-cleanup: wt-status: use separate variable for result of shorten_unambiguous_ref
2017-07-12Merge branch 'rs/use-div-round-up'Libravatar Junio C Hamano9-15/+14
Code cleanup. * rs/use-div-round-up: use DIV_ROUND_UP
2017-07-12Merge branch 'kn/ref-filter-branch-list'Libravatar Junio C Hamano3-7/+54
The rewrite of "git branch --list" using for-each-ref's internals that happened in v2.13 regressed its handling of color.branch.local; this has been fixed. * kn/ref-filter-branch-list: ref-filter.c: drop return from void function branch: set remote color in ref-filter branch immediately branch: use BRANCH_COLOR_LOCAL in ref-filter format branch: only perform HEAD check for local branches
2017-07-12Merge branch 'rs/urlmatch-cleanup'Libravatar Junio C Hamano1-5/+5
Code cleanup. * rs/urlmatch-cleanup: urlmatch: use hex2chr() in append_normalized_escapes()
2017-07-12Merge branch 'rs/apply-avoid-over-reading'Libravatar Junio C Hamano1-2/+1
Code cleanup. * rs/apply-avoid-over-reading: apply: use strcmp(3) for comparing strings in gitdiff_verify_name()
2017-07-12Merge branch 'sb/submodule-doc'Libravatar Junio C Hamano4-36/+234
Doc update. * sb/submodule-doc: submodules: overhaul documentation
2017-07-12gc: run pre-detach operations under lockLibravatar Jeff King2-0/+25
We normally try to avoid having two auto-gc operations run at the same time, because it wastes resources. This was done long ago in 64a99eb47 (gc: reject if another gc is running, unless --force is given, 2013-08-08). When we do a detached auto-gc, we run the ref-related commands _before_ detaching, to avoid confusing lock contention. This was done by 62aad1849 (gc --auto: do not lock refs in the background, 2014-05-25). These two features do not interact well. The pre-detach operations are run before we check the gc.pid lock, meaning that on a busy repository we may run many of them concurrently. Ideally we'd take the lock before spawning any operations, and hold it for the duration of the program. This is tricky, though, with the way the pid-file interacts with the daemonize() process. Other processes will check that the pid recorded in the pid-file still exists. But detaching causes us to fork and continue running under a new pid. So if we take the lock before detaching, the pid-file will have a bogus pid in it. We'd have to go back and update it with the new pid after detaching. We'd also have to play some tricks with the tempfile subsystem to tweak the "owner" field, so that the parent process does not clean it up on exit, but the child process does. Instead, we can do something a bit simpler: take the lock only for the duration of the pre-detach work, then detach, then take it again for the post-detach work. Technically, this means that the post-detach lock could lose to another process doing pre-detach work. But in the long run this works out. That second process would then follow-up by doing post-detach work. Unless it was in turn blocked by a third process doing pre-detach work, and so on. This could in theory go on indefinitely, as the pre-detach work does not repack, and so need_to_gc() will continue to trigger. But in each round we are racing between the pre- and post-detach locks. Eventually, one of the post-detach locks will win the race and complete the full gc. So in the worst case, we may racily repeat the pre-detach work, but we would never do so simultaneously (it would happen via a sequence of serialized race-wins). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-07-11pre-rebase hook: capture documentation in a <<here documentLibravatar Jonathan Nieder1-3/+3
Without this change, the sample hook does not pass a syntax check (sh -n): $ sh -n hooks--pre-rebase.sample hooks--pre-rebase.sample: line 101: syntax error near unexpected token `(' hooks--pre-rebase.sample: line 101: ` merged into it again (either directly or indirectly).' Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-07-10use DIV_ROUND_UPLibravatar René Scharfe9-15/+14
Convert code that divides and rounds up to use DIV_ROUND_UP to make the intent clearer and reduce the number of magic constants. Signed-off-by: Rene Scharfe <l.s.r@web.de> Reviewed-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-07-10Sync with maintLibravatar Junio C Hamano3-21/+54
2017-07-10Prepare for 2.13.3Libravatar Junio C Hamano2-1/+54
2017-07-10Merge branch 'sb/merge-recursive-code-cleanup' into maintLibravatar Junio C Hamano1-3/+3
Code clean-up. * sb/merge-recursive-code-cleanup: merge-recursive: use DIFF_XDL_SET macro
2017-07-10Merge branch 'jc/utf8-fprintf' into maintLibravatar Junio C Hamano1-3/+2
Code cleanup. * jc/utf8-fprintf: submodule--helper: do not call utf8_fprintf() unnecessarily
2017-07-10Merge branch 'js/fsck-name-object' into maintLibravatar Junio C Hamano1-1/+1
Test fix. * js/fsck-name-object: t1450: use egrep for regexp "alternation"
2017-07-10Merge branch 'js/t5534-rev-parse-gives-multi-line-output-fix' into maintLibravatar Junio C Hamano1-4/+10
A few tests that tried to verify the contents of push certificates did not use 'git rev-parse' to formulate the line to look for in the certificate correctly. * js/t5534-rev-parse-gives-multi-line-output-fix: t5534: fix misleading grep invocation
2017-07-10Merge branch 'ab/sha1dc-maint' into maintLibravatar Junio C Hamano1-22/+66
Update the sha1dc again to fix portability glitches. * ab/sha1dc-maint: sha1dc: update from upstream
2017-07-10Merge branch 'aw/contrib-subtree-doc-asciidoctor' into maintLibravatar Junio C Hamano1-7/+19
The Makefile rule in contrib/subtree for building documentation learned to honour USE_ASCIIDOCTOR just like the main documentation set does. * aw/contrib-subtree-doc-asciidoctor: subtree: honour USE_ASCIIDOCTOR when set
2017-07-10Merge branch 'cc/shared-index-permfix' into maintLibravatar Junio C Hamano4-11/+50
The split index code did not honor core.sharedrepository setting correctly. * cc/shared-index-permfix: t1700: make sure split-index respects core.sharedrepository t1301: move modebits() to test-lib-functions.sh read-cache: use shared perms when writing shared index
2017-07-10Merge branch 'ah/doc-pretty-color-auto-prefix' into maintLibravatar Junio C Hamano1-5/+6
Doc update. * ah/doc-pretty-color-auto-prefix: doc: clarify syntax for %C(auto,...) in pretty formats
2017-07-10Merge branch 'mb/reword-autocomplete-message' into maintLibravatar Junio C Hamano1-6/+12
Message update. * mb/reword-autocomplete-message: auto-correct: tweak phrasing
2017-07-10Merge branch 'ks/t7508-indent-fix' into maintLibravatar Junio C Hamano1-1/+1
Cosmetic update to a test. * ks/t7508-indent-fix: t7508: fix a broken indentation
2017-07-10Merge branch 'sb/t4005-modernize' into maintLibravatar Junio C Hamano1-52/+43
Test clean-up. * sb/t4005-modernize: t4005: modernize style and drop hard coded sha1
2017-07-10Merge branch 'rs/apply-validate-input' into maintLibravatar Junio C Hamano4-7/+86
Tighten error checks for invalid "git apply" input. * rs/apply-validate-input: apply: check git diffs for mutually exclusive header lines apply: check git diffs for invalid file modes apply: check git diffs for missing old filenames
2017-07-10Merge branch 'jc/pack-bitmap-unaligned' into maintLibravatar Junio C Hamano1-1/+1
An unaligned 32-bit access in pack-bitmap code ahs been corrected. * jc/pack-bitmap-unaligned: pack-bitmap: don't perform unaligned memory access
2017-07-10Merge branch 'pw/rebase-i-regression-fix-tests' into maintLibravatar Junio C Hamano4-12/+148
Fix a recent regression to "git rebase -i" and add tests that would have caught it and others. * pw/rebase-i-regression-fix-tests: t3420: fix under GETTEXT_POISON build rebase: add more regression tests for console output rebase: add regression tests for console output rebase -i: add test for reflog message sequencer: print autostash messages to stderr
2017-07-10Merge branch 'jk/add-p-commentchar-fix' into maintLibravatar Junio C Hamano2-1/+10
"git add -p" were updated in 2.12 timeframe to cope with custom core.commentchar but the implementation was buggy and a metacharacter like $ and * did not work. * jk/add-p-commentchar-fix: add--interactive: quote commentChar regex add--interactive: handle EOF in prompt_yesno
2017-07-10Merge branch 'js/alias-early-config' into maintLibravatar Junio C Hamano8-61/+49
The code to pick up and execute command alias definition from the configuration used to switch to the top of the working tree and then come back when the expanded alias was executed, which was unnecessarilyl complex. Attempt to simplify the logic by using the early-config mechanism that does not chdir around. * js/alias-early-config: alias: use the early config machinery to expand aliases t7006: demonstrate a problem with aliases in subdirectories t1308: relax the test verifying that empty alias values are disallowed help: use early config when autocorrecting aliases config: report correct line number upon error discover_git_directory(): avoid setting invalid git_dir
2017-07-10Merge branch 'rs/pretty-add-again' into maintLibravatar Junio C Hamano3-45/+0
The pretty-format specifiers like '%h', '%t', etc. had an optimization that no longer works correctly. In preparation/hope of getting it correctly implemented, first discard the optimization that is broken. * rs/pretty-add-again: pretty: recalculate duplicate short hashes
2017-07-10Merge branch 'ah/doc-gitattributes-empty-index' into maintLibravatar Junio C Hamano1-1/+1
An example in documentation that does not work in multi worktree configuration has been corrected. * ah/doc-gitattributes-empty-index: doc: do not use `rm .git/index` when normalizing line endings
2017-07-10Merge branch 'da/mergetools-meld-output-opt-on-macos' into maintLibravatar Junio C Hamano1-1/+1
"git mergetool" learned to work around a wrapper MacOS X adds around underlying meld. * da/mergetools-meld-output-opt-on-macos: mergetools/meld: improve compatibiilty with Meld on macOS X
2017-07-10Merge branch 'jk/diff-highlight-module' into maintLibravatar Junio C Hamano5-19/+82
The 'diff-highlight' program (in contrib/) has been restructured for easier reuse by an external project 'diff-so-fancy'. * jk/diff-highlight-module: diff-highlight: split code into module