Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-03-20refs: introduce a "ref paranoia" flagJeff King
Most operations that iterate over refs are happy to ignore broken cruft. However, some operations should be performed with knowledge of these broken refs, because it is better for the operation to choke on a missing object than it is to silently pretend that the ref did not exist (e.g., if we are computing the set of reachable tips in order to prune objects). These processes could just call for_each_rawref, except that ref iteration is often hidden behind other interfaces. For instance, for a destructive "repack -ad", we would have to inform "pack-objects" that we are destructive, and then it would in turn have to tell the revision code that our "--all" should include broken refs. It's much simpler to just set a global for "dangerous" operations that includes broken refs in all iterations. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-20t5312: test object deletion code paths in a corrupted repositoryJeff King
When we are doing a destructive operation like "git prune", we want to be extra careful that the set of reachable tips we compute is valid. If there is any corruption or oddity, we are better off aborting the operation and letting the user figure things out rather than plowing ahead and possibly deleting some data that cannot be recovered. The tests here include: 1. Pruning objects mentioned only be refs with invalid names. This used to abort prior to d0f810f (refs.c: allow listing and deleting badly named refs, 2014-09-03), but since then we silently ignore the tip. Likewise, we test repacking that can drop objects (either "-ad", which drops anything unreachable, or "-Ad --unpack-unreachable=<time>", which tries to optimize out a loose object write that would be directly pruned). 2. Pruning objects when some refs point to missing objects. We don't know whether any dangling objects would have been reachable from the missing objects. We are better to keep them around, as they are better than nothing for helping the user recover history. 3. Packed refs that point to missing objects can sometimes be dropped. By itself, this is more of an annoyance (you do not have the object anyway; even if you can recover it from elsewhere, all you are losing is a placeholder for your state at the time of corruption). But coupled with (2), if we drop the ref and then go on to prune, we may lose unrecoverable objects. Note that we use test_might_fail for some of the operations. In some cases, it would be appropriate to abort the operation, and in others, it might be acceptable to continue but taking the information into account. The tests don't care either way, and check only for data loss. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-14Git 2.3.3v2.3.3Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-14Merge branch 'mr/doc-clean-f-f' into maintJunio C Hamano
Documentation update. * mr/doc-clean-f-f: Documentation/git-clean.txt: document that -f may need to be given twice
2015-03-14Merge branch 'ak/t5516-typofix' into maintJunio C Hamano
* ak/t5516-typofix: t5516: correct misspelled pushInsteadOf
2015-03-14Merge branch 'jc/diff-test-updates' into maintJunio C Hamano
Test clean-up. * jc/diff-test-updates: test_ln_s_add: refresh stat info of fake symbolic links t4008: modernise style t/diff-lib: check exact object names in compare_diff_raw tests: do not borrow from COPYING and README from the real source t4010: correct expected object names t9300: correct expected object names t4008: correct stale comments
2015-03-14Merge branch 'jk/diffcore-rename-duplicate' into maintJunio C Hamano
A corrupt input to "git diff -M" can cause us to segfault. * jk/diffcore-rename-duplicate: diffcore-rename: avoid processing duplicate destinations diffcore-rename: split locate_rename_dst into two functions
2015-03-14Merge branch 'bw/kwset-use-unsigned' into maintJunio C Hamano
The borrowed code in kwset API did not follow our usual convention to use "unsigned char" to store values that range from 0-255. * bw/kwset-use-unsigned: kwset: use unsigned char to store values with high-bit set
2015-03-14Merge branch 'nd/grep-exclude-standard-help-fix' into maintJunio C Hamano
Description given by "grep -h" for its --exclude-standard option was phrased poorly. * nd/grep-exclude-standard-help-fix: grep: correct help string for --exclude-standard
2015-03-14Merge branch 'mg/doc-remote-tags-or-not' into maintJunio C Hamano
"git remote add" mentioned "--tags" and "--no-tags" and was not clear that fetch from the remote in the future will use the default behaviour when neither is given to override it. * mg/doc-remote-tags-or-not: git-remote.txt: describe behavior without --tags and --no-tags
2015-03-14Merge branch 'mk/diff-shortstat-dirstat-fix' into maintJunio C Hamano
"git diff --shortstat --dirstat=changes" showed a dirstat based on lines that was never asked by the end user in addition to the dirstat that the user asked for. * mk/diff-shortstat-dirstat-fix: diff --shortstat --dirstat: remove duplicate output
2015-03-14Merge branch 'ms/submodule-update-config-doc' into maintJunio C Hamano
The interaction between "git submodule update" and the submodule.*.update configuration was not clearly documented. * ms/submodule-update-config-doc: submodule: improve documentation of update subcommand
2015-03-14Merge branch 'jc/apply-beyond-symlink' into maintJunio C Hamano
"git apply" was not very careful about reading from, removing, updating and creating paths outside the working tree (under --index/--cached) or the current directory (when used as a replacement for GNU patch). * jc/apply-beyond-symlink: apply: do not touch a file beyond a symbolic link apply: do not read from beyond a symbolic link apply: do not read from the filesystem under --index apply: reject input that touches outside the working area
2015-03-14Merge branch 'rs/daemon-interpolate' into maintJunio C Hamano
"git daemon" looked up the hostname even when "%CH" and "%IP" interpolations are not requested, which was unnecessary. * rs/daemon-interpolate: daemon: use callback to build interpolated path daemon: look up client-supplied hostname lazily
2015-03-14Merge branch 'jk/daemon-interpolate' into maintJunio C Hamano
The "interpolated-path" option of "git daemon" inserted any string client declared on the "host=" capability request without checking. Sanitize and limit %H and %CH to a saner and a valid DNS name. * jk/daemon-interpolate: daemon: sanitize incoming virtual hostname t5570: test git-daemon's --interpolated-path option git_connect: let user override virtual-host we send to daemon
2015-03-07Git 2.3.2v2.3.2Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-07Merge branch 'rj/no-xopen-source-for-cygwin' into maintJunio C Hamano
Code cleanups. * rj/no-xopen-source-for-cygwin: git-compat-util.h: remove redundant code
2015-03-07Merge branch 'rs/simple-cleanups' into maintJunio C Hamano
Code cleanups. * rs/simple-cleanups: sha1_name: use strlcpy() to copy strings pretty: use starts_with() to check for a prefix for-each-ref: use skip_prefix() to avoid duplicate string comparison connect: use strcmp() for string comparison
2015-03-07Merge branch 'mm/am-c-doc' into maintJunio C Hamano
The configuration variable 'mailinfo.scissors' was hard to discover in the documentation. * mm/am-c-doc: Documentation/git-am.txt: mention mailinfo.scissors config variable Documentation/config.txt: document mailinfo.scissors
2015-03-07Merge branch 'ew/svn-maint-fixes' into maintJunio C Hamano
Correct a breakage to git-svn around v2.2 era that triggers premature closing of FileHandle. * ew/svn-maint-fixes: Git::SVN::*: avoid premature FileHandle closure git-svn: fix localtime=true on non-glibc environments
2015-03-07Merge branch 'km/send-email-getopt-long-workarounds' into maintJunio C Hamano
Even though we officially haven't dropped Perl 5.8 support, the Getopt::Long package that came with it does not support "--no-" prefix to negate a boolean option; manually add support to help people with older Getopt::Long package. * km/send-email-getopt-long-workarounds: git-send-email.perl: support no- prefix with older GetOptions
2015-03-06Prepare for 2.3.2Junio C Hamano
2015-03-06Merge branch 'sb/plug-leak-in-make-cache-entry' into maintJunio C Hamano
"update-index --refresh" used to leak when an entry cannot be refreshed for whatever reason. * sb/plug-leak-in-make-cache-entry: read-cache.c: free cache entry when refreshing fails
2015-03-06Merge branch 'jk/fast-import-die-nicely-fix' into maintJunio C Hamano
"git fast-import" used to crash when it could not close and conclude the resulting packfile cleanly. * jk/fast-import-die-nicely-fix: fast-import: avoid running end_packfile recursively
2015-03-06Merge branch 'es/blame-commit-info-fix' into maintJunio C Hamano
"git blame" died, trying to free an uninitialized piece of memory. * es/blame-commit-info-fix: builtin/blame: destroy initialized commit_info only
2015-03-06Merge branch 'ab/merge-file-prefix' into maintJunio C Hamano
"git merge-file" did not work correctly in a subdirectory. * ab/merge-file-prefix: merge-file: correctly open files when in a subdir
2015-03-06Merge branch 'ps/submodule-sanitize-path-upon-add' into maintJunio C Hamano
"git submodule add" failed to squash "path/to/././submodule" to "path/to/submodule". * ps/submodule-sanitize-path-upon-add: git-submodule.sh: fix '/././' path normalization
2015-03-06Merge branch 'jk/prune-mtime' into maintJunio C Hamano
In v2.2.0, we broke "git prune" that runs in a repository that borrows from an alternate object store. * jk/prune-mtime: sha1_file: fix iterating loose alternate objects for_each_loose_file_in_objdir: take an optional strbuf path
2015-03-06Merge branch 'tc/curl-vernum-output-broken-in-7.11' into maintJunio C Hamano
Certain older vintages of cURL give irregular output from "curl-config --vernum", which confused our build system. * tc/curl-vernum-output-broken-in-7.11: Makefile: handle broken curl version number in version check
2015-03-06Merge branch 'es/squelch-openssl-warnings-on-macosx' into maintJunio C Hamano
An earlier workaround to squelch unhelpful deprecation warnings from the complier on Mac OSX unnecessarily set minimum required version of the OS, which the user might want to raise (or lower) for other reasons. * es/squelch-openssl-warnings-on-macosx: git-compat-util: do not step on MAC_OS_X_VERSION_MIN_REQUIRED
2015-03-06Merge branch 'jc/conf-var-doc' into maintJunio C Hamano
Longstanding configuration variable naming rules has been added to the documentation. * jc/conf-var-doc: CodingGuidelines: describe naming rules for configuration variables config.txt: mark deprecated variables more prominently config.txt: clarify that add.ignore-errors is deprecated
2015-03-06Merge branch 'av/wincred-with-at-in-username-fix' into maintJunio C Hamano
The credential helper for Windows (in contrib/) used to mishandle a user name with an at-sign in it. * av/wincred-with-at-in-username-fix: wincred: fix get credential if username has "@"
2015-03-06Merge branch 'ch/new-gpg-drops-rfc-1991' into maintJunio C Hamano
Older GnuPG implementations may not correctly import the keyring material we prepare for the tests to use. * ch/new-gpg-drops-rfc-1991: t/lib-gpg: sanity-check that we can actually sign t/lib-gpg: include separate public keys in keyring.gpg
2015-03-06Merge branch 'jc/remote-set-url-doc' into maintJunio C Hamano
Clarify in the documentation that "remote.<nick>.pushURL" and "remote.<nick>.URL" are there to name the same repository accessed via different transports, not two separate repositories. * jc/remote-set-url-doc: Documentation/git-remote.txt: stress that set-url is not for triangular
2015-03-06Merge branch 'jk/pack-bitmap' into maintJunio C Hamano
The pack bitmap support did not build with older versions of GCC. * jk/pack-bitmap: ewah: fix building with gcc < 3.4.0
2015-03-06Merge branch 'jk/config-no-ungetc-eof' into maintJunio C Hamano
Reading configuration from a blob object, when it ends with a lone CR, use to confuse the configuration parser. * jk/config-no-ungetc-eof: config_buf_ungetc: warn when pushing back a random character config: do not ungetc EOF
2015-03-06Merge branch 'jk/decimal-width-for-uintmax' into maintJunio C Hamano
We didn't format an integer that wouldn't fit in "int" but in "uintmax_t" correctly. * jk/decimal-width-for-uintmax: decimal_width: avoid integer overflow
2015-03-06Merge branch 'jc/push-cert' into maintJunio C Hamano
"git push --signed" gave an incorrectly worded error message when the other side did not support the capability. * jc/push-cert: transport-helper: fix typo in error message when --signed is not supported
2015-03-06Merge branch 'mh/deref-symref-over-helper-transport' into maintJunio C Hamano
"git fetch" over a remote-helper that cannot respond to "list" command could not fetch from a symbolic reference e.g. HEAD. * mh/deref-symref-over-helper-transport: transport-helper: do not request symbolic refs to remote helpers
2015-03-06Merge branch 'ks/rebase-i-abbrev' into maintJunio C Hamano
The insn sheet "git rebase -i" creates did not fully honor core.abbrev settings. * ks/rebase-i-abbrev: rebase -i: use full object name internally throughout the script
2015-03-06Merge branch 'dp/remove-duplicated-header-inclusion' into maintJunio C Hamano
Code clean-up. * dp/remove-duplicated-header-inclusion: do not include the same header twice
2015-03-06Merge branch 'sb/hex-object-name-is-at-most-41-bytes-long' into maintJunio C Hamano
Code clean-up. * sb/hex-object-name-is-at-most-41-bytes-long: hex.c: reduce memory footprint of sha1_to_hex static buffers
2015-03-06Merge branch 'ak/git-pm-typofix' into maintJunio C Hamano
Typofix in comments. * ak/git-pm-typofix: Git.pm: two minor typo fixes
2015-03-06Merge branch 'jk/sanity' into maintJunio C Hamano
The tests that wanted to see that file becomes unreadable after running "chmod a-r file", and the tests that wanted to make sure it is not run as root, we used "can we write into the / directory?" as a cheap substitute, but on some platforms that is not a good heuristics. The tests and their prerequisites have been updated to check what they really require. * jk/sanity: test-lib.sh: set prerequisite SANITY by testing what we really need tests: correct misuses of POSIXPERM t/lib-httpd: switch SANITY check for NOT_ROOT
2015-03-03t5516: correct misspelled pushInsteadOfAnders Kaseorg
A future breakage to "git push" to make it incorrectly pay attention to pushInsteadOf when it should not will be left uncaught without this change. Signed-off-by: Anders Kaseorg <andersk@mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-03submodule: improve documentation of update subcommandMichal Sojka
The documentation of 'git submodule update' has several problems: 1) It mentions that value 'none' of submodule.$name.update can be overridden by --checkout, but other combinations of configuration values and command line options are not mentioned. 2) The documentation of submodule.$name.update is scattered across three places, which is confusing. 3) The documentation of submodule.$name.update in gitmodules.txt is incorrect, because the code always uses the value from .git/config and never from .gitmodules. 4) Documentation of --force was incomplete, because it is only effective in case of checkout method of update. Fix all these problems by documenting submodule.*.update in git-submodule.txt and make everybody else refer to it. Helped-by: Junio C Hamano <gitster@pobox.com> Helped-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Michal Sojka <sojkam1@fel.cvut.cz> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-02git-remote.txt: describe behavior without --tags and --no-tagsMichael J Gruber
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-02kwset: use unsigned char to store values with high-bit setBen Walton
Sun Studio on Solaris issues warnings about improper initialization values being used when defining tolower_trans_tbl[] in ctype.c. The array wants to store values with high-bit set and treat them as values between 128 to 255. Unlike the rest of the Git codebase where we explicitly specify 'unsigned char' for such variables and arrays, however, kwset code we borrowed from elsewhere uses 'char' for this and other variables. Fix the declarations to explicitly use 'unsigned char' where necessary to bring it in line with the rest of the Git. Signed-off-by: Ben Walton <bdwalton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-02diff --shortstat --dirstat: remove duplicate outputMårten Kongstad
When --shortstat is used in conjunction with --dirstat=changes, git diff will output the dirstat information twice: first as calculated by the 'lines' algorithm, then as calculated by the 'changes' algorithm: $ git diff --dirstat=changes,10 --shortstat v2.2.0..v2.2.1 23 files changed, 453 insertions(+), 54 deletions(-) 33.5% Documentation/RelNotes/ 26.2% t/ 46.6% Documentation/RelNotes/ 16.6% t/ The same duplication happens for --shortstat together with --dirstat=files, but not for --shortstat together with --dirstat=lines. Limit output to only include one dirstat part, calculated as specified by the --dirstat parameter. Also, add test for this. Signed-off-by: Mårten Kongstad <marten.kongstad@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-02-28diffcore-rename: avoid processing duplicate destinationsJeff King
The rename code cannot handle an input where we have duplicate destinations (i.e., more than one diff_filepair in the queue with the same string in its pair->two->path). We end up allocating only one slot in the rename_dst mapping. If we fill in the diff_filepair for that slot, when we re-queue the results, we may queue that filepair multiple times. When the diff is finally flushed, the filepair is processed and free()d multiple times, leading to heap corruption. This situation should only happen when a tree diff sees duplicates in one of the trees (see the added test for a detailed example). Rather than handle it, the sanest thing is just to turn off rename detection altogether for the diff. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>