summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2014-02-27Merge branch 'nd/submodule-pathspec-ending-with-slash'Libravatar Junio C Hamano22-76/+89
Allow "git cmd path/", when the 'path' is where a submodule is bound to the top-level working tree, to match 'path', despite the extra and unnecessary trailing slash. * nd/submodule-pathspec-ending-with-slash: clean: use cache_name_is_other() clean: replace match_pathspec() with dir_path_match() pathspec: pass directory indicator to match_pathspec_item() match_pathspec: match pathspec "foo/" against directory "foo" dir.c: prepare match_pathspec_item for taking more flags pathspec: rename match_pathspec_depth() to match_pathspec() pathspec: convert some match_pathspec_depth() to dir_path_match() pathspec: convert some match_pathspec_depth() to ce_path_match()
2014-02-27Merge branch 'bk/refresh-missing-ok-in-merge-recursive'Libravatar Junio C Hamano4-14/+70
Allow "merge-recursive" to work in an empty (temporary) working tree again when there are renames involved, correcting an old regression in 1.7.7 era. * bk/refresh-missing-ok-in-merge-recursive: merge-recursive.c: tolerate missing files while refreshing index read-cache.c: extend make_cache_entry refresh flag with options read-cache.c: refactor --ignore-missing implementation t3030-merge-recursive: test known breakage with empty work tree
2014-02-27Merge branch 'da/pull-ff-configuration'Libravatar Junio C Hamano3-1/+47
"git pull" learned to pay attention to pull.ff configuration variable. * da/pull-ff-configuration: pull: add --ff-only to the help text pull: add pull.ff configuration
2014-02-27Merge branch 'kb/fast-hashmap'Libravatar Junio C Hamano20-538/+1216
Improvements to our hash table to get it to meet the needs of the msysgit fscache project, with some nice performance improvements. * kb/fast-hashmap: name-hash: retire unused index_name_exists() hashmap.h: use 'unsigned int' for hash-codes everywhere test-hashmap.c: drop unnecessary #includes .gitignore: test-hashmap is a generated file read-cache.c: fix memory leaks caused by removed cache entries builtin/update-index.c: cleanup update_one fix 'git update-index --verbose --again' output remove old hash.[ch] implementation name-hash.c: remove cache entries instead of marking them CE_UNHASHED name-hash.c: use new hash map implementation for cache entries name-hash.c: remove unreferenced directory entries name-hash.c: use new hash map implementation for directories diffcore-rename.c: use new hash map implementation diffcore-rename.c: simplify finding exact renames diffcore-rename.c: move code around to prepare for the next patch buitin/describe.c: use new hash map implementation add a hashtable implementation that supports O(1) removal submodule: don't access the .gitmodules cache entry after removing it
2014-02-27Merge branch 'nv/commit-gpgsign-config'Libravatar Junio C Hamano7-5/+56
Introduce commit.gpgsign configuration variable to force every commit to be GPG signed. The variable cannot be overriden from the command line of some of the commands that create commits except for "git commit" and "git commit-tree", but I am not convinced that it is a good idea to sprinkle support for --no-gpg-sign everywhere, which in turn means that this configuration variable may not be such a good idea. * nv/commit-gpgsign-config: test the commit.gpgsign config option commit-tree: add and document --no-gpg-sign commit-tree: add the commit.gpgsign option to sign all commits
2014-02-24name-hash: retire unused index_name_exists()Libravatar Eric Sunshine2-10/+1
db5360f3f496 (name-hash: refactor polymorphic index_name_exists(); 2013-09-17) split index_name_exists() into index_file_exists() and index_dir_exists() but retained index_name_exists() as a thin wrapper to avoid disturbing possible in-flight topics. Since this change landed in 'master' some time ago and there are no in-flight topics referencing index_name_exists(), retire it. Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-02-24hashmap.h: use 'unsigned int' for hash-codes everywhereLibravatar Karsten Blees2-2/+2
Signed-off-by: Karsten Blees <blees@dcon.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-02-24test the commit.gpgsign config optionLibravatar Nicolas Vigier1-4/+21
The tests are checking that : - when commit.gpgsign is true, "git commit" creates signed commits - when commit.gpgsign is false, "git commit" creates unsigned commits - when commit.gpgsign is true, "git commit --no-gpg-sign" creates unsigned commits - when commit.gpgsign is true, "git rebase -f" creates signed commits Signed-off-by: Nicolas Vigier <boklm@mars-attacks.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-02-24commit-tree: add and document --no-gpg-signLibravatar Junio C Hamano3-0/+14
Document how to override commit.gpgsign configuration that is set to true per "git commit" invocation (parse-options machinery lets us say "--no-gpg-sign" to do so). "git commit-tree" does not use parse-options, so manually add the corresponding option for now. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-02-24commit-tree: add the commit.gpgsign option to sign all commitsLibravatar Nicolas Vigier4-1/+21
If you want to GPG sign all your commits, you have to add the -S option all the time. The commit.gpgsign config option allows to sign all commits automatically. Signed-off-by: Nicolas Vigier <boklm@mars-attacks.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-02-24clean: use cache_name_is_other()Libravatar Nguyễn Thái Ngọc Duy1-19/+2
cmd_clean() has the exact same code of index_name_is_other(). Reduce code duplication. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-02-24clean: replace match_pathspec() with dir_path_match()Libravatar Nguyễn Thái Ngọc Duy1-2/+1
This instance was left out when many match_pathspec() call sites that take input from dir_entry were converted to dir_path_match() because it passed a path with the trailing slash stripped out to match_pathspec() while the others did not. Stripping for all call sites back then would be a regression because match_pathspec() did not know how to match pathspec foo/ against _directory_ foo (the stripped version of path "foo/"). match_pathspec() knows how to do it now. And dir_path_match() strips the trailing slash also. Use the new function, because the stripping code is removed in the next patch. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-02-24pathspec: pass directory indicator to match_pathspec_item()Libravatar Nguyễn Thái Ngọc Duy6-9/+20
This patch activates the DO_MATCH_DIRECTORY code in m_p_i(), which makes "git diff HEAD submodule/" and "git diff HEAD submodule" produce the same output. Previously only the version without trailing slash returns the difference (if any). That's the effect of new ce_path_match(). dir_path_match() is not executed by the new tests. And it should not introduce regressions. Previously if path "dir/" is passed in with pathspec "dir/", they obviously match. With new dir_path_match(), the path becomes _directory_ "dir" vs pathspec "dir/", which is not executed by the old code path in m_p_i(). The new code path is executed and produces the same result. The other case is pathspec "dir" and path "dir/" is now turned to "dir" (with DO_MATCH_DIRECTORY). Still the same result before or after the patch. So why change? Because of the next patch about clean.c. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-02-24match_pathspec: match pathspec "foo/" against directory "foo"Libravatar Nguyễn Thái Ngọc Duy1-1/+6
Currently we do support matching pathspec "foo/" against directory "foo". That is because match_pathspec() has no way to tell "foo" is a directory and matching "foo/" against _file_ "foo" is wrong. The callers can now tell match_pathspec if "foo" is a directory, we could make an exception for this case. Code is not executed though because no callers pass the flag yet. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-02-24dir.c: prepare match_pathspec_item for taking more flagsLibravatar Nguyễn Thái Ngọc Duy1-6/+13
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-02-24pathspec: rename match_pathspec_depth() to match_pathspec()Libravatar Nguyễn Thái Ngọc Duy7-25/+27
A long time ago, for some reason I was not happy with match_pathspec(). I created a better version, match_pathspec_depth() that was suppose to replace match_pathspec() eventually. match_pathspec() has finally been gone since 6 months ago. Use the shorter name for match_pathspec_depth(). Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-02-24pathspec: convert some match_pathspec_depth() to dir_path_match()Libravatar Nguyễn Thái Ngọc Duy5-8/+12
This helps reduce the number of match_pathspec_depth() call sites and show how m_p_d() is used. And it usage is: - match against an index entry (ce_path_match or match_pathspec_depth in ls-files) - match against a dir_entry from read_directory (dir_path_match and match_pathspec_depth in clean.c, which will be converted later) - resolve-undo (rerere.c and ls-files.c) Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-02-24pathspec: convert some match_pathspec_depth() to ce_path_match()Libravatar Nguyễn Thái Ngọc Duy14-22/+24
This helps reduce the number of match_pathspec_depth() call sites and show how match_pathspec_depth() is used. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-02-24test-hashmap.c: drop unnecessary #includesLibravatar Jonathan Nieder1-2/+1
Per Documentation/CodingGuidelines most C files in git start with a #include of git-compat-util.h or another header file that includes it, such as cache.h or builtin.h. This file doesn't need anything beyond "git-compat-util.h", so use that. Remove a #include of the system header <stdio.h> since it is already included by "git-compat-util.h". Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-02-24.gitignore: test-hashmap is a generated fileLibravatar Jonathan Nieder1-0/+1
Prevent the "test-hashmap" program from being accidentally tracked with "git add" or cluttering "git status" output. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-02-24merge-recursive.c: tolerate missing files while refreshing indexLibravatar Brad King2-2/+3
Teach add_cacheinfo to tell make_cache_entry to skip refreshing stat information when a file is missing from the work tree. We do not want the index to be stat-dirty after the merge but also do not want to fail when a file happens to be missing. This fixes the 'merge-recursive w/ empty work tree - ours has rename' case in t3030-merge-recursive. Suggested-by: Elijah Newren <newren@gmail.com> Signed-off-by: Brad King <brad.king@kitware.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-02-24read-cache.c: extend make_cache_entry refresh flag with optionsLibravatar Brad King3-12/+16
Convert the make_cache_entry boolean 'refresh' argument to a more general 'refresh_options' argument. Pass the value through to the underlying refresh_cache_ent call. Add option CE_MATCH_REFRESH to enable stat refresh. Update call sites to use the new signature. Signed-off-by: Brad King <brad.king@kitware.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-02-24read-cache.c: refactor --ignore-missing implementationLibravatar Brad King2-3/+7
Move lstat ENOENT handling from refresh_index to refresh_cache_ent and activate it with a new CE_MATCH_IGNORE_MISSING option. This will allow other call paths into refresh_cache_ent to use the feature. Signed-off-by: Brad King <brad.king@kitware.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-02-24t3030-merge-recursive: test known breakage with empty work treeLibravatar Brad King1-0/+47
Sometimes when working with a large repository it can be useful to try out a merge and only check out conflicting files to disk (for example as a speed optimization on a server). Until v1.7.7-rc1~28^2~20 (merge-recursive: When we detect we can skip an update, actually skip it, 2011-08-11), it was possible to do so with the following idiom: # Prepare a temporary index and empty work tree. GIT_INDEX_FILE="$PWD/tmp-$$-index" && export GIT_INDEX_FILE && GIT_WORK_TREE="$PWD/tmp-$$-work" && export GIT_WORK_TREE && mkdir "$GIT_WORK_TREE" && # Convince the index that our side is on disk. git read-tree -i -m $ours && git update-index --ignore-missing --refresh && # Merge their side into our side. bases=$(git merge-base --all $ours $theirs) && git merge-recursive $bases -- $ours $theirs && tree=$(git write-tree) Nowadays, that still works and the exit status is the same, but merge-recursive produces a diagnostic if "our" side renamed a file: error: addinfo_cache failed for path 'dst' Add a test to document this regression. Signed-off-by: Brad King <brad.king@kitware.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-02-14Git 1.9.0Libravatar Junio C Hamano4-33/+11
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-02-14release notes: typo fixesLibravatar Michael J Gruber1-18/+18
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-02-13Sync with 1.8.5.5Libravatar Junio C Hamano3-2/+40
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-02-13Git 1.8.5.5Libravatar Junio C Hamano5-4/+42
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-02-13Merge branch 'bm/merge-base-octopus-dedup' into maintLibravatar Junio C Hamano2-6/+64
"git merge-base --octopus" used to leave cleaning up suboptimal result to the caller, but now it does the clean-up itself. * bm/merge-base-octopus-dedup: merge-base --octopus: reduce the result from get_octopus_merge_bases() merge-base: separate "--independent" codepath into its own helper
2014-02-13Merge branch 'jc/revision-range-unpeel' into maintLibravatar Junio C Hamano2-12/+33
"git log --left-right A...B" lost the "leftness" of commits reachable from A when A is a tag as a side effect of a recent bugfix. This is a regression in 1.8.4.x series. * jc/revision-range-unpeel: revision: propagate flag bits from tags to pointees revision: mark contents of an uninteresting tree uninteresting
2014-02-13Merge branch 'jk/allow-fetch-onelevel-refname' into maintLibravatar Junio C Hamano2-1/+12
"git clone" would fail to clone from a repository that has a ref directly under "refs/", e.g. "refs/stash", because different validation paths do different things on such a refname. Loosen the client side's validation to allow such a ref. * jk/allow-fetch-onelevel-refname: fetch-pack: do not filter out one-level refs
2014-02-13Merge branch 'jk/interpret-branch-name-fix' into maintLibravatar Junio C Hamano3-45/+124
A handful of bugs around interpreting $branch@{upstream} notation and its lookalike, when $branch part has interesting characters, e.g. "@", and ":", have been fixed. * jk/interpret-branch-name-fix: interpret_branch_name: find all possible @-marks interpret_branch_name: avoid @{upstream} past colon interpret_branch_name: always respect "namelen" parameter interpret_branch_name: rename "cp" variable to "at" interpret_branch_name: factor out upstream handling
2014-02-13Merge branch 'rk/send-email-ssl-cert' into maintLibravatar Junio C Hamano1-1/+2
A recent update to "git send-email" broke platforms where /etc/ssl/certs/ directory exists but cannot be used as SSL_ca_path (e.g. Fedora rawhide). * rk/send-email-ssl-cert: send-email: /etc/ssl/certs/ directory may not be usable as ca_path
2014-02-13Merge branch 'sb/repack-in-c' into maintLibravatar Junio C Hamano1-12/+12
"git repack --max-pack-size=8g" stopped being parsed correctly when the command was reimplemented in C. * sb/repack-in-c: repack: propagate pack-objects options as strings repack: make parsed string options const-correct repack: fix typo in max-pack-size option
2014-02-13Merge branch 'as/tree-walk-fix-aggressive-short-cut' into maintLibravatar Junio C Hamano2-1/+14
The pathspec matching code, while comparing two trees (e.g. "git diff A B -- path1 path2") was too aggressive and failed to match some paths when multiple pathspecs were involved. * as/tree-walk-fix-aggressive-short-cut: tree_entry_interesting: match against all pathspecs
2014-02-12Merge git://github.com/git-l10n/git-poLibravatar Junio C Hamano1-844/+966
* 'master' of git://github.com/git-l10n/git-po: l10n: de.po: correct message when hiding commits by craft l10n: de.po: translate 28 new messages
2014-02-12l10n: de.po: correct message when hiding commits by craftLibravatar Ralf Thielow1-1/+1
The recent translation was giving the idea that all commits based on a graft were meant to be hidden. Make it clear that it is the graft commit itself. Reported-by: David Kastrup <dak@gnu.org> Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
2014-02-12l10n: de.po: translate 28 new messagesLibravatar Ralf Thielow1-843/+965
Translate 28 new messages came from git.pot update in df49095 (l10n: git.pot: v1.9 round 1 (27 new, 11 removed) and d57b24b (l10n: git.pot: v1.9 round 2 (1 new)). Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
2014-02-11Merge git://github.com/git-l10n/git-poLibravatar Junio C Hamano5-139/+165
* 'master' of git://github.com/git-l10n/git-po: l10n: zh_CN.po: Disambiguation for rebase l10n: zh_CN.po: translate 1 new message (2211t0f0u) l10n: vi.po (2211t): Updated one new string l10n: Update Swedish translation (2211t0f0u) l10n: fr: 1.9rc2 2211t l10n: git.pot: v1.9 round 2 (1 new)
2014-02-07Git 1.9.0-rc3Libravatar Junio C Hamano1-1/+1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-02-07Merge branch 'ow/manpages-typofix'Libravatar Junio C Hamano6-7/+7
Various typofixes, all looked correct. * ow/manpages-typofix: Documentation: fix typos in man pages
2014-02-07Merge branch 'aj/ada-diff-word-pattern'Libravatar Junio C Hamano2-3/+3
* aj/ada-diff-word-pattern: userdiff: update Ada patterns
2014-02-07Merge branch 'nd/tag-doc'Libravatar Junio C Hamano1-2/+3
* nd/tag-doc: git-tag.txt: <commit> for --contains is optional
2014-02-06l10n: zh_CN.po: Disambiguation for rebaseLibravatar Jiang Xin1-28/+29
Disambiguate the Chinese translation for "rebase", and update other related entries. Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2014-02-05Documentation: fix typos in man pagesLibravatar Øystein Walle6-7/+7
Signed-off-by: Øystein Walle <oystwa@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-02-05Sync with 1.8.5.4Libravatar Junio C Hamano2-1/+50
2014-02-05howto/maintain-git.txt: new version numbering schemeLibravatar Junio C Hamano1-7/+11
We wanted to call the upcoming release "Git 1.9", with its maintenance track being "Git 1.9.1", "Git 1.9.2", etc., but various third-party tools are reported to assume that there are at least three dewey-decimal components in our version number. Adjust the plan so that vX.Y.0 are feature releases while vX.Y.Z (Z > 0) are maintenance releases. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-02-05Git 1.8.5.4Libravatar Junio C Hamano4-3/+52
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-02-05Merge branch 'jc/maint-pull-docfix' into maintLibravatar Junio C Hamano2-5/+8
The documentation to "git pull" hinted there is an "-m" option because it incorrectly shared the documentation with "git merge". * jc/maint-pull-docfix: Documentation: "git pull" does not have the "-m" option Documentation: exclude irrelevant options from "git pull"
2014-02-05Merge branch 'ow/stash-with-ifs' into maintLibravatar Junio C Hamano2-7/+19
The implementation of 'git stash $cmd "stash@{...}"' did not quote the stash argument properly and left it split at IFS whitespace. * ow/stash-with-ifs: stash: handle specifying stashes with $IFS