summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2017-03-27submodule.c: stricter checking for submodules in is_submodule_modifiedLibravatar Stefan Beller1-2/+3
By having a stricter check in the superproject we catch errors earlier, instead of spawning a child process to tell us. Signed-off-by: Stefan Beller <sbeller@google.com> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-27submodule.c: port is_submodule_modified to use porcelain 2Libravatar Stefan Beller1-4/+5
Migrate 'is_submodule_modified' to the new porcelain format of git-status. This conversion attempts to convert faithfully, i.e. the behavior ought to be exactly the same. As the output in the parsing only distinguishes between untracked files and the rest, this is easy to port to the new format, as we only need to identify untracked files and the rest is handled in the "else" case. untracked files are indicated by only a single question mark instead of two question marks, so the conversion is easy. Signed-off-by: Stefan Beller <sbeller@google.com> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-27submodule.c: convert is_submodule_modified to use strbuf_getwholelineLibravatar Stefan Beller2-17/+31
Instead of implementing line reading yet again, make use of our beautiful library function to read one line. By using strbuf_getwholeline instead of strbuf_read, we avoid having to allocate memory for the entire child process output at once. That is, we limit maximum memory usage. Also we can start processing the output as it comes in, no need to wait for all of it. Once we know all information that we care about, we can terminate the child early. In that case we do not care about its exit code as well. By just closing our side of the pipe the child process will get a SIGPIPE signal, which it will not report nor do we report it in finish_command, ac78663b0d (run-command: don't warn on SIGPIPE deaths, 2015-12-29). Helped-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Stefan Beller <sbeller@google.com> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-27submodule.c: factor out early loop termination in is_submodule_modifiedLibravatar Stefan Beller1-8/+8
This makes it easier for a follow up patch. Signed-off-by: Stefan Beller <sbeller@google.com> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-27submodule.c: use argv_array in is_submodule_modifiedLibravatar Stefan Beller1-8/+2
struct argv_array is easier to use and maintain. Signed-off-by: Stefan Beller <sbeller@google.com> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-23Merge branch 'js/rebase-helper'Libravatar Junio C Hamano1-1/+1
A hotfix for a regression fix * js/rebase-helper: sequencer: fix missing newline
2017-03-23sequencer: fix missing newlineLibravatar Brandon Williams1-1/+1
When using rebase --interactive where one of the lines is marked as 'edit' this is the resulting output: Stopped at ec3b9c4... stuffYou can amend the commit now, with git commit --amend Once you are satisfied with your changes, run git rebase --continue A newline character is missing at the end of the "Stopped at ..." line and before the "You can amend ..." line. This patch fixes the malformed output by adding the missing newline character to the end of the "Stopped at ..." line. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-21Sync with maintLibravatar Junio C Hamano1-0/+61
2017-03-21Sixth batch for 2.13Libravatar Junio C Hamano1-17/+23
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-21Merge branch 'nd/commit-hook-doc-fix'Libravatar Junio C Hamano1-1/+1
Doc fix. * nd/commit-hook-doc-fix: git-commit.txt: list post-rewrite in HOOKS section
2017-03-21Merge branch 'ab/push-default-doc-fix'Libravatar Junio C Hamano1-0/+2
Doc fix. * ab/push-default-doc-fix: push: mention "push.default=tracking" in the documentation
2017-03-21Merge branch 'ab/doc-no-option-notation-fix'Libravatar Junio C Hamano2-2/+2
Doc fix. * ab/doc-no-option-notation-fix: doc: change erroneous --[no]-whatever into --[no-]whatever
2017-03-21Merge branch 'sb/wt-status-cleanup'Libravatar Junio C Hamano1-15/+5
Code clean-up. * sb/wt-status-cleanup: wt-status: simplify by using for_each_string_list_item
2017-03-21Merge branch 'js/rebase-helper'Libravatar Junio C Hamano1-1/+2
Recent update to "rebase -i" started showing a message that is not a warning with "warning:" prefix by mistake. This has been fixed. * js/rebase-helper: sequencer: drop "warning:" when stopping for edit
2017-03-21Merge branch 'nd/conditional-config-include'Libravatar Junio C Hamano3-8/+218
The configuration file learned a new "includeIf.<condition>.path" that includes the contents of the given path only when the condition holds. This allows you to say "include this work-related bit only in the repositories under my ~/work/ directory". * nd/conditional-config-include: config: add conditional include config.txt: reflow the second include.path paragraph config.txt: clarify multiple key values in include.path
2017-03-21Merge branch 'jk/pack-name-cleanups'Libravatar Junio C Hamano6-46/+57
Code clean-up. * jk/pack-name-cleanups: index-pack: make pointer-alias fallbacks safer replace snprintf with odb_pack_name() odb_pack_keep(): stop generating keepfile name sha1_file.c: make pack-name helper globally accessible move odb_* declarations out of git-compat-util.h
2017-03-21Merge branch 'sb/submodule-config-parse-ignore-fix'Libravatar Junio C Hamano1-1/+1
Code to read submodule.<name>.ignore config did not state the variable name correctly when giving an error message diagnosing misconfiguration. * sb/submodule-config-parse-ignore-fix: submodule-config: correct error reporting for invalid ignore value
2017-03-21Merge branch 'mg/prompt-describe-tags'Libravatar Junio C Hamano1-0/+3
The command line prompt (in contrib/) learned a new 'tag' style that can be specified with GIT_PS1_DESCRIBE_STYLE, to describe a detached HEAD with "git describe --tags". * mg/prompt-describe-tags: git-prompt: add a describe style for any tags
2017-03-21Merge branch 'jk/rev-parse-cleanup'Libravatar Junio C Hamano1-52/+57
Code clean-up. * jk/rev-parse-cleanup: rev-parse: simplify parsing of ref options rev-parse: add helper for parsing "--foo/--foo=" rev-parse: use skip_prefix when parsing options
2017-03-21Prepare for 2.12.2Libravatar Junio C Hamano2-1/+62
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-21Merge branch 'jh/send-email-one-cc' into maintLibravatar Junio C Hamano2-5/+4
"Cc:" on the trailer part does not have to conform to RFC strictly, unlike in the e-mail header. "git send-email" has been updated to ignore anything after '>' when picking addresses, to allow non-address cruft like " # stable 4.4" after the address. * jh/send-email-one-cc: send-email: only allow one address per body tag
2017-03-21Merge branch 'jk/t6300-cleanup' into maintLibravatar Junio C Hamano1-1/+1
A test that creates a confusing branch whose name is HEAD has been corrected not to do so. * jk/t6300-cleanup: t6300: avoid creating refs/heads/HEAD
2017-03-21Merge branch 'rs/commit-parsing-optim' into maintLibravatar Junio C Hamano1-12/+10
The code that parses header fields in the commit object has been updated for (micro)performance and code hygiene. * rs/commit-parsing-optim: commit: don't check for space twice when looking for header commit: be more precise when searching for headers
2017-03-21Merge branch 'jk/show-branch-lift-name-len-limit' into maintLibravatar Junio C Hamano1-29/+13
"git show-branch" expected there were only very short branch names in the repository and used a fixed-length buffer to hold them without checking for overflow. * jk/show-branch-lift-name-len-limit: show-branch: use skip_prefix to drop magic numbers show-branch: store resolved head in heap buffer show-branch: drop head_len variable
2017-03-21Merge branch 'jk/tempfile-ferror-fclose-confusion' into maintLibravatar Junio C Hamano1-2/+7
A caller of tempfile API that uses stdio interface to write to files may ignore errors while writing, which is detected when tempfile is closed (with a call to ferror()). By that time, the original errno that may have told us what went wrong is likely to be long gone and was overwritten by an irrelevant value. close_tempfile() now resets errno to EIO to make errno at least predictable. * jk/tempfile-ferror-fclose-confusion: tempfile: set errno to a known value before calling ferror()
2017-03-21Merge branch 'rl/remote-allow-missing-branch-name-merge' into maintLibravatar Junio C Hamano2-1/+22
"git remote rm X", when a branch has remote X configured as the value of its branch.*.remote, tried to remove branch.*.remote and branch.*.merge and failed if either is unset. * rl/remote-allow-missing-branch-name-merge: remote: ignore failure to remove missing branch.<name>.merge
2017-03-21Merge branch 'dt/gc-ignore-old-gc-logs' into maintLibravatar Junio C Hamano3-7/+71
A "gc.log" file left by a backgrounded "gc --auto" disables further automatic gc; it has been taught to run at least once a day (by default) by ignoring a stale "gc.log" file that is too old. * dt/gc-ignore-old-gc-logs: gc: ignore old gc.log files
2017-03-21Merge branch 'jt/upload-pack-error-report' into maintLibravatar Junio C Hamano1-1/+5
"git upload-pack", which is a counter-part of "git fetch", did not report a request for a ref that was not advertised as invalid. This is generally not a problem (because "git fetch" will stop before making such a request), but is the right thing to do. * jt/upload-pack-error-report: upload-pack: report "not our ref" to client
2017-03-21Merge branch 'rs/sha1-file-plug-fallback-base-leak' into maintLibravatar Junio C Hamano1-0/+4
A leak in a codepath to read from a packed object in (rare) cases has been plugged. * rs/sha1-file-plug-fallback-base-leak: sha1_file: release fallback base's memory in unpack_entry()
2017-03-21Merge branch 'ss/remote-bzr-hg-placeholder-wo-python' into maintLibravatar Junio C Hamano2-18/+14
There is no need for Python only to give a few messages to the standard error stream, but we somehow did. * ss/remote-bzr-hg-placeholder-wo-python: contrib: git-remote-{bzr,hg} placeholders don't need Python
2017-03-21Merge branch 'jc/diff-populate-filespec-size-only-fix' into maintLibravatar Junio C Hamano2-1/+27
"git diff --quiet" relies on the size field in diff_filespec to be correctly populated, but diff_populate_filespec() helper function made an incorrect short-cut when asked only to populate the size field for paths that need to go through convert_to_git() (e.g. CRLF conversion). * jc/diff-populate-filespec-size-only-fix: diff: do not short-cut CHECK_SIZE_ONLY check in diff_populate_filespec()
2017-03-21Merge branch 'jk/http-walker-buffer-underflow-fix' into maintLibravatar Junio C Hamano1-4/+7
"Dumb http" transport used to misparse a nonsense http-alternates response, which has been fixed. * jk/http-walker-buffer-underflow-fix: http-walker: fix buffer underflow processing remote alternates
2017-03-21Merge branch 'mg/status-porcelain-no-i18n' into maintLibravatar Junio C Hamano1-4/+4
"git status --porcelain" is supposed to give a stable output, but a few strings were left as translatable by mistake. * mg/status-porcelain-no-i18n: git-status: make porcelain more robust
2017-03-21Merge branch 'ps/docs-diffcore' into maintLibravatar Junio C Hamano1-5/+5
Doc update. * ps/docs-diffcore: docs/diffcore: unquote "Complete Rewrites" in headers docs/diffcore: fix grammar in diffcore-rename header
2017-03-21Merge branch 'ew/markdown-url-in-readme' into maintLibravatar Junio C Hamano1-3/+3
Doc update. * ew/markdown-url-in-readme: README: create HTTP/HTTPS links from URLs in Markdown
2017-03-21Merge branch 'rj/remove-unused-mktemp' into maintLibravatar Junio C Hamano6-60/+0
Code cleanup. * rj/remove-unused-mktemp: wrapper.c: remove unused gitmkstemps() function wrapper.c: remove unused git_mkstemp() function
2017-03-21Merge branch 'jk/ewah-use-right-type-in-sizeof' into maintLibravatar Junio C Hamano1-2/+2
Code clean-up. * jk/ewah-use-right-type-in-sizeof: ewah: fix eword_t/uint64_t confusion
2017-03-20Sync with 2.12.1Libravatar Junio C Hamano1-1/+2
2017-03-20Merge branch 'js/difftool-builtin'Libravatar Junio C Hamano2-7/+111
"git difftool --dir-diff" used to die a controlled death giving a "fatal" message when encountering a locally modified symbolic link, but it started segfaulting since v2.12. This has been fixed. * js/difftool-builtin: difftool: handle modified symlinks in dir-diff mode t7800: cleanup cruft left behind by tests t7800: remove whitespace before redirect
2017-03-20Git 2.12.1Libravatar Junio C Hamano1-1/+2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-20push: mention "push.default=tracking" in the documentationLibravatar Ævar Arnfjörð Bjarmason1-0/+2
Change the documentation for push.tracking=* to re-include a mention of what "tracking" does. The "tracking" option was renamed to "upstream" back in 53c4031 ("push.default: Rename 'tracking' to 'upstream'", 2011-02-16), this section was then subsequently rewritten in 87a70e4 ("config doc: rewrite push.default section", 2013-06-19) to remove any mention of "tracking". Maybe we should just warn or die nowadays if this option is in the config, but I had some old config of mine use this option, I'd forgotten that it was a synonym, and nothing in git's documentation mentioned that. That's bad, either we shouldn't support it at all, or we should document what it does. This patch does the latter. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-20git-commit.txt: list post-rewrite in HOOKS sectionLibravatar Nguyễn Thái Ngọc Duy1-1/+1
The hook was added in a86ed83cce (Merge branch 'tr/notes-display' - 2010-03-24), which updated githooks.txt but not git-commit.txt. git-commit.txt was later updated in e858af6d50 (commit: document a couple of options - 2012-06-08). Since this commit focused on command line options, this section was probably forgotten. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-20doc: change erroneous --[no]-whatever into --[no-]whateverLibravatar Ævar Arnfjörð Bjarmason2-2/+2
Change these two obvious typos to be in line with the rest of the documentation, which uses the correct --[no-]whatever form. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-17Fifth batch for 2.13Libravatar Junio C Hamano1-9/+54
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-17Merge branch 'jk/cherry-pick-0-mainline'Libravatar Junio C Hamano2-1/+29
"git revert -m 0 $merge_commit" complained that reverting a merge needs to say relative to which parent the reversion needs to happen, as if "-m 0" weren't given. The correct diagnosis is that "-m 0" does not refer to the first parent ("-m 1" does). This has been fixed. * jk/cherry-pick-0-mainline: cherry-pick: detect bogus arguments to --mainline
2017-03-17Merge branch 'js/early-config'Libravatar Junio C Hamano7-111/+313
The start-up sequence of "git" needs to figure out some configured settings before it finds and set itself up in the location of the repository and was quite messy due to its "chicken-and-egg" nature. The code has been restructured. * js/early-config: setup.c: mention unresolved problems t1309: document cases where we would want early config not to die() setup_git_directory_gently_1(): avoid die()ing t1309: test read_early_config() read_early_config(): really discover .git/ read_early_config(): avoid .git/config hack when unneeded setup: make read_early_config() reusable setup: introduce the discover_git_directory() function setup_git_directory_1(): avoid changing global state setup: prepare setup_discovered_git_dir() for the root directory setup_git_directory(): use is_dir_sep() helper t7006: replace dubious test
2017-03-17Merge branch 'bc/sha1-header-selection-with-cpp-macros'Libravatar Junio C Hamano3-8/+20
Our source code has used the SHA1_HEADER cpp macro after "#include" in the C code to switch among the SHA-1 implementations. Instead, list the exact header file names and switch among implementations using "#ifdef BLK_SHA1/#include "block-sha1/sha1.h"/.../#endif"; this helps some IDE tools. * bc/sha1-header-selection-with-cpp-macros: hash.h: move SHA-1 implementation selection into a header file
2017-03-17Merge branch 'mg/status-porcelain-no-i18n'Libravatar Junio C Hamano1-4/+4
"git status --porcelain" is supposed to give a stable output, but a few strings were left as translatable by mistake. * mg/status-porcelain-no-i18n: git-status: make porcelain more robust
2017-03-17Merge branch 'jk/add-i-use-pathspecs'Libravatar Junio C Hamano2-11/+45
"git add -p <pathspec>" unnecessarily expanded the pathspec to a list of individual files that matches the pathspec by running "git ls-files <pathspec>", before feeding it to "git diff-index" to see which paths have changes, because historically the pathspec language supported by "diff-index" was weaker. These days they are equivalent and there is no reason to internally expand it. This helps both performance and avoids command line argument limit on some platforms. * jk/add-i-use-pathspecs: add--interactive: do not expand pathspecs with ls-files
2017-03-17Merge branch 'jk/http-walker-buffer-underflow-fix'Libravatar Junio C Hamano1-4/+7
"Dumb http" transport used to misparse a nonsense http-alternates response, which has been fixed. * jk/http-walker-buffer-underflow-fix: http-walker: fix buffer underflow processing remote alternates