summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-05-11Second batch for 2.5 cycleLibravatar Junio C Hamano1-0/+80
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-05-11Merge branch 'pt/xdg-config-path'Libravatar Junio C Hamano8-53/+34
Code clean-up for xdg configuration path support. * pt/xdg-config-path: path.c: remove home_config_paths() git-config: replace use of home_config_paths() git-commit: replace use of home_config_paths() credential-store.c: replace home_config_paths() with xdg_config_home() dir.c: replace home_config_paths() with xdg_config_home() attr.c: replace home_config_paths() with xdg_config_home() path.c: implement xdg_config_home()
2015-05-11Merge branch 'ep/do-not-feed-a-pointer-to-array-size'Libravatar Junio C Hamano1-1/+53
Catch a programmer mistake to feed a pointer not an array to ARRAY_SIZE() macro, by using a couple of GCC extensions. * ep/do-not-feed-a-pointer-to-array-size: git-compat-util.h: implement a different ARRAY_SIZE macro for for safely deriving the size of array
2015-05-11Merge branch 'jc/hash-object'Libravatar Junio C Hamano5-9/+43
"hash-object --literally" introduced in v2.2 was not prepared to take a really long object type name. * jc/hash-object: write_sha1_file(): do not use a separate sha1[] array t1007: add hash-object --literally tests hash-object --literally: fix buffer overrun with extra-long object type git-hash-object.txt: document --literally option
2015-05-11Merge branch 'sb/prefix-path-free-results'Libravatar Junio C Hamano2-13/+10
Code clean-up (not a leak-fix). * sb/prefix-path-free-results: prefix_path(): unconditionally free results in the callers
2015-05-11Merge branch 'sg/completion-no-redundant-all-command-list'Libravatar Junio C Hamano1-1/+0
Code simplification. * sg/completion-no-redundant-all-command-list: completion: remove redundant __git_compute_all_commands() call
2015-05-11Merge branch 'sg/complete-decorate-full-not-long'Libravatar Junio C Hamano1-1/+1
The completion for "log --decorate=" parameter value was incorrect. * sg/complete-decorate-full-not-long: completion: fix and update 'git log --decorate=' options
2015-05-11Merge branch 'jk/filter-branch-use-of-sed-on-incomplete-line'Libravatar Junio C Hamano2-1/+19
"filter-branch" corrupted commit log message that ends with an incomplete line on platforms with some "sed" implementations that munge such a line. Work it around by avoiding to use "sed". * jk/filter-branch-use-of-sed-on-incomplete-line: filter-branch: avoid passing commit message through sed
2015-05-11Merge branch 'jc/daemon-no-ipv6-for-2.4.1'Libravatar Junio C Hamano1-1/+1
"git daemon" fails to build from the source under NO_IPV6 configuration (regression in 2.4). * jc/daemon-no-ipv6-for-2.4.1: daemon: unbreak NO_IPV6 build regression
2015-05-11Merge branch 'jn/clean-use-error-not-fprintf-on-stderr'Libravatar Junio C Hamano1-2/+2
Some error messages in "git config" were emitted without calling the usual error() facility. * jn/clean-use-error-not-fprintf-on-stderr: config: use error() instead of fprintf(stderr, ...)
2015-05-11Merge branch 'tb/blame-resurrect-convert-to-git'Libravatar Junio C Hamano2-3/+16
Some time ago, "git blame" (incorrectly) lost the convert_to_git() call when synthesizing a fake "tip" commit that represents the state in the working tree, which broke folks who record the history with LF line ending to make their project portabile across platforms while terminating lines in their working tree files with CRLF for their platform. * tb/blame-resurrect-convert-to-git: blame: CRLF in the working tree and LF in the repo
2015-05-11Merge branch 'va/fix-git-p4-tests'Libravatar Junio C Hamano1-8/+3
* va/fix-git-p4-tests: git-p4: t9814: prevent --chain-lint failure
2015-05-11Merge branch 'ld/p4-case-fold'Libravatar Junio C Hamano2-1/+55
* ld/p4-case-fold: git-p4: add failing tests for case-folding p4d
2015-05-11Merge branch 'jk/rebase-quiet-noop'Libravatar Junio C Hamano1-1/+1
"git rebase --quiet" was not quite quiet when there is nothing to do. * jk/rebase-quiet-noop: rebase: silence "git checkout" for noop rebase
2015-05-11Merge branch 'va/p4-client-path'Libravatar Junio C Hamano2-4/+115
git p4 attempts to better handle branches in Perforce. * va/p4-client-path: git-p4: improve client path detection when branches are used t9801: check git-p4's branch detection with client spec enabled
2015-05-11Merge branch 'mm/add-p-split-error'Libravatar Junio C Hamano2-11/+59
When "add--interactive" splits a hunk into two overlapping hunks and then let the user choose only one, it sometimes feeds an incorrect patch text to "git apply". Add tests to demonstrate this. I have a slight suspicion that this may be $gmane/87202 coming back and biting us (I seem to have said "let's run with this and see what happens" back then). * mm/add-p-split-error: stash -p: demonstrate failure of split with mixed y/n t3904-stash-patch: factor PERL prereq at the top of the file t3904-stash-patch: fix test description add -p: demonstrate failure when running 'edit' after a split t3701-add-interactive: simplify code
2015-05-11Merge branch 'tb/t0027-crlf'Libravatar Junio C Hamano1-109/+134
More line-ending tests. * tb/t0027-crlf: t0027: Add repoMIX and LF_nul t0027: support NATIVE_CRLF platforms t0027: cleanup: rename functions; avoid non-leading TABs
2015-05-11Merge branch 'ls/p4-changes-block-size'Libravatar Junio C Hamano3-14/+119
"git p4" learned "--changes-block-size <n>" to read the changes in chunks from Perforce, instead of making one call to "p4 changes" that may trigger "too many rows scanned" error from Perforce. * ls/p4-changes-block-size: git-p4: use -m when running p4 changes
2015-05-11Merge branch 'jc/plug-fmt-merge-msg-leak'Libravatar Junio C Hamano1-5/+11
* jc/plug-fmt-merge-msg-leak: fmt-merge-msg: plug small leak of commit buffer
2015-05-11Merge branch 'nd/slim-index-pack-memory-usage'Libravatar Junio C Hamano1-111/+179
Memory usage of "git index-pack" has been trimmed by tens of per-cent. * nd/slim-index-pack-memory-usage: index-pack: kill union delta_base to save memory index-pack: reduce object_entry size to save memory
2015-05-11Merge branch 'jk/still-interesting'Libravatar Junio C Hamano1-4/+19
"git rev-list --objects $old --not --all" to see if everything that is reachable from $old is already connected to the existing refs was very inefficient. * jk/still-interesting: limit_list: avoid quadratic behavior from still_interesting
2015-05-11Merge branch 'jk/reading-packed-refs'Libravatar Junio C Hamano8-6/+77
An earlier rewrite to use strbuf_getwholeline() instead of fgets(3) to read packed-refs file revealed that the former is unacceptably inefficient. * jk/reading-packed-refs: t1430: add another refs-escape test read_packed_refs: avoid double-checking sane refs strbuf_getwholeline: use getdelim if it is available strbuf_getwholeline: avoid calling strbuf_grow strbuf_addch: avoid calling strbuf_grow config: use getc_unlocked when reading from file strbuf_getwholeline: use getc_unlocked git-compat-util: add fallbacks for unlocked stdio strbuf_getwholeline: use getc macro
2015-05-11Merge branch 'lm/squelch-bg-progress'Libravatar Junio C Hamano2-8/+22
Many long-running operations show progress eye-candy, even when they are later backgrounded. Hide the eye-candy when the process is sent to the background instead. * lm/squelch-bg-progress: compat/mingw: stubs for getpgid() and tcgetpgrp() progress: no progress in background
2015-05-11Merge branch 'jk/sha1-file-reduce-useless-warnings'Libravatar Junio C Hamano2-6/+2
* jk/sha1-file-reduce-useless-warnings: sha1_file: squelch "packfile cannot be accessed" warnings
2015-05-11Merge branch 'nd/multiple-work-trees'Libravatar Junio C Hamano52-250/+1391
A replacement for contrib/workdir/git-new-workdir that does not rely on symbolic links and make sharing of objects and refs safer by making the borrowee and borrowers aware of each other. * nd/multiple-work-trees: (41 commits) prune --worktrees: fix expire vs worktree existence condition t1501: fix test with split index t2026: fix broken &&-chain t2026 needs procondition SANITY git-checkout.txt: a note about multiple checkout support for submodules checkout: add --ignore-other-wortrees checkout: pass whole struct to parse_branchname_arg instead of individual flags git-common-dir: make "modules/" per-working-directory directory checkout: do not fail if target is an empty directory t2025: add a test to make sure grafts is working from a linked checkout checkout: don't require a work tree when checking out into a new one git_path(): keep "info/sparse-checkout" per work-tree count-objects: report unused files in $GIT_DIR/worktrees/... gc: support prune --worktrees gc: factor out gc.pruneexpire parsing code gc: style change -- no SP before closing parenthesis checkout: clean up half-prepared directories in --to mode checkout: reject if the branch is already checked out elsewhere prune: strategies for linked checkouts checkout: support checking out into a new working directory ...
2015-05-11Merge branch 'pt/credential-xdg'Libravatar Junio C Hamano3-29/+210
Tweak the sample "store" backend of the credential helper to honor XDG configuration file locations when specified. * pt/credential-xdg: t0302: "unreadable" test needs POSIXPERM t0302: test credential-store support for XDG_CONFIG_HOME git-credential-store: support XDG_CONFIG_HOME git-credential-store: support multiple credential files
2015-05-06path.c: remove home_config_paths()Libravatar Paul Tan2-29/+0
home_config_paths() combines distinct functionality already implemented by expand_user_path() and xdg_config_home(), and it also hard-codes the path ~/.gitconfig, which makes it unsuitable to use for other home config file paths. Since its use will just add unnecessary complexity to the code, remove it. Signed-off-by: Paul Tan <pyokagan@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-05-06git-config: replace use of home_config_paths()Libravatar Paul Tan2-8/+4
Since home_config_paths() combines distinct functionality already implemented by expand_user_path() and xdg_config_home(), and hides the home config file path ~/.gitconfig. Make the code more explicit by replacing the use of home_config_paths() with expand_user_path() and xdg_config_home(). Signed-off-by: Paul Tan <pyokagan@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-05-06git-commit: replace use of home_config_paths()Libravatar Paul Tan1-5/+3
Since home_config_paths() combines two distinct functionality already implemented by expand_user_path() and xdg_config_home(), and hides the home config file path ~/.gitconfig. Make the code more explicit by replacing the use of home_config_paths() with expand_user_path() and xdg_config_home(). Signed-off-by: Paul Tan <pyokagan@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-05-06credential-store.c: replace home_config_paths() with xdg_config_home()Libravatar Paul Tan1-1/+1
Since only the xdg credentials file path is required, and home_config_paths() is unable to construct the path ~/.git-credentials, simplify the code by replacing home_config_paths() with xdg_config_home(). Signed-off-by: Paul Tan <pyokagan@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-05-06dir.c: replace home_config_paths() with xdg_config_home()Libravatar Paul Tan1-5/+2
Since only the xdg excludes file path is required, simplify the code by replacing use of home_config_paths() with xdg_config_home(). Signed-off-by: Paul Tan <pyokagan@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-05-06attr.c: replace home_config_paths() with xdg_config_home()Libravatar Paul Tan1-5/+2
Since only the xdg attributes file path is required, simplify the code by using xdg_config_home() instead of home_config_paths(). Signed-off-by: Paul Tan <pyokagan@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-05-06path.c: implement xdg_config_home()Libravatar Paul Tan2-0/+22
The XDG base dir spec[1] specifies that configuration files be stored in a subdirectory in $XDG_CONFIG_HOME. To construct such a configuration file path, home_config_paths() can be used. However, home_config_paths() combines distinct functionality: 1. Retrieve the home git config file path ~/.gitconfig 2. Construct the XDG config path of the file specified by `file`. This function was introduced in commit 21cf3227 ("read (but not write) from $XDG_CONFIG_HOME/git/config file"). While the intention of the function was to allow the home directory configuration file path and the xdg directory configuration file path to be retrieved with one function call, the hard-coding of the path ~/.gitconfig prevents it from being used for other configuration files. Furthermore, retrieving a file path relative to the user's home directory can be done with expand_user_path(). Hence, it can be seen that home_config_paths() introduces unnecessary complexity, especially if a user just wants to retrieve the xdg config file path. As such, implement a simpler function xdg_config_home() for constructing the XDG base dir spec configuration file path. This function, together with expand_user_path(), can replace all uses of home_config_paths(). [1] http://standards.freedesktop.org/basedir-spec/basedir-spec-0.7.html Helped-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Paul Tan <pyokagan@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-05-05First batch for 2.5 cycleLibravatar Junio C Hamano3-2/+88
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-05-05Merge branch 'jk/prune-mtime'Libravatar Junio C Hamano3-9/+26
Access to objects in repositories that borrow from another one on a slow NFS server unnecessarily got more expensive due to recent code becoming more cautious in a naive way not to lose objects to pruning. * jk/prune-mtime: sha1_file: only freshen packs once per run sha1_file: freshen pack objects before loose reachable: only mark local objects as recent
2015-05-05Merge branch 'mm/usage-log-l-can-take-regex'Libravatar Junio C Hamano6-15/+16
Documentation fix. * mm/usage-log-l-can-take-regex: log -L: improve error message on malformed argument Documentation: change -L:<regex> to -L:<funcname>
2015-05-05Merge branch 'ep/fix-test-lib-functions-report'Libravatar Junio C Hamano1-2/+2
* ep/fix-test-lib-functions-report: test-lib-functions.sh: fix the second argument to some helper functions
2015-05-05Merge branch 'cn/bom-in-gitignore'Libravatar Junio C Hamano6-5/+39
Teach the codepaths that read .gitignore and .gitattributes files that these files encoded in UTF-8 may have UTF-8 BOM marker at the beginning; this makes it in line with what we do for configuration files already. * cn/bom-in-gitignore: attr: skip UTF8 BOM at the beginning of the input file config: use utf8_bom[] from utf.[ch] in git_parse_source() utf8-bom: introduce skip_utf8_bom() helper add_excludes_from_file: clarify the bom skipping logic dir: allow a BOM at the beginning of exclude files
2015-05-05Merge branch 'jc/epochtime-wo-tz'Libravatar Junio C Hamano1-5/+9
"git commit --date=now" or anything that relies on approxidate lost the daylight-saving-time offset. * jc/epochtime-wo-tz: parse_date_basic(): let the system handle DST conversion parse_date_basic(): return early when given a bogus timestamp
2015-05-05Merge branch 'nd/t1509-chroot-test'Libravatar Junio C Hamano1-9/+29
Correct test bitrot. * nd/t1509-chroot-test: t1509: update prepare script to be able to run t1509 in chroot again
2015-05-05Merge branch 'oh/fix-config-default-user-name-section'Libravatar Junio C Hamano1-2/+2
The default $HOME/.gitconfig file created upon "git config --global" that edits it had incorrectly spelled user.name and user.email entries in it. * oh/fix-config-default-user-name-section: config: fix settings in default_user_config template
2015-05-05Merge branch 'jk/type-from-string-gently'Libravatar Junio C Hamano2-1/+10
"git cat-file bl $blob" failed to barf even though there is no object type that is "bl". * jk/type-from-string-gently: type_from_string_gently: make sure length matches
2015-05-05Merge branch 'sb/test-bitmap-free-at-end'Libravatar Junio C Hamano1-0/+2
* sb/test-bitmap-free-at-end: pack-bitmap.c: fix a memleak
2015-05-05Merge branch 'ld/p4-filetype-detection'Libravatar Junio C Hamano2-6/+6
* ld/p4-filetype-detection: git-p4: fix filetype detection on files opened exclusively git-p4: small fix for locked-file-move-test git-p4: fix small bug in locked test scripts
2015-05-05Merge branch 'ts/checkout-advice-plural'Libravatar Junio C Hamano1-2/+9
* ts/checkout-advice-plural: checkout: call a single commit "it" intead of "them"
2015-05-05Merge branch 'jk/init-core-worktree-at-root'Libravatar Junio C Hamano1-3/+15
We avoid setting core.worktree when the repository location is the ".git" directory directly at the top level of the working tree, but the code misdetected the case in which the working tree is at the root level of the filesystem (which arguably is a silly thing to do, but still valid). * jk/init-core-worktree-at-root: init: don't set core.worktree when initializing /.git
2015-05-05Merge branch 'mh/show-branch-topic'Libravatar Junio C Hamano1-3/+3
"git show-branch --topics HEAD" (with no other arguments) did not do anything interesting. Instead, contrast the given revision against all the local branches by default. * mh/show-branch-topic: show-branch: show all local heads when only giving one rev along --topics
2015-05-05Merge branch 'sb/line-log-plug-pairdiff-leak'Libravatar Junio C Hamano1-0/+1
* sb/line-log-plug-pairdiff-leak: line-log.c: fix a memleak
2015-05-05Merge branch 'jc/diff-no-index-d-f'Libravatar Junio C Hamano2-2/+98
The usual "git diff" when seeing a file turning into a directory showed a patchset to remove the file and create all files in the directory, but "git diff --no-index" simply refused to work. Also, when asked to compare a file and a directory, imitate POSIX "diff" and compare the file with the file with the same name in the directory, instead of refusing to run. * jc/diff-no-index-d-f: diff-no-index: align D/F handling with that of normal Git diff-no-index: DWIM "diff D F" into "diff D/F F"
2015-05-05Merge branch 'bc/object-id'Libravatar Junio C Hamano18-145/+192
Identify parts of the code that knows that we use SHA-1 hash to name our objects too much, and use (1) symbolic constants instead of hardcoded 20 as byte count and/or (2) use struct object_id instead of unsigned char [20] for object names. * bc/object-id: apply: convert threeway_stage to object_id patch-id: convert to use struct object_id commit: convert parts to struct object_id diff: convert struct combine_diff_path to object_id bulk-checkin.c: convert to use struct object_id zip: use GIT_SHA1_HEXSZ for trailers archive.c: convert to use struct object_id bisect.c: convert leaf functions to use struct object_id define utility functions for object IDs define a structure for object IDs