Junio C Hamano [Tue, 11 Sep 2012 18:41:35 +0000 (11:41 -0700)]
Second half of the fifth batch for 1.8.0
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Tue, 11 Sep 2012 18:36:25 +0000 (11:36 -0700)]
Merge branch 'rj/test-regex'
Git ships with a fall-back regexp implementation for platforms with
buggy regexp library; give people a tool to see if they should be
using it on their platform.
* rj/test-regex:
test-regex: Add a test to check for a bug in the regex routines
Junio C Hamano [Tue, 11 Sep 2012 18:36:18 +0000 (11:36 -0700)]
Merge branch 'jk/argv-array'
Use argv-array API in "git fetch" implementation.
* jk/argv-array:
submodule: use argv_array instead of hand-building arrays
fetch: use argv_array instead of hand-building arrays
argv-array: fix bogus cast when freeing array
argv-array: add pop function
Junio C Hamano [Tue, 11 Sep 2012 18:35:26 +0000 (11:35 -0700)]
Merge branch 'jc/merge-bases'
Optimise the "merge-base" computation a bit, and also update its
users that do not need the full merge-base information to call a
cheaper subset.
* jc/merge-bases:
reduce_heads(): reimplement on top of remove_redundant()
merge-base: "--is-ancestor A B"
get_merge_bases_many(): walk from many tips in parallel
in_merge_bases(): use paint_down_to_common()
merge_bases_many(): split out the logic to paint history
in_merge_bases(): omit unnecessary redundant common ancestor reduction
http-push: use in_merge_bases() for fast-forward check
receive-pack: use in_merge_bases() for fast-forward check
in_merge_bases(): support only one "other" commit
Junio C Hamano [Tue, 11 Sep 2012 18:35:22 +0000 (11:35 -0700)]
Merge branch 'nd/i18n-index-pack'
* nd/i18n-index-pack:
i18n: mark more index-pack strings for translation
Junio C Hamano [Tue, 11 Sep 2012 18:35:15 +0000 (11:35 -0700)]
Merge branch 'jc/maint-ident-missing-human-name'
"git show --format='%ci'" did not give timestamp correctly for
commits created without human readable name on "committer" line.
* jc/maint-ident-missing-human-name:
split_ident_line(): make best effort when parsing author/committer line
Junio C Hamano [Tue, 11 Sep 2012 18:31:26 +0000 (11:31 -0700)]
Sync with maint
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Tue, 11 Sep 2012 18:27:35 +0000 (11:27 -0700)]
Further merging down for 1.7.12.1
We will wait for a handful of other fixes that have graduated to the
'master' for 1.8.0 to be tested in the wild and then tag 1.7.12.1:
. mz/cherry-pick-cmdline-order
. jk/maint-quiet-is-synonym-to-s-in-log
. jk/maint-http-half-auth-push
. jc/apply-binary-p0
. jk/config-warn-on-inaccessible-paths
. kk/maint-for-each-ref-multi-sort
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Tue, 11 Sep 2012 18:23:45 +0000 (11:23 -0700)]
Sync with 1.7.11.6
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Tue, 11 Sep 2012 18:23:06 +0000 (11:23 -0700)]
Merge branch 'js/use-sc-open-max' into maint
* js/use-sc-open-max:
sha1_file.c: introduce get_max_fd_limit() helper
Junio C Hamano [Tue, 11 Sep 2012 18:22:58 +0000 (11:22 -0700)]
Merge branch 'js/no-curl-easy-strerror-on-old-curl' into maint
* js/no-curl-easy-strerror-on-old-curl:
http.c: don't use curl_easy_strerror prior to curl-7.12.0
Junio C Hamano [Tue, 11 Sep 2012 18:18:48 +0000 (11:18 -0700)]
Git 1.7.11.6
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Tue, 11 Sep 2012 18:10:23 +0000 (11:10 -0700)]
Merge branch 'jc/maint-mergetool-style-fix' into maint-1.7.11
* jc/maint-mergetool-style-fix:
mergetool: style fixes
Junio C Hamano [Tue, 11 Sep 2012 18:10:17 +0000 (11:10 -0700)]
Merge branch 'sz/submodule-force-update' into maint-1.7.11
* sz/submodule-force-update:
Make 'git submodule update --force' always check out submodules.
Junio C Hamano [Tue, 11 Sep 2012 18:10:12 +0000 (11:10 -0700)]
Merge branch 'ph/stash-rerere' into maint-1.7.11
* ph/stash-rerere:
stash: invoke rerere in case of conflict
test: git-stash conflict sets up rerere
Junio C Hamano [Tue, 11 Sep 2012 18:09:19 +0000 (11:09 -0700)]
Merge branch 'jc/maint-sane-execvp-notdir' into maint-1.7.11
* jc/maint-sane-execvp-notdir:
sane_execvp(): ignore non-directory on $PATH
Junio C Hamano [Tue, 11 Sep 2012 18:09:09 +0000 (11:09 -0700)]
Merge branch 'jc/maint-config-exit-status' into maint-1.7.11
* jc/maint-config-exit-status:
config: "git config baa" should exit with status 1
Junio C Hamano [Tue, 11 Sep 2012 18:09:01 +0000 (11:09 -0700)]
Merge branch 'mh/maint-config-doc-proxy-command' into maint-1.7.11
* mh/maint-config-doc-proxy-command:
git-config doc: unconfuse an example
git-config.txt: fix example
Junio C Hamano [Tue, 11 Sep 2012 18:08:55 +0000 (11:08 -0700)]
Merge branch 'hv/submodule-path-unmatch' into maint-1.7.11
* hv/submodule-path-unmatch:
Let submodule command exit with error status if path does not exist
Junio C Hamano [Tue, 11 Sep 2012 18:08:48 +0000 (11:08 -0700)]
Merge branch 'mz/empty-rebase-test' into maint-1.7.11
* mz/empty-rebase-test:
add tests for 'git rebase --keep-empty'
Junio C Hamano [Tue, 11 Sep 2012 18:08:40 +0000 (11:08 -0700)]
Merge branch 'jk/docs-docbook-monospace-display' into maint-1.7.11
* jk/docs-docbook-monospace-display:
docs: monospace listings in docbook output
Junio C Hamano [Tue, 11 Sep 2012 18:08:30 +0000 (11:08 -0700)]
Merge branch 'ab/diff-write-incomplete-line' into maint-1.7.11
* ab/diff-write-incomplete-line:
Fix '\ No newline...' annotation in rewrite diffs
Junio C Hamano [Tue, 11 Sep 2012 18:08:18 +0000 (11:08 -0700)]
Merge branch 'jc/maint-t7406-rev-parse-max-count-huh' into maint-1.7.11
* jc/maint-t7406-rev-parse-max-count-huh:
t7406: fix misleading "rev-parse --max-count=1 HEAD"
Junio C Hamano [Tue, 11 Sep 2012 18:07:14 +0000 (11:07 -0700)]
Merge branch 'rr/precompose-utf8-cleanup' into maint
* rr/precompose-utf8-cleanup:
precompose-utf8: do not call checks for non-ascii "utf8"
cleanup precompose_utf8
Junio C Hamano [Tue, 11 Sep 2012 18:06:45 +0000 (11:06 -0700)]
Merge branch 'jc/capabilities' into maint
* jc/capabilities:
fetch-pack: mention server version with verbose output
parse_feature_request: make it easier to see feature values
fetch-pack: do not ask for unadvertised capabilities
do not send client agent unless server does first
send-pack: fix capability-sending logic
include agent identifier in capability string
Junio C Hamano [Tue, 11 Sep 2012 18:06:19 +0000 (11:06 -0700)]
Merge branch 'jc/doc-git-updates' into maint
* jc/doc-git-updates:
Documentation: update the introductory section
Junio C Hamano [Tue, 11 Sep 2012 18:06:14 +0000 (11:06 -0700)]
Merge branch 'jk/check-docs-update' into maint
* jk/check-docs-update:
check-docs: get documented command list from Makefile
check-docs: drop git-help special-case
check-docs: list git-gui as a command
check-docs: factor out command-list
command-list: mention git-credential-* helpers
command-list: add git-sh-i18n
check-docs: update non-command documentation list
check-docs: mention gitweb specially
Junio C Hamano [Tue, 11 Sep 2012 17:53:40 +0000 (10:53 -0700)]
Merge branch 'tr/void-diff-setup-done' into maint-1.7.11
* tr/void-diff-setup-done:
diff_setup_done(): return void
Junio C Hamano [Tue, 11 Sep 2012 17:53:31 +0000 (10:53 -0700)]
Merge branch 'tr/merge-recursive-flush' into maint-1.7.11
* tr/merge-recursive-flush:
merge-recursive: eliminate flush_buffer() in favor of write_in_full()
Junio C Hamano [Tue, 11 Sep 2012 17:53:21 +0000 (10:53 -0700)]
Merge branch 'nd/index-errno' into maint-1.7.11
* nd/index-errno:
read_index_from: remove bogus errno assignments
Junio C Hamano [Tue, 11 Sep 2012 17:53:11 +0000 (10:53 -0700)]
Merge branch 'pg/maint-apply-remove-unused-variable' into maint-1.7.11
* pg/maint-apply-remove-unused-variable:
apply: delete unused deflate_origlen from patch struct
Junio C Hamano [Tue, 11 Sep 2012 17:51:58 +0000 (10:51 -0700)]
Merge branch 'jc/test-prereq' into maint
* jc/test-prereq:
t3910: use the UTF8_NFD_TO_NFC test prereq
test-lib: provide UTF8 behaviour as a prerequisite
t0050: use the SYMLINKS test prereq
t0050: use the CASE_INSENSITIVE_FS test prereq
test-lib: provide case insensitivity as a prerequisite
test: allow prerequisite to be evaluated lazily
test: rename $satisfied to $satisfied_prereq
Junio C Hamano [Mon, 10 Sep 2012 22:52:21 +0000 (15:52 -0700)]
First half of the fifth batch for 1.8.0
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 10 Sep 2012 22:43:07 +0000 (15:43 -0700)]
Merge branch 'cn/branch-set-upstream-to'
"git branch --set-upstream origin/master" is a common mistake to
create a local branch 'origin/master' and set it to integrate with
the current branch. With a plan to deprecate this option, introduce
"git branch (-u|--set-upstream-to) origin/master" that sets the
current branch to integrate with 'origin/master' remote tracking
branch.
* cn/branch-set-upstream-to:
branch: deprecate --set-upstream and show help if we detect possible mistaken use
branch: add --unset-upstream option
branch: introduce --set-upstream-to
Junio C Hamano [Mon, 10 Sep 2012 22:42:54 +0000 (15:42 -0700)]
Merge branch 'mz/cherry-pick-cmdline-order'
"git cherry-pick A C B" used to replay changes in A and then B and
then C if these three commits had committer timestamps in that
order, which is not what the user who said "A C B" naturally expects.
* mz/cherry-pick-cmdline-order:
cherry-pick/revert: respect order of revisions to pick
demonstrate broken 'git cherry-pick three one two'
teach log --no-walk=unsorted, which avoids sorting
Junio C Hamano [Mon, 10 Sep 2012 22:42:48 +0000 (15:42 -0700)]
Merge branch 'jk/maint-quiet-is-synonym-to-s-in-log'
We tried to bend backwards to allow "--quiet" to be a synonym as
"-s" when given as e.g. "git show --quiet", but did not quite
succeed.
* jk/maint-quiet-is-synonym-to-s-in-log:
log: fix --quiet synonym for -s
Junio C Hamano [Mon, 10 Sep 2012 22:42:30 +0000 (15:42 -0700)]
Merge branch 'ph/credential-gnome-keyring'
* ph/credential-gnome-keyring:
contrib: add credential helper for GnomeKeyring
Junio C Hamano [Mon, 10 Sep 2012 22:41:14 +0000 (15:41 -0700)]
Cull items fixed in maintenance branches
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 10 Sep 2012 22:40:07 +0000 (15:40 -0700)]
Sync with "almost" 1.7.12.1
Junio C Hamano [Mon, 10 Sep 2012 22:39:15 +0000 (15:39 -0700)]
Start preparing for 1.7.12.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 10 Sep 2012 22:37:37 +0000 (15:37 -0700)]
Merge branch 'bc/prune-info' into maint
"git prune" without "-v" used to warn about leftover temporary
files (which is an indication of an earlier aborted operation).
* bc/prune-info:
prune.c: only print informational message in show_only or verbose mode
Junio C Hamano [Mon, 10 Sep 2012 22:31:06 +0000 (15:31 -0700)]
Merge branch 'maint-1.7.11' into maint
* maint-1.7.11:
Almost 1.7.11.6
gitweb: URL-decode $my_url/$my_uri when stripping PATH_INFO
rebase -i: use full onto sha1 in reflog
sh-setup: protect from exported IFS
receive-pack: do not leak output from auto-gc to standard output
t/t5400: demonstrate breakage caused by informational message from prune
setup: clarify error messages for file/revisions ambiguity
send-email: improve RFC2047 quote parsing
fsck: detect null sha1 in tree entries
do not write null sha1s to on-disk index
diff: do not use null sha1 as a sentinel value
Junio C Hamano [Mon, 10 Sep 2012 22:30:46 +0000 (15:30 -0700)]
Almost 1.7.11.6
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 10 Sep 2012 22:26:03 +0000 (15:26 -0700)]
Merge branch 'mg/rebase-i-onto-reflog-in-full' into maint-1.7.11
The reflog entries left by "git rebase" and "git rebase -i" were
inconsistent (the interactive one gave an abbreviated object name).
* mg/rebase-i-onto-reflog-in-full:
rebase -i: use full onto sha1 in reflog
Junio C Hamano [Mon, 10 Sep 2012 22:25:45 +0000 (15:25 -0700)]
Merge branch 'jc/maint-protect-sh-from-ifs' into maint-1.7.11
When the user exports a non-default IFS without HT, scripts that
rely on being able to parse "ls-files -s | while read a b c..."
start to fail. Protect them from such a misconfiguration.
* jc/maint-protect-sh-from-ifs:
sh-setup: protect from exported IFS
Junio C Hamano [Mon, 10 Sep 2012 22:25:09 +0000 (15:25 -0700)]
Merge branch 'bc/receive-pack-stdout-protection' into maint-1.7.11
When "git push" triggered the automatic gc on the receiving end, a
message from "git prune" that said it was removing cruft leaked to
the standard output, breaking the communication protocol.
* bc/receive-pack-stdout-protection:
receive-pack: do not leak output from auto-gc to standard output
t/t5400: demonstrate breakage caused by informational message from prune
Junio C Hamano [Mon, 10 Sep 2012 22:24:53 +0000 (15:24 -0700)]
Merge branch 'jk/maint-null-in-trees' into maint-1.7.11
"git diff" had a confusion between taking data from a path in the
working tree and taking data from an object that happens to have
name 0{40} recorded in a tree.
* jk/maint-null-in-trees:
fsck: detect null sha1 in tree entries
do not write null sha1s to on-disk index
diff: do not use null sha1 as a sentinel value
Junio C Hamano [Mon, 10 Sep 2012 22:24:40 +0000 (15:24 -0700)]
Merge branch 'tr/maint-send-email-2047' into maint-1.7.11
"git send-email" did not unquote encoded words that appear on the
header correctly, and lost "_" from strings.
* tr/maint-send-email-2047:
send-email: improve RFC2047 quote parsing
Junio C Hamano [Mon, 10 Sep 2012 22:24:21 +0000 (15:24 -0700)]
Merge branch 'mm/die-with-dashdash-help' into maint-1.7.11
When the user gives an argument that can be taken as both a
revision name and a pathname without disambiguating with "--", we
used to give a help message "Use '--' to separate". The message
has been clarified to show where that '--' goes on the command
line.
* mm/die-with-dashdash-help:
setup: clarify error messages for file/revisions ambiguity
Junio C Hamano [Mon, 10 Sep 2012 22:23:46 +0000 (15:23 -0700)]
Merge branch 'js/gitweb-path-info-unquote' into maint-1.7.11
"gitweb" when used with PATH_INFO failed to notice directories with
SP (and other characters that need URL-style quoting) in them.
* js/gitweb-path-info-unquote:
gitweb: URL-decode $my_url/$my_uri when stripping PATH_INFO
Junio C Hamano [Fri, 7 Sep 2012 18:25:22 +0000 (11:25 -0700)]
The fourth batch for 1.8.0
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Fri, 7 Sep 2012 18:10:02 +0000 (11:10 -0700)]
Merge branch 'nd/branch-v-alignment'
Output from "git branch -v" contains "(no branch)" that could be
localized, but the code to align it along with the names of branches
were counting in bytes, not in display columns.
* nd/branch-v-alignment:
branch -v: align even when branch names are in UTF-8
Junio C Hamano [Fri, 7 Sep 2012 18:09:49 +0000 (11:09 -0700)]
Merge branch 'jk/maint-http-half-auth-push'
Pushing to smart HTTP server with recent Git fails without having
the username in the URL to force authentication, if the server is
configured to allow GET anonymously, while requiring authentication
for POST.
* jk/maint-http-half-auth-push:
http: prompt for credentials on failed POST
http: factor out http error code handling
t: test http access to "half-auth" repositories
t: test basic smart-http authentication
t/lib-httpd: recognize */smart/* repos as smart-http
t/lib-httpd: only route auth/dumb to dumb repos
t5550: factor out http auth setup
t5550: put auth-required repo in auth/dumb
Junio C Hamano [Fri, 7 Sep 2012 18:09:36 +0000 (11:09 -0700)]
Merge branch 'jc/maint-doc-checkout-b-always-takes-branch-name'
The synopsis said "checkout [-B branch]" to make it clear the branch
name is a parameter to the option, but the heading for the option
description was "-B::", not "-B branch::", making the documentation
misleading. There may be room in documentation pages of other
commands for similar improvements.
* jc/maint-doc-checkout-b-always-takes-branch-name:
doc: "git checkout -b/-B/--orphan" always takes a branch name
Junio C Hamano [Fri, 7 Sep 2012 18:09:26 +0000 (11:09 -0700)]
Merge branch 'jc/apply-binary-p0'
"git apply -p0" did not parse pathnames on "diff --git" line
correctly. This caused patches that had pathnames in no other
places to be mistakenly rejected (most notably, binary patch that
does not rename nor change mode). Textual patches, renames or
mode changes have preimage and postimage pathnames in different
places in a form that can be parsed unambiguously and did not suffer
from this problem.
* jc/apply-binary-p0:
apply: compute patch->def_name correctly under -p0
Junio C Hamano [Fri, 7 Sep 2012 18:09:18 +0000 (11:09 -0700)]
Merge branch 'jc/dotdot-is-parent-directory'
"git log .." errored out saying it is both rev range and a path when
there is no disambiguating "--" is on the command line. Update the
command line parser to interpret ".." as a path in such a case.
* jc/dotdot-is-parent-directory:
specifying ranges: we did not mean to make ".." an empty set
Junio C Hamano [Fri, 7 Sep 2012 18:09:09 +0000 (11:09 -0700)]
Merge branch 'nd/i18n-parseopt-help'
A lot of i18n mark-up for the help text from "git <cmd> -h".
* nd/i18n-parseopt-help: (66 commits)
Use imperative form in help usage to describe an action
Reduce translations by using same terminologies
i18n: write-tree: mark parseopt strings for translation
i18n: verify-tag: mark parseopt strings for translation
i18n: verify-pack: mark parseopt strings for translation
i18n: update-server-info: mark parseopt strings for translation
i18n: update-ref: mark parseopt strings for translation
i18n: update-index: mark parseopt strings for translation
i18n: tag: mark parseopt strings for translation
i18n: symbolic-ref: mark parseopt strings for translation
i18n: show-ref: mark parseopt strings for translation
i18n: show-branch: mark parseopt strings for translation
i18n: shortlog: mark parseopt strings for translation
i18n: rm: mark parseopt strings for translation
i18n: revert, cherry-pick: mark parseopt strings for translation
i18n: rev-parse: mark parseopt strings for translation
i18n: reset: mark parseopt strings for translation
i18n: rerere: mark parseopt strings for translation
i18n: status: mark parseopt strings for translation
i18n: replace: mark parseopt strings for translation
...
Junio C Hamano [Fri, 7 Sep 2012 18:09:04 +0000 (11:09 -0700)]
Merge branch 'nd/am-i18n-fix'
"git am" wasn't marked up for i18n properly.
* nd/am-i18n-fix:
am: quote string for translation before passing to eval_gettextln
Junio C Hamano [Fri, 7 Sep 2012 18:08:56 +0000 (11:08 -0700)]
Merge branch 'jk/config-warn-on-inaccessible-paths'
When looking for $HOME/.gitconfig etc., it is OK if we cannot read
them because they do not exist, but we did not diagnose existing
files that we cannot read.
* jk/config-warn-on-inaccessible-paths:
warn_on_inaccessible(): a helper to warn on inaccessible paths
attr: warn on inaccessible attribute files
gitignore: report access errors of exclude files
config: warn on inaccessible files
Junio C Hamano [Fri, 7 Sep 2012 18:08:50 +0000 (11:08 -0700)]
Merge branch 'kk/maint-for-each-ref-multi-sort'
"git for-each-ref" did not currectly support more than one --sort
option.
* kk/maint-for-each-ref-multi-sort:
for-each-ref: Fix sort with multiple keys
t6300: test sort with multiple keys
Junio C Hamano [Fri, 7 Sep 2012 18:08:38 +0000 (11:08 -0700)]
Merge branch 'lt/commit-tree-guess-utf-8'
Teach "git commit" and "git commit-tree" the "we are told to use
utf-8 in log message, but this does not look like utf-8---attempt to
pass it through convert-from-latin1-to-utf8 and see if it makes
sense" heuristics "git mailinfo" already uses.
* lt/commit-tree-guess-utf-8:
commit/commit-tree: correct latin1 to utf-8
Junio C Hamano [Fri, 7 Sep 2012 18:08:27 +0000 (11:08 -0700)]
Merge branch 'pw/p4-use-client-spec-branch-detection'
Fix "git p4" when "--use-client-spec" and "--detect-branches" are
used together (the command used to misdetect branches).
* pw/p4-use-client-spec-branch-detection:
git p4: make branch detection work with --use-client-spec
git p4: do wildcard decoding in stripRepoPath
git p4: set self.branchPrefixes in initialization
git p4 test: add broken --use-client-spec --detect-branches tests
git p4 test: move client_view() function to library
Junio C Hamano [Fri, 7 Sep 2012 18:08:10 +0000 (11:08 -0700)]
Merge branch 'tr/maint-parseopt-avoid-empty'
A workaround to avoid doing _(""), which translates to unwanted
magic string in the .po files.
* tr/maint-parseopt-avoid-empty:
gettext: do not translate empty string
Junio C Hamano [Fri, 7 Sep 2012 18:07:59 +0000 (11:07 -0700)]
Merge branch 'nd/i18n-poison-test-updates'
Update tests that can be broken with gettext-poison builds.
* nd/i18n-poison-test-updates:
Fix tests under GETTEXT_POISON on parseopt
Fix tests under GETTEXT_POISON on git-remote
Fix tests under GETTEXT_POISON on pack-object
Fix tests under GETTEXT_POISON on git-apply
Fix tests under GETTEXT_POISON on diffstat
Fix tests under GETTEXT_POISON on git-stash
Fix tests under GETTEXT_POISON on relative dates
Junio C Hamano [Mon, 3 Sep 2012 23:24:23 +0000 (16:24 -0700)]
Update mailmap for a handful of folks
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 3 Sep 2012 23:23:44 +0000 (16:23 -0700)]
The third batch for 1.8.0
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 3 Sep 2012 22:54:41 +0000 (15:54 -0700)]
Merge branch 'js/use-sc-open-max'
Introduce get_max_fd_limit() to absorb platforms that do not have
getrlimit(RLIMIT_NOFILE) and/or sysconf(_SC_OPEN_MAX).
* js/use-sc-open-max:
sha1_file.c: introduce get_max_fd_limit() helper
Junio C Hamano [Mon, 3 Sep 2012 22:54:37 +0000 (15:54 -0700)]
Merge branch 'js/compat-mkdir'
Some mkdir(2) implementations do not want to see trailing slash in
its parameter.
* js/compat-mkdir:
compat: some mkdir() do not like a slash at the end
Junio C Hamano [Mon, 3 Sep 2012 22:54:30 +0000 (15:54 -0700)]
Merge branch 'js/no-curl-easy-strerror-on-old-curl'
Done to support compilation on __TANDEM, but is independently useful
for people with older version of libcURL.
* js/no-curl-easy-strerror-on-old-curl:
http.c: don't use curl_easy_strerror prior to curl-7.12.0
Junio C Hamano [Mon, 3 Sep 2012 22:54:25 +0000 (15:54 -0700)]
Merge branch 'jc/maint-mergetool-style-fix'
* jc/maint-mergetool-style-fix:
mergetool: style fixes
Junio C Hamano [Mon, 3 Sep 2012 22:54:17 +0000 (15:54 -0700)]
Merge branch 'sz/submodule-force-update'
"git submodule update --force" used to leave the working tree of the
submodule intact when there were local changes. It is more intiutive
to make "--force" a sign to run "checkout -f" to overwrite them.
* sz/submodule-force-update:
Make 'git submodule update --force' always check out submodules.
Junio C Hamano [Mon, 3 Sep 2012 22:54:12 +0000 (15:54 -0700)]
Merge branch 'ph/stash-rerere'
"git stash" internally used "git merge-recursive" backend, which did
not trigger "rerere" upon conflicts unlike other mergy operations.
* ph/stash-rerere:
stash: invoke rerere in case of conflict
test: git-stash conflict sets up rerere
Junio C Hamano [Mon, 3 Sep 2012 22:54:03 +0000 (15:54 -0700)]
Merge branch 'jc/daemon-access-hook'
Allow an external command to tell git-daemon to decline service
based on the client address, repository path, etc.
* jc/daemon-access-hook:
daemon: --access-hook option
Junio C Hamano [Mon, 3 Sep 2012 22:53:54 +0000 (15:53 -0700)]
Merge branch 'jc/send-email-reconfirm'
Validate interactive input to "git send-email" to avoid common
mistakes such as saying "y<RETURN>" to sender mail address whose
prompt is given with a correctly guessed default.
* jc/send-email-reconfirm:
send-email: validate & reconfirm interactive responses
Junio C Hamano [Mon, 3 Sep 2012 22:53:37 +0000 (15:53 -0700)]
Merge branch 'cw/cherry-pick-allow-empty-message'
"git cherry-pick" by default stops when it sees a commit without any
log message. The "--allow-empty-message" option can be used to
silently proceed.
* cw/cherry-pick-allow-empty-message:
cherry-pick: add --allow-empty-message option
Junio C Hamano [Mon, 3 Sep 2012 22:53:26 +0000 (15:53 -0700)]
Merge branch 'jc/maint-sane-execvp-notdir'
"git foo" errored out with "Not a directory" when the user had a non
directory on $PATH, and worse yet it masked an alias "foo" to run.
* jc/maint-sane-execvp-notdir:
sane_execvp(): ignore non-directory on $PATH
Junio C Hamano [Mon, 3 Sep 2012 22:53:06 +0000 (15:53 -0700)]
Merge branch 'jc/maint-config-exit-status'
The exit status code from "git config" was way overspecified while
being incorrect. Update the implementation to give the documented
status for a case that was documented, and introduce a new code for
"all other errors".
* jc/maint-config-exit-status:
config: "git config baa" should exit with status 1
Jens Lehmann [Sat, 1 Sep 2012 15:27:06 +0000 (17:27 +0200)]
submodule: use argv_array instead of hand-building arrays
fetch_populated_submodules() allocates the full argv array it uses to
recurse into the submodules from the number of given options plus the six
argv values it is going to add. It then initializes it with those values
which won't change during the iteration and copies the given options into
it. Inside the loop the two argv values different for each submodule get
replaced with those currently valid.
However, this technique is brittle and error-prone (as the comment to
explain the magic number 6 indicates), so let's replace it with an
argv_array. Instead of replacing the argv values, push them to the
argv_array just before the run_command() call (including the option
separating them) and pop them from the argv_array right after that.
Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King [Sat, 1 Sep 2012 11:27:35 +0000 (07:27 -0400)]
fetch: use argv_array instead of hand-building arrays
Fetch invokes itself recursively when recursing into
submodules or handling "fetch --multiple". In both cases, it
builds the child's command line by pushing options onto a
statically-sized array. In both cases, the array is
currently just big enough to handle the largest possible
case. However, this technique is brittle and error-prone, so
let's replace it with a dynamic argv_array.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King [Sat, 1 Sep 2012 11:34:09 +0000 (07:34 -0400)]
argv-array: fix bogus cast when freeing array
Since the array struct stores a "const char **" argv member
(for compatibility with most of our argv-taking functions),
we have to cast away the const-ness when freeing its
elements.
However, we used the wrong type when doing so. It doesn't
make a difference since free() take a void pointer anyway,
but it can be slightly confusing to a reader.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King [Sat, 1 Sep 2012 11:25:27 +0000 (07:25 -0400)]
argv-array: add pop function
Sometimes we build a set of similar command lines, differing
only in the final arguments (e.g., "fetch --multiple"). To
use argv_array for this, you have to either push the same
set of elements repeatedly, or break the abstraction by
manually manipulating the array's internal members.
Instead, let's provide a sanctioned "pop" function to remove
elements from the end.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Ramsay Jones [Sat, 1 Sep 2012 17:46:54 +0000 (18:46 +0100)]
test-regex: Add a test to check for a bug in the regex routines
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Fri, 31 Aug 2012 21:54:18 +0000 (14:54 -0700)]
split_ident_line(): make best effort when parsing author/committer line
Commits made by ancient version of Git allowed committer without
human readable name, like this (
00213b17c in the kernel history):
tree
6947dba41f8b0e7fe7bccd41a4840d6de6a27079
parent
352dd1df32e672be4cff71132eb9c06a257872fe
author Petr Baudis <pasky@ucw.cz>
1135223044 +0100
committer <sam@mars.ravnborg.org>
1136151043 +0100
kconfig: Remove support for lxdialog --checklist
...
Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
When fed such a commit, --format='%ci' fails to parse it, and gives
back an empty string. Update the split_ident_line() to be a bit
more lenient when parsing, but make sure the caller that wants to
pick up sane value from its return value does its own validation.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Nguyễn Thái Ngọc Duy [Fri, 31 Aug 2012 12:13:04 +0000 (19:13 +0700)]
i18n: mark more index-pack strings for translation
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Fri, 31 Aug 2012 06:20:40 +0000 (23:20 -0700)]
reduce_heads(): reimplement on top of remove_redundant()
This is used by "git merge" and "git merge-base --independent" but
used to use a similar N*(N-1) traversals to reject commits that are
ancestors of other commits.
Reimplement it on top of remove_redundant(). Note that the callers
of this function are allowed to pass the same commit more than once,
but remove_redundant() is designed to be fed each commit only once.
The function removes duplicates before calling remove_redundant().
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Thu, 30 Aug 2012 21:52:20 +0000 (14:52 -0700)]
merge-base: "--is-ancestor A B"
In many scripted Porcelain commands, we find this idiom:
if test "$(git rev-parse --verify A)" = "$(git merge-base A B)"
then
... A is an ancestor of B ...
fi
But you do not have to compute exact merge-base only to see if A is
an ancestor of B. Give them a more direct way to use the underlying
machinery.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Thu, 30 Aug 2012 22:35:39 +0000 (15:35 -0700)]
get_merge_bases_many(): walk from many tips in parallel
The get_merge_bases_many() function reduces the result returned by
the merge_bases_many() function, which is a set of possible merge
bases, by excluding commits that can be reached from other commits.
We used to do N*(N-1) traversals for this, but we can check if one
commit reaches which other (N-1) commits by a single traversal, and
repeat it for all the candidates to find the answer.
Introduce remove_redundant() helper function to do this painting; we
should be able to use it to reimplement reduce_heads() as well.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Thu, 30 Aug 2012 22:04:13 +0000 (15:04 -0700)]
in_merge_bases(): use paint_down_to_common()
With paint_down_to_common(), we can tell if "commit" is reachable
from "reference" by simply looking at its object flag, instead of
iterating over the merge bases.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Thu, 30 Aug 2012 21:39:03 +0000 (14:39 -0700)]
merge_bases_many(): split out the logic to paint history
Introduce a new helper function paint_down_to_common() that takes
the same parameters as merge_bases_many(), but without the first
optimization of not painting anything when "one" is one of the
"twos" (or vice versa), and the last clean-up of removing the common
ancestor that is known to be an ancestor of another common one.
This way, the caller of the new function could tell if "one" is
reachable from any of the "twos" by simply looking at the flag bits
of "one". If (and only if) it is painted in PARENT2, it is
reachable from one of the "twos".
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Martin von Zweigbergk [Wed, 29 Aug 2012 06:15:56 +0000 (23:15 -0700)]
cherry-pick/revert: respect order of revisions to pick
When giving multiple individual revisions to cherry-pick or revert, as
in 'git cherry-pick A B' or 'git revert B A', one would expect them to
be picked/reverted in the order given on the command line. They are
instead ordered by their commit timestamp -- in chronological order
for "cherry-pick" and in reverse chronological order for
"revert". This matches the order in which one would usually give them
on the command line, making this bug somewhat hard to notice. Still,
it has been reported at least once before [1].
It seems like the chronological sorting happened by accident because
the revision walker has traditionally always sorted commits in reverse
chronological order when rev_info.no_walk was enabled. In the case of
'git revert B A' where B is newer than A, this sorting is a no-op. For
'git cherry-pick A B', the sorting would reverse the arguments, but
because the sequencer also flips the rev_info.reverse flag when
picking (as opposed to reverting), the end result is a chronological
order. The rev_info.reverse flag was probably flipped so that the
revision walker emits B before C in 'git cherry-pick A..C'; that it
happened to effectively undo the unexpected sorting done when not
walking, was probably a coincidence that allowed this bug to happen at
all.
Fix the bug by telling the revision walker not to sort the commits
when not walking. The only case we want to reverse the order is now
when cherry-picking and walking revisions (rev_info.no_walk = 0).
[1] http://thread.gmane.org/gmane.comp.version-control.git/164794
Signed-off-by: Martin von Zweigbergk <martinvonz@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Martin von Zweigbergk [Wed, 29 Aug 2012 06:15:55 +0000 (23:15 -0700)]
demonstrate broken 'git cherry-pick three one two'
Cherry-picking commits out of order (w.r.t. commit time stamp) doesn't
currently work. Add a test case to demonstrate it.
Signed-off-by: Martin von Zweigbergk <martinvonz@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Martin von Zweigbergk [Wed, 29 Aug 2012 06:15:54 +0000 (23:15 -0700)]
teach log --no-walk=unsorted, which avoids sorting
When 'git log' is passed the --no-walk option, no revision walk takes
place, naturally. Perhaps somewhat surprisingly, however, the provided
revisions still get sorted by commit date. So e.g 'git log --no-walk
HEAD HEAD~1' and 'git log --no-walk HEAD~1 HEAD' give the same result
(unless the two revisions share the commit date, in which case they
will retain the order given on the command line). As the commit that
introduced --no-walk (
8e64006 (Teach revision machinery about
--no-walk, 2007-07-24)) points out, the sorting is intentional, to
allow things like
git log --abbrev-commit --pretty=oneline --decorate --all --no-walk
to show all refs in order by commit date.
But there are also other cases where the sorting is not wanted, such
as
<command producing revisions in order> |
git log --oneline --no-walk --stdin
To accomodate both cases, leave the decision of whether or not to sort
up to the caller, by allowing --no-walk={sorted,unsorted}, defaulting
to 'sorted' for backward-compatibility reasons.
Signed-off-by: Martin von Zweigbergk <martinvonz@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Carlos Martín Nieto [Thu, 30 Aug 2012 17:23:13 +0000 (19:23 +0200)]
branch: deprecate --set-upstream and show help if we detect possible mistaken use
This interface is error prone, and a better one (--set-upstream-to)
exists. Add a message listing the alternatives and suggest how to fix
a --set-upstream invocation in case the user only gives one argument
which causes a local branch with the same name as a remote-tracking
one to be created. The typical case is
git branch --set-upstream origin/master
when the user meant
git branch --set-upstream master origin/master
assuming that the current branch is master. Show a message telling the
user how to undo their action and get what they wanted. For the
command above, the message would be
The --set-upstream flag is deprecated and will be removed. Consider using --track or --set-upstream-to
Branch origin/master set up to track local branch master.
If you wanted to make 'master' track 'origin/master', do this:
git branch -d origin/master
git branch --set-upstream-to origin/master
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Carlos Martín Nieto [Thu, 30 Aug 2012 17:23:12 +0000 (19:23 +0200)]
branch: add --unset-upstream option
We have ways of setting the upstream information, but if we want to
unset it, we need to resort to modifying the configuration manually.
Teach branch an --unset-upstream option that unsets this information.
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Wed, 29 Aug 2012 22:00:30 +0000 (15:00 -0700)]
Latter half of the second batch for 1.8.0
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Wed, 29 Aug 2012 21:50:35 +0000 (14:50 -0700)]
Merge branch 'rr/precompose-utf8-cleanup'
* rr/precompose-utf8-cleanup:
precompose-utf8: do not call checks for non-ascii "utf8"
cleanup precompose_utf8
Junio C Hamano [Wed, 29 Aug 2012 21:50:30 +0000 (14:50 -0700)]
Merge branch 'mh/maint-config-doc-proxy-command'
* mh/maint-config-doc-proxy-command:
git-config doc: unconfuse an example
git-config.txt: fix example
Junio C Hamano [Wed, 29 Aug 2012 21:50:24 +0000 (14:50 -0700)]
Merge branch 'ef/win32-cred-helper'
Credential helper for Win32 to allow access to the keychain of
the logged-in user.
* ef/win32-cred-helper:
contrib: add win32 credential-helper
Junio C Hamano [Wed, 29 Aug 2012 21:50:15 +0000 (14:50 -0700)]
Merge branch 'hv/submodule-path-unmatch'
* hv/submodule-path-unmatch:
Let submodule command exit with error status if path does not exist
Junio C Hamano [Wed, 29 Aug 2012 21:50:07 +0000 (14:50 -0700)]
Merge branch 'jc/capabilities'
Some capabilities were asked by fetch-pack even when upload-pack did
not advertise that they are available. Fix fetch-pack not to do so.
* jc/capabilities:
fetch-pack: mention server version with verbose output
parse_feature_request: make it easier to see feature values
fetch-pack: do not ask for unadvertised capabilities
do not send client agent unless server does first
send-pack: fix capability-sending logic
include agent identifier in capability string