summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2017-06-12revision.c: stricter parsing of '--no-{min,max}-parents'Libravatar SZEDER Gábor1-2/+2
These two options are parsed using starts_with(), allowing things like 'git log --no-min-parents-foobarbaz' to succeed. Use strcmp() instead. Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com> Reviewed-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-06-12revision.h: turn rev_info.early_output back into an unsigned intLibravatar SZEDER Gábor1-2/+3
rev_info.early_output started out as an unsigned int in cdcefbc97 (Add "--early-output" log flag for interactive GUI use, 2007-11-03), but later it was turned into a single bit in a bit field in cc243c3ce (show: --ignore-missing, 2011-05-18) without explanation, though the code using it still expects it to be a regular integer type and uses it as a counter. Consequently, any even number given via '--early-output=<N>', or indeed a plain '--early-output' defaulting to 100 effectively disabled the feature. Turn rev_info.early_output back into its origin unsigned int data type, making '--early-output' work again. Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com> Reviewed-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-05-05Git 2.11.2Libravatar Junio C Hamano4-3/+16
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-05-05Merge branch 'maint-2.10' into maint-2.11Libravatar Junio C Hamano9-8/+92
2017-05-05Git 2.10.3Libravatar Junio C Hamano3-2/+10
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-05-05Merge branch 'maint-2.9' into maint-2.10Libravatar Junio C Hamano8-7/+83
2017-05-05Git 2.9.4Libravatar Junio C Hamano3-2/+11
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-05-05Merge branch 'maint-2.8' into maint-2.9Libravatar Junio C Hamano7-6/+74
2017-05-05Git 2.8.5Libravatar Junio C Hamano4-3/+16
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-05-05Merge branch 'maint-2.7' into maint-2.8Libravatar Junio C Hamano6-5/+60
2017-05-05Git 2.7.5Libravatar Junio C Hamano4-3/+19
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-05-05Merge branch 'maint-2.6' into maint-2.7Libravatar Junio C Hamano5-4/+43
2017-05-05Git 2.6.7Libravatar Junio C Hamano4-3/+16
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-05-05Merge branch 'maint-2.5' into maint-2.6Libravatar Junio C Hamano4-3/+29
2017-05-05Git 2.5.6Libravatar Junio C Hamano4-3/+16
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-05-05Merge branch 'maint-2.4' into maint-2.5Libravatar Junio C Hamano3-2/+15
2017-05-05Git 2.4.12Libravatar Junio C Hamano4-3/+16
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-05-05Merge branch 'jk/shell-no-repository-that-begins-with-dash' into maint-2.4Libravatar Junio C Hamano1-1/+1
* jk/shell-no-repository-that-begins-with-dash: shell: disallow repo names beginning with dash
2017-05-05shell: disallow repo names beginning with dashLibravatar Jeff King1-1/+1
When a remote server uses git-shell, the client side will connect to it like: ssh server "git-upload-pack 'foo.git'" and we literally exec ("git-upload-pack", "foo.git"). In early versions of upload-pack and receive-pack, we took a repository argument and nothing else. But over time they learned to accept dashed options. If the user passes a repository name that starts with a dash, the results are confusing at best (we complain of a bogus option instead of a non-existent repository) and malicious at worst (the user can start an interactive pager via "--help"). We could pass "--" to the sub-process to make sure the user's argument is interpreted as a branch name. I.e.: git-upload-pack -- -foo.git But adding "--" automatically would make us inconsistent with a normal shell (i.e., when git-shell is not in use), where "-foo.git" would still be an error. For that case, the client would have to specify the "--", but they can't do so reliably, as existing versions of git-shell do not allow more than a single argument. The simplest thing is to simply disallow "-" at the start of the repo name argument. This hasn't worked either with or without git-shell since version 1.0.0, and nobody has complained. Note that this patch just applies to do_generic_cmd(), which runs upload-pack, receive-pack, and upload-archive. There are two other types of commands that git-shell runs: - do_cvs_cmd(), but this already restricts the argument to be the literal string "server" - admin-provided commands in the git-shell-commands directory. We'll pass along arbitrary arguments there, so these commands could have similar problems. But these commands might actually understand dashed arguments, so we cannot just block them here. It's up to the writer of the commands to make sure they are safe. With great power comes great responsibility. Reported-by: Timo Schmid <tschmid@ernw.de> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-02-02Git 2.11.1Libravatar Junio C Hamano1-0/+3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-02-02Merge branch 'ws/request-pull-code-cleanup' into maintLibravatar Junio C Hamano1-3/+0
Code clean-up. * ws/request-pull-code-cleanup: request-pull: drop old USAGE stuff
2017-02-02Merge branch 'jk/execv-dashed-external' into maintLibravatar Junio C Hamano3-21/+35
Typing ^C to pager, which usually does not kill it, killed Git and took the pager down as a collateral damage in certain process-tree structure. This has been fixed. * jk/execv-dashed-external: execv_dashed_external: wait for child on signal death execv_dashed_external: stop exiting with negative code execv_dashed_external: use child_process struct
2017-01-31Ready for 2.11.1Libravatar Junio C Hamano1-0/+45
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-01-31Merge branch 'sb/in-core-index-doc' into maintLibravatar Junio C Hamano3-22/+32
Documentation and in-code comments updates. * sb/in-core-index-doc: documentation: retire unfinished documentation cache.h: document add_[file_]to_index cache.h: document remove_index_entry_at cache.h: document index_name_pos
2017-01-31Merge branch 'js/mingw-isatty' into maintLibravatar Junio C Hamano1-7/+4
An update to a topic that is already in 'master'. * js/mingw-isatty: mingw: follow-up to "replace isatty() hack"
2017-01-31Merge branch 'jk/coding-guidelines-update' into maintLibravatar Junio C Hamano1-5/+32
Developer doc update. * jk/coding-guidelines-update: CodingGuidelines: clarify multi-line brace style
2017-01-31Merge branch 'js/exec-path-coverity-workaround' into maintLibravatar Junio C Hamano1-6/+8
Code cleanup. * js/exec-path-coverity-workaround: git_exec_path: do not return the result of getenv() git_exec_path: avoid Coverity warning about unfree()d result
2017-01-31Merge branch 'ad/bisect-terms' into maintLibravatar Junio C Hamano1-2/+2
Documentation fix. * ad/bisect-terms: Documentation/bisect: improve on (bad|new) and (good|bad)
2017-01-31Merge branch 'jk/grep-e-could-be-extended-beyond-posix' into maintLibravatar Junio C Hamano1-11/+15
Tighten a test to avoid mistaking an extended ERE regexp engine as a PRE regexp engine. * jk/grep-e-could-be-extended-beyond-posix: t7810: avoid assumption about invalid regex syntax
2017-01-31Merge branch 'km/branch-get-push-while-detached' into maintLibravatar Junio C Hamano2-3/+9
"git <cmd> @{push}" on a detached HEAD used to segfault; it has been corrected to error out with a message. * km/branch-get-push-while-detached: branch_get_push: do not segfault when HEAD is detached
2017-01-31Merge branch 'jk/rebase-i-squash-count-fix' into maintLibravatar Junio C Hamano1-1/+1
"git rebase -i" with a recent update started showing an incorrect count when squashing more than 10 commits. * jk/rebase-i-squash-count-fix: rebase--interactive: count squash commits above 10 correctly
2017-01-31Merge branch 'jk/blame-fixes' into maintLibravatar Junio C Hamano3-10/+166
"git blame --porcelain" misidentified the "previous" <commit, path> pair (aka "source") when contents came from two or more files. * jk/blame-fixes: blame: output porcelain "previous" header for each file blame: handle --no-abbrev blame: fix alignment with --abbrev=40
2017-01-31Merge branch 'jk/archive-zip-userdiff-config' into maintLibravatar Junio C Hamano2-4/+25
"git archive" did not read the standard configuration files, and failed to notice a file that is marked as binary via the userdiff driver configuration. * jk/archive-zip-userdiff-config: archive-zip: load userdiff config
2017-01-31Merge branch 'dt/disable-bitmap-in-auto-gc' into maintLibravatar Junio C Hamano4-6/+45
It is natural that "git gc --auto" may not attempt to pack everything into a single pack, and there is no point in warning when the user has configured the system to use the pack bitmap, leading to disabling further "gc". * dt/disable-bitmap-in-auto-gc: repack: die on incremental + write-bitmap-index auto gc: don't write bitmaps for incremental repacks
2017-01-31Merge branch 'nd/config-misc-fixes' into maintLibravatar Junio C Hamano1-5/+15
Leakage of lockfiles in the config subsystem has been fixed. * nd/config-misc-fixes: config.c: handle lock file in error case in git_config_rename_... config.c: rename label unlock_and_out config.c: handle error case for fstat() calls
2017-01-31Merge branch 'jc/abbrev-autoscale-config' into maintLibravatar Junio C Hamano2-8/+15
Recent update to the default abbreviation length that auto-scales lacked documentation update, which has been corrected. * jc/abbrev-autoscale-config: config.abbrev: document the new default that auto-scales
2017-01-31Merge branch 'mh/fast-import-notes-fix-new' into maintLibravatar Junio C Hamano2-3/+47
"git fast-import" sometimes mishandled while rebalancing notes tree, which has been fixed. * mh/fast-import-notes-fix-new: fast-import: properly fanout notes when tree is imported
2017-01-31Merge branch 'jc/compression-config' into maintLibravatar Junio C Hamano9-31/+158
Compression setting for producing packfiles were spread across three codepaths, one of which did not honor any configuration. Unify these so that all of them honor core.compression and pack.compression variables the same way. * jc/compression-config: compression: unify pack.compression configuration parsing
2017-01-31Merge branch 'ew/svn-fixes' into maintLibravatar Junio C Hamano2-2/+8
Meant eventually for 'maint'. * ew/svn-fixes: git-svn: document useLogAuthor and addAuthorFrom config keys git-svn: allow "0" in SVN path components
2017-01-31Merge branch 'ls/travis-p4-on-macos' into maintLibravatar Junio C Hamano1-10/+2
Update the definition of the MacOSX test environment used by TravisCI. * ls/travis-p4-on-macos: travis-ci: fix Perforce install on macOS
2017-01-31Merge branch 'jk/make-tags-find-sources-tweak' into maintLibravatar Junio C Hamano1-3/+16
Update the procedure to generate "tags" for developer support. * jk/make-tags-find-sources-tweak: Makefile: exclude contrib from FIND_SOURCE_FILES Makefile: match shell scripts in FIND_SOURCE_FILES Makefile: exclude test cruft from FIND_SOURCE_FILES Makefile: reformat FIND_SOURCE_FILES
2017-01-31Merge branch 'jc/latin-1' into maintLibravatar Junio C Hamano1-11/+25
Some platforms no longer understand "latin-1" that is still seen in the wild in e-mail headers; replace them with "iso-8859-1" that is more widely known when conversion fails from/to it. * jc/latin-1: utf8: accept "latin-1" as ISO-8859-1 utf8: refactor code to decide fallback encoding
2017-01-23travis-ci: fix Perforce install on macOSLibravatar Lars Schneider1-10/+2
The `perforce` and `perforce-server` package were moved from brew [1][2] to cask [3]. Teach TravisCI the new location. Perforce updates their binaries without version bumps. That made the brew install (legitimately!) fail due to checksum mismatches. The workaround is not necessary anymore as Cask [4] allows to disable the checksum test for individual formulas. [1] https://github.com/Homebrew/homebrew-binary/commit/1394e42de04d07445f82f9512627e864ff4ca4c6 [2] https://github.com/Homebrew/homebrew-binary/commit/f8da22d6b8dbcfcfdb2dfa9ac1a5e5d8e05aac2b [3] https://github.com/caskroom/homebrew-cask/pull/29180 [4] https://caskroom.github.io/ Signed-off-by: Lars Schneider <larsxschneider@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-01-19documentation: retire unfinished documentationLibravatar Stefan Beller1-21/+0
When looking for documentation for a specific function, you may be tempted to run git -C Documentation grep index_name_pos only to find the file technical/api-in-core-index.txt, which doesn't help for understanding the given function. It would be better to not find these functions in the documentation, such that people directly dive into the code instead. In the previous patches we have documented * index_name_pos() * remove_index_entry_at() * add_[file_]to_index() in cache.h We already have documentation for: * add_index_entry() * read_index() Which leaves us with a TODO for: * cache -> the_index macros * refresh_index() * discard_index() * ie_match_stat() and ie_modified(); how they are different and when to use which. * write_index() that was renamed to write_locked_index * cache_tree_invalidate_path() * cache_tree_update() Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-01-19cache.h: document add_[file_]to_indexLibravatar Stefan Beller1-0/+10
Helped-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-01-19cache.h: document remove_index_entry_atLibravatar Stefan Beller2-1/+3
Do this by moving the existing documentation from read-cache.c to cache.h. Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-01-19cache.h: document index_name_posLibravatar Stefan Beller1-0/+19
Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-01-18mingw: follow-up to "replace isatty() hack"Libravatar Johannes Schindelin1-7/+4
The version of the "replace isatty() hack" that got merged a few weeks ago did not actually reflect the latest iteration of the patch series: v3 was sent out with these changes, as requested by the reviewer Johannes Sixt: - reworded the comment about "recycling handles" - moved the reassignment of the `console` variable before the dup2() call so that it is valid at all times - removed the "handle = INVALID_HANDLE_VALUE" assignment, as the local variable `handle` is not used afterwards anyway Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Reviewed-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-01-17Almost ready for 2.11.1Libravatar Junio C Hamano4-3/+124
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-01-17Merge branch 'mm/gc-safety-doc' into maintLibravatar Junio C Hamano2-9/+29
Doc update. * mm/gc-safety-doc: git-gc.txt: expand discussion of races with other processes