gitweb.git
Merge branch 'jc/checkout-local-track-report'Junio C Hamano Wed, 7 Jan 2015 20:40:59 +0000 (12:40 -0800)

Merge branch 'jc/checkout-local-track-report'

The report from "git checkout" on a branch that builds on another
local branch by setting its branch.*.merge to branch name (not a
full refname) incorrectly said that the upstream is gone.

* jc/checkout-local-track-report:
checkout: report upstream correctly even with loosely defined branch.*.merge

Merge branch 'for-junio' of git://bogomips.org/git-svnJunio C Hamano Mon, 29 Dec 2014 18:15:22 +0000 (10:15 -0800)

Merge branch 'for-junio' of git://bogomips.org/git-svn

* 'for-junio' of git://bogomips.org/git-svn:
git-svn: support for git-svn propset

Merge branch 'jc/t9001-modernise'Junio C Hamano Mon, 29 Dec 2014 17:32:07 +0000 (09:32 -0800)

Merge branch 'jc/t9001-modernise'

* jc/t9001-modernise:
t9001: style modernisation phase #5
t9001: style modernisation phase #4
t9001: style modernisation phase #3
t9001: style modernisation phase #2
t9001: style modernisation phase #1

Merge branch 'mh/update-ref-verify'Junio C Hamano Mon, 29 Dec 2014 17:30:55 +0000 (09:30 -0800)

Merge branch 'mh/update-ref-verify'

"git update-ref --stdin"'s verify command did not work well when
<oldvalue>, which is documented as optional, was missing.

* mh/update-ref-verify:
update-ref: fix "verify" command with missing <oldvalue>
t1400: add some more tests of "update-ref --stdin"'s verify command

Sync with maintJunio C Hamano Mon, 22 Dec 2014 20:43:48 +0000 (12:43 -0800)

Sync with maint

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Third batch for 2.3 cycleJunio C Hamano Mon, 22 Dec 2014 20:43:16 +0000 (12:43 -0800)

Third batch for 2.3 cycle

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'rs/use-strbuf-complete-line'Junio C Hamano Mon, 22 Dec 2014 20:28:22 +0000 (12:28 -0800)

Merge branch 'rs/use-strbuf-complete-line'

* rs/use-strbuf-complete-line:
use strbuf_complete_line() for adding a newline if needed

Merge branch 'jg/prompt-localize-temporary'Junio C Hamano Mon, 22 Dec 2014 20:28:20 +0000 (12:28 -0800)

Merge branch 'jg/prompt-localize-temporary'

"git-prompt" (in contrib/) used a variable from the global scope,
possibly contaminating end-user's namespace.

* jg/prompt-localize-temporary:
git-prompt.sh: make $f local to __git_eread()

Merge branch 'ch/new-gpg-drops-rfc-1991'Junio C Hamano Mon, 22 Dec 2014 20:28:16 +0000 (12:28 -0800)

Merge branch 'ch/new-gpg-drops-rfc-1991'

Recent GPG changes the keyring format and drops support for RFC1991
formatted signatures, breaking our existing tests.

* ch/new-gpg-drops-rfc-1991:
tests: make comment on GPG keyring match the code
tests: squelch noise from GPG machinery set-up
tests: replace binary GPG keyrings with ASCII-armored keys
tests: skip RFC1991 tests for gnupg 2.1
tests: create gpg homedir on the fly

Merge branch 'jk/commit-date-approxidate'Junio C Hamano Mon, 22 Dec 2014 20:28:14 +0000 (12:28 -0800)

Merge branch 'jk/commit-date-approxidate'

Recent update to "git commit" broke amending an existing commit
with bogus author/committer lines without a valid e-mail address.

* jk/commit-date-approxidate:
commit: always populate GIT_AUTHOR_* variables
commit: loosen ident checks when generating template

Merge branch 'nd/split-index'Junio C Hamano Mon, 22 Dec 2014 20:28:11 +0000 (12:28 -0800)

Merge branch 'nd/split-index'

A typofix to the documentation of a feature already in the release.

* nd/split-index:
index-format.txt: add a missing closing quote

Merge branch 'jk/test-asan'Junio C Hamano Mon, 22 Dec 2014 20:28:08 +0000 (12:28 -0800)

Merge branch 'jk/test-asan'

* jk/test-asan:
t: support clang/gcc AddressSanitizer

Merge branch 'ok/rebase-i-count-todo'Junio C Hamano Mon, 22 Dec 2014 20:28:06 +0000 (12:28 -0800)

Merge branch 'ok/rebase-i-count-todo'

* ok/rebase-i-count-todo:
Show number of TODO items for interactive rebase

Merge branch 'jk/read-packed-refs-without-path-max'Junio C Hamano Mon, 22 Dec 2014 20:28:04 +0000 (12:28 -0800)

Merge branch 'jk/read-packed-refs-without-path-max'

Git did not correctly read an overlong refname from a packed refs
file.

* jk/read-packed-refs-without-path-max:
read_packed_refs: use skip_prefix instead of static array
read_packed_refs: pass strbuf to parse_ref_line
read_packed_refs: use a strbuf for reading lines

Merge branch 'jk/always-allow-large-packets'Junio C Hamano Mon, 22 Dec 2014 20:28:02 +0000 (12:28 -0800)

Merge branch 'jk/always-allow-large-packets'

"git push" and "git fetch" did not communicate an overlong refname
correctly.

* jk/always-allow-large-packets:
pkt-line: allow writing of LARGE_PACKET_MAX buffers

Merge branch 'jk/colors'Junio C Hamano Mon, 22 Dec 2014 20:27:58 +0000 (12:27 -0800)

Merge branch 'jk/colors'

"diff-highlight" filter (in contrib/) allows its color output
to be customized via configuration variables.

* jk/colors:
parse_color: drop COLOR_BACKGROUND macro
diff-highlight: allow configurable colors
parse_color: recognize "no$foo" to clear the $foo attribute
parse_color: support 24-bit RGB values
parse_color: refactor color storage

Merge branch 'rw/apply-does-not-take-ignore-date'Junio C Hamano Mon, 22 Dec 2014 20:27:51 +0000 (12:27 -0800)

Merge branch 'rw/apply-does-not-take-ignore-date'

* rw/apply-does-not-take-ignore-date:
git-am.txt: --ignore-date flag is not passed to git-apply

Merge branch 'js/test-hashmap-squelch-gcc'Junio C Hamano Mon, 22 Dec 2014 20:27:46 +0000 (12:27 -0800)

Merge branch 'js/test-hashmap-squelch-gcc'

* js/test-hashmap-squelch-gcc:
test-hashmap: squelch gcc compiler warning

Merge branch 'js/fsck-tag-validation'Junio C Hamano Mon, 22 Dec 2014 20:27:41 +0000 (12:27 -0800)

Merge branch 'js/fsck-tag-validation'

New tag object format validation added in 2.2 showed garbage
after a tagname it reported in its error message.

* js/fsck-tag-validation:
index-pack: terminate object buffers with NUL
fsck: properly bound "invalid tag name" error message

Merge branch 'po/doc-assume-unchanged'Junio C Hamano Mon, 22 Dec 2014 20:27:38 +0000 (12:27 -0800)

Merge branch 'po/doc-assume-unchanged'

Fixes long-standing misunderstanding of what assume-unchanged is
about. Some text near what is removed by the bottom patch may also
have to be removed.

* po/doc-assume-unchanged:
gitignore.txt: do not suggest assume-unchanged
doc: make clear --assume-unchanged's user contract

Merge branch 'mg/branch-d-m-f'Junio C Hamano Mon, 22 Dec 2014 20:27:36 +0000 (12:27 -0800)

Merge branch 'mg/branch-d-m-f'

"git branch -d" (delete) and "git branch -m" (move) learned to
honor "-f" (force) flag; unlike many other subcommands, the way to
force these have been with separate "-D/-M" options, which was
inconsistent.

* mg/branch-d-m-f:
branch: allow -f with -m and -d
t3200-branch: test -M

Merge branch 'tb/t0027-eol-conversion'Junio C Hamano Mon, 22 Dec 2014 20:27:34 +0000 (12:27 -0800)

Merge branch 'tb/t0027-eol-conversion'

* tb/t0027-eol-conversion:
t0027: check the eol conversion warnings

Merge branch 'jk/for-each-reflog-ent-reverse'Junio C Hamano Mon, 22 Dec 2014 20:27:32 +0000 (12:27 -0800)

Merge branch 'jk/for-each-reflog-ent-reverse'

The code that reads the reflog from the newer to the older entries
did not handle an entry that crosses a boundary of block it uses to
read them correctly.

* jk/for-each-reflog-ent-reverse:
for_each_reflog_ent_reverse: turn leftover check into assertion
for_each_reflog_ent_reverse: fix newlines on block boundaries

Merge branch 'sb/string-list'Junio C Hamano Mon, 22 Dec 2014 20:27:29 +0000 (12:27 -0800)

Merge branch 'sb/string-list'

API simplification.

* sb/string-list:
string_list: remove string_list_insert_at_index() from its API
mailmap: use higher level string list functions
string_list: document string_list_(insert,lookup)

Merge branch 'sv/doc-stripspace'Junio C Hamano Mon, 22 Dec 2014 20:27:27 +0000 (12:27 -0800)

Merge branch 'sv/doc-stripspace'

* sv/doc-stripspace:
Documentation/git-stripspace: add synopsis for --comment-lines

Merge branch 'rt/completion-tag'Junio C Hamano Mon, 22 Dec 2014 20:27:24 +0000 (12:27 -0800)

Merge branch 'rt/completion-tag'

* rt/completion-tag:
completion: add git-tag options

Merge branch 'mg/doc-check-ignore-tracked-are-not-ignored'Junio C Hamano Mon, 22 Dec 2014 20:27:22 +0000 (12:27 -0800)

Merge branch 'mg/doc-check-ignore-tracked-are-not-ignored'

* mg/doc-check-ignore-tracked-are-not-ignored:
check-ignore: clarify treatment of tracked files

Merge branch 'jk/credential-quit'Junio C Hamano Mon, 22 Dec 2014 20:27:19 +0000 (12:27 -0800)

Merge branch 'jk/credential-quit'

Credential helpers are asked in turn until one of them give
positive response, which is cumbersome to turn off when you need to
run Git in an automated setting. The credential helper interface
learned to allow a helper to say "stop, don't ask other helpers."
Also GIT_TERMINAL_PROMPT environment can be set to false to disable
our built-in prompt mechanism for passwords.

* jk/credential-quit:
prompt: respect GIT_TERMINAL_PROMPT to disable terminal prompts
credential: let helpers tell us to quit

Merge branch 'dm/compat-s-ifmt-for-zos'Junio C Hamano Mon, 22 Dec 2014 20:27:16 +0000 (12:27 -0800)

Merge branch 'dm/compat-s-ifmt-for-zos'

Long overdue departure from the assumption that S_IFMT is shared by
everybody made in 2005.

* dm/compat-s-ifmt-for-zos:
compat: convert modes to use portable file type values

Merge branch 'ps/new-workdir-into-empty-directory'Junio C Hamano Mon, 22 Dec 2014 20:27:13 +0000 (12:27 -0800)

Merge branch 'ps/new-workdir-into-empty-directory'

"git new-workdir" (in contrib/) can be used to populate an empty
and existing directory now.

* ps/new-workdir-into-empty-directory:
git-new-workdir: don't fail if the target directory is empty

Merge branch 'nd/ls-tree-pathspec'Junio C Hamano Mon, 22 Dec 2014 20:27:12 +0000 (12:27 -0800)

Merge branch 'nd/ls-tree-pathspec'

"git ls-tree" does not support path selection based on negative
pathspecs, but did not error out when negative pathspecs are given.

* nd/ls-tree-pathspec:
t3102: style modernization
t3102: document that ls-tree does not yet support negated pathspec
ls-tree: disable negative pathspec because it's not supported
ls-tree: remove path filtering logic in show_tree
tree.c: update read_tree_recursive callback to pass strbuf as base

Merge branch 'jc/hook-cleanup'Junio C Hamano Mon, 22 Dec 2014 20:27:10 +0000 (12:27 -0800)

Merge branch 'jc/hook-cleanup'

Remove unused code.

* jc/hook-cleanup:
run-command.c: retire unused run_hook_with_custom_index()

Merge branch 'rt/for-each-ref-spell-tcl-as-Tcl'Junio C Hamano Mon, 22 Dec 2014 20:27:08 +0000 (12:27 -0800)

Merge branch 'rt/for-each-ref-spell-tcl-as-Tcl'

* rt/for-each-ref-spell-tcl-as-Tcl:
for-each-ref: correct spelling of Tcl in option description

Merge branch 'rj/t0050-passes'Junio C Hamano Mon, 22 Dec 2014 20:27:06 +0000 (12:27 -0800)

Merge branch 'rj/t0050-passes'

* rj/t0050-passes:
t0050-*.sh: mark the rename (case change) test as passing

Merge branch 'js/push-to-deploy'Junio C Hamano Mon, 22 Dec 2014 20:27:03 +0000 (12:27 -0800)

Merge branch 'js/push-to-deploy'

"git push" into a repository with a working tree normally refuses
to modify the branch that is checked out. The command learned to
optionally do an equivalent of "git reset --hard" only when there
is no change to the working tree and the index instead, which would
be useful to "deploy" by pushing into a repository.

* js/push-to-deploy:
t5516: more tests for receive.denyCurrentBranch=updateInstead
receive-pack: add another option for receive.denyCurrentBranch

Merge branch 'jc/exec-cmd-system-path-leak-fix'Junio C Hamano Mon, 22 Dec 2014 20:27:01 +0000 (12:27 -0800)

Merge branch 'jc/exec-cmd-system-path-leak-fix'

The function sometimes returned a non-freeable memory and some
other times returned a piece of memory that must be freed.

* jc/exec-cmd-system-path-leak-fix:
system_path(): always return free'able memory to the caller

Merge branch 'mh/find-uniq-abbrev'Junio C Hamano Mon, 22 Dec 2014 20:26:57 +0000 (12:26 -0800)

Merge branch 'mh/find-uniq-abbrev'

The code to abbreviate an object name to its short unique prefix
has been optimized when no abbreviation was requested.

* mh/find-uniq-abbrev:
sha1_name: avoid unnecessary sha1 lookup in find_unique_abbrev

Merge branch 'pb/send-email-te'Junio C Hamano Mon, 22 Dec 2014 20:26:53 +0000 (12:26 -0800)

Merge branch 'pb/send-email-te'

"git send-email" learned "--transfer-encoding" option to force
a non-fault Content-Transfer-Encoding header (e.g. base64).

* pb/send-email-te:
git-send-email: add --transfer-encoding option
git-send-email: delay creation of MIME headers

Merge branch 'pb/am-message-id-footer'Junio C Hamano Mon, 22 Dec 2014 20:26:52 +0000 (12:26 -0800)

Merge branch 'pb/am-message-id-footer'

"git am" learned "--message-id" option to copy the message ID of
the incoming e-mail to the log message of resulting commit.

* pb/am-message-id-footer:
git-am: add --message-id/--no-message-id
git-mailinfo: add --message-id

Merge branch 'mh/simplify-repack-without-refs'Junio C Hamano Mon, 22 Dec 2014 20:26:50 +0000 (12:26 -0800)

Merge branch 'mh/simplify-repack-without-refs'

"git remote update --prune" to drop many refs has been optimized.

* mh/simplify-repack-without-refs:
sort_string_list(): rename to string_list_sort()
prune_remote(): iterate using for_each_string_list_item()
prune_remote(): rename local variable
repack_without_refs(): make the refnames argument a string_list
prune_remote(): sort delete_refs_list references en masse
prune_remote(): initialize both delete_refs lists in a single loop
prune_remote(): exit early if there are no stale references

Merge branch 'dw/shell-basename-dashdash-before-strippi... Junio C Hamano Mon, 22 Dec 2014 20:26:48 +0000 (12:26 -0800)

Merge branch 'dw/shell-basename-dashdash-before-stripping-leading-dash-from-login'

* dw/shell-basename-dashdash-before-stripping-leading-dash-from-login:
git-sh-setup.sh: use dashdash with basename call

Merge branch 'rj/no-xopen-source-for-cygwin'Junio C Hamano Mon, 22 Dec 2014 20:26:45 +0000 (12:26 -0800)

Merge branch 'rj/no-xopen-source-for-cygwin'

Avoid compilation warnings on recent gcc toolchain on Cygwin.

* rj/no-xopen-source-for-cygwin:
git-compat-util.h: don't define _XOPEN_SOURCE on cygwin

Merge branch 'js/t5000-dont-copy-bin-sh'Junio C Hamano Mon, 22 Dec 2014 20:26:43 +0000 (12:26 -0800)

Merge branch 'js/t5000-dont-copy-bin-sh'

* js/t5000-dont-copy-bin-sh:
t5000 on Windows: do not mistake "sh.exe" as "sh"

Merge branch 'jc/refer-to-t-readme-from-submitting... Junio C Hamano Mon, 22 Dec 2014 20:26:38 +0000 (12:26 -0800)

Merge branch 'jc/refer-to-t-readme-from-submitting-patches'

* jc/refer-to-t-readme-from-submitting-patches:
t/README: justify why "! grep foo" is sufficient
SubmittingPatches: refer to t/README for tests

Merge branch 'tb/config-core-filemode-check-on-broken-fs'Junio C Hamano Mon, 22 Dec 2014 20:26:33 +0000 (12:26 -0800)

Merge branch 'tb/config-core-filemode-check-on-broken-fs'

Some filesystems assign filemodes in a strange way, fooling then
automatic "filemode trustability" check done during a new
repository creation.

* tb/config-core-filemode-check-on-broken-fs:
init-db: improve the filemode trustability check

Merge branch 'mg/add-ignore-errors'Junio C Hamano Mon, 22 Dec 2014 20:26:30 +0000 (12:26 -0800)

Merge branch 'mg/add-ignore-errors'

"git add --ignore-errors ..." did not ignore an error to
give a file that did not exist.

* mg/add-ignore-errors:
add: ignore only ignored files

Merge branch 'jk/lock-ref-sha1-basic-return-errors'Junio C Hamano Mon, 22 Dec 2014 20:26:27 +0000 (12:26 -0800)

Merge branch 'jk/lock-ref-sha1-basic-return-errors'

Correct an API anomaly.

* jk/lock-ref-sha1-basic-return-errors:
lock_ref_sha1_basic: do not die on locking errors

Merge branch 'cc/interpret-trailers-more'Junio C Hamano Mon, 22 Dec 2014 20:26:23 +0000 (12:26 -0800)

Merge branch 'cc/interpret-trailers-more'

"git interpret-trailers" learned to properly handle the
"Conflicts:" block at the end.

* cc/interpret-trailers-more:
trailer: add test with an old style conflict block
trailer: reuse ignore_non_trailer() to ignore conflict lines
commit: make ignore_non_trailer() non static
merge & sequencer: turn "Conflicts:" hint into a comment
builtin/commit.c: extract ignore_non_trailer() helper function
merge & sequencer: unify codepaths that write "Conflicts:" hint
builtin/merge.c: drop a parameter that is never used

Prepare for 2.2.2Junio C Hamano Mon, 22 Dec 2014 20:20:38 +0000 (12:20 -0800)

Prepare for 2.2.2

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'jk/rebuild-perl-scripts-with-no-perl... Junio C Hamano Mon, 22 Dec 2014 20:18:35 +0000 (12:18 -0800)

Merge branch 'jk/rebuild-perl-scripts-with-no-perl-seting-change' into maint

The build procedure did not bother fixing perl and python scripts
when NO_PERL and NO_PYTHON build-time configuration changed.

* jk/rebuild-perl-scripts-with-no-perl-seting-change:
Makefile: have python scripts depend on NO_PYTHON setting
Makefile: simplify by using SCRIPT_{PERL,SH}_GEN macros
Makefile: have perl scripts depend on NO_PERL setting

Merge branch 'jk/no-perl-tests' into maintJunio C Hamano Mon, 22 Dec 2014 20:18:25 +0000 (12:18 -0800)

Merge branch 'jk/no-perl-tests' into maint

Some tests that depend on perl lacked PERL prerequisite to protect
them, breaking build with NO_PERL configuration.

* jk/no-perl-tests:
t960[34]: mark cvsimport tests as requiring perl
t0090: mark add-interactive test with PERL prerequisite

Merge branch 'po/everyday-doc' into maintJunio C Hamano Mon, 22 Dec 2014 20:18:16 +0000 (12:18 -0800)

Merge branch 'po/everyday-doc' into maint

"Everyday" document had a broken link.

* po/everyday-doc:
Documentation: change "gitlink" typo in git-push

Merge branch 'jk/push-simple' into maintJunio C Hamano Mon, 22 Dec 2014 20:18:08 +0000 (12:18 -0800)

Merge branch 'jk/push-simple' into maint

Git 2.0 was supposed to make the "simple" mode for the default of
"git push", but it didn't.

* jk/push-simple:
push: truly use "simple" as default, not "upstream"

Merge branch 'mh/config-flip-xbit-back-after-checking... Junio C Hamano Mon, 22 Dec 2014 20:18:00 +0000 (12:18 -0800)

Merge branch 'mh/config-flip-xbit-back-after-checking' into maint

"git init" (hence "git clone") initialized the per-repository
configuration file .git/config with x-bit by mistake.

* mh/config-flip-xbit-back-after-checking:
create_default_files(): don't set u+x bit on $GIT_DIR/config

Merge branch 'jk/gitweb-with-newer-cgi-multi-param... Junio C Hamano Mon, 22 Dec 2014 20:17:34 +0000 (12:17 -0800)

Merge branch 'jk/gitweb-with-newer-cgi-multi-param' into maint

"gitweb" used to depend on a behaviour that was deprecated by recent
CGI.pm.

* jk/gitweb-with-newer-cgi-multi-param:
gitweb: hack around CGI's list-context param() handling

Merge branch 'rs/receive-pack-use-labs' into maintJunio C Hamano Mon, 22 Dec 2014 20:17:32 +0000 (12:17 -0800)

Merge branch 'rs/receive-pack-use-labs' into maint

* rs/receive-pack-use-labs:
use labs() for variables of type long instead of abs()

Merge branch 'rs/maint-config-use-labs' into maintJunio C Hamano Mon, 22 Dec 2014 20:17:23 +0000 (12:17 -0800)

Merge branch 'rs/maint-config-use-labs' into maint

* rs/maint-config-use-labs:
use labs() for variables of type long instead of abs()

Merge branch 'js/windows-open-eisdir-error' into maintJunio C Hamano Mon, 22 Dec 2014 20:17:13 +0000 (12:17 -0800)

Merge branch 'js/windows-open-eisdir-error' into maint

open() emulated on Windows platforms did not give EISDIR upon an
attempt to open a directory for writing.

* js/windows-open-eisdir-error:
Windows: correct detection of EISDIR in mingw_open()

Merge branch 'jk/colors-fix' into maintJunio C Hamano Mon, 22 Dec 2014 20:16:58 +0000 (12:16 -0800)

Merge branch 'jk/colors-fix' into maint

"git config --get-color" did not parse its command line arguments
carefully.

* jk/colors-fix:
t4026: test "normal" color
config: fix parsing of "git config --get-color some.key -1"
docs: describe ANSI 256-color mode

Merge branch 'jk/checkout-from-tree' into maintJunio C Hamano Mon, 22 Dec 2014 20:16:29 +0000 (12:16 -0800)

Merge branch 'jk/checkout-from-tree' into maint

"git checkout $treeish $path", when $path in the index and the
working tree already matched what is in $treeish at the $path,
still overwrote the $path unnecessarily.

* jk/checkout-from-tree:
checkout $tree: do not throw away unchanged index entries

clean: typofixAlexander Kuleshov Fri, 19 Dec 2014 08:37:47 +0000 (14:37 +0600)

clean: typofix

Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Sync with v2.2.1Junio C Hamano Thu, 18 Dec 2014 20:30:53 +0000 (12:30 -0800)

Sync with v2.2.1

* maint:
Git 2.2.1
Git 2.1.4
Git 2.0.5
Git 1.9.5
Git 1.8.5.6
fsck: complain about NTFS ".git" aliases in trees
read-cache: optionally disallow NTFS .git variants
path: add is_ntfs_dotgit() helper
fsck: complain about HFS+ ".git" aliases in trees
read-cache: optionally disallow HFS+ .git variants
utf8: add is_hfs_dotgit() helper
fsck: notice .git case-insensitively
t1450: refactor ".", "..", and ".git" fsck tests
verify_dotfile(): reject .git case-insensitively
read-tree: add tests for confusing paths like ".." and ".git"
unpack-trees: propagate errors adding entries to the index

Git 2.2.1 v2.2.1Junio C Hamano Wed, 17 Dec 2014 19:49:34 +0000 (11:49 -0800)

Git 2.2.1

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Sync with v2.1.4Junio C Hamano Wed, 17 Dec 2014 19:46:57 +0000 (11:46 -0800)

Sync with v2.1.4

* maint-2.1:
Git 2.1.4
Git 2.0.5
Git 1.9.5
Git 1.8.5.6
fsck: complain about NTFS ".git" aliases in trees
read-cache: optionally disallow NTFS .git variants
path: add is_ntfs_dotgit() helper
fsck: complain about HFS+ ".git" aliases in trees
read-cache: optionally disallow HFS+ .git variants
utf8: add is_hfs_dotgit() helper
fsck: notice .git case-insensitively
t1450: refactor ".", "..", and ".git" fsck tests
verify_dotfile(): reject .git case-insensitively
read-tree: add tests for confusing paths like ".." and ".git"
unpack-trees: propagate errors adding entries to the index

Git 2.1.4 v2.1.4Junio C Hamano Wed, 17 Dec 2014 19:44:59 +0000 (11:44 -0800)

Git 2.1.4

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Sync with v2.0.5Junio C Hamano Wed, 17 Dec 2014 19:42:28 +0000 (11:42 -0800)

Sync with v2.0.5

* maint-2.0:
Git 2.0.5
Git 1.9.5
Git 1.8.5.6
fsck: complain about NTFS ".git" aliases in trees
read-cache: optionally disallow NTFS .git variants
path: add is_ntfs_dotgit() helper
fsck: complain about HFS+ ".git" aliases in trees
read-cache: optionally disallow HFS+ .git variants
utf8: add is_hfs_dotgit() helper
fsck: notice .git case-insensitively
t1450: refactor ".", "..", and ".git" fsck tests
verify_dotfile(): reject .git case-insensitively
read-tree: add tests for confusing paths like ".." and ".git"
unpack-trees: propagate errors adding entries to the index

Git 2.0.5 v2.0.5Junio C Hamano Wed, 17 Dec 2014 19:30:46 +0000 (11:30 -0800)

Git 2.0.5

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Sync with v1.9.5Junio C Hamano Wed, 17 Dec 2014 19:28:02 +0000 (11:28 -0800)

Sync with v1.9.5

* maint-1.9:
Git 1.9.5
Git 1.8.5.6
fsck: complain about NTFS ".git" aliases in trees
read-cache: optionally disallow NTFS .git variants
path: add is_ntfs_dotgit() helper
fsck: complain about HFS+ ".git" aliases in trees
read-cache: optionally disallow HFS+ .git variants
utf8: add is_hfs_dotgit() helper
fsck: notice .git case-insensitively
t1450: refactor ".", "..", and ".git" fsck tests
verify_dotfile(): reject .git case-insensitively
read-tree: add tests for confusing paths like ".." and ".git"
unpack-trees: propagate errors adding entries to the index

Git 1.9.5 v1.9.5Junio C Hamano Wed, 17 Dec 2014 19:22:32 +0000 (11:22 -0800)

Git 1.9.5

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Sync with v1.8.5.6Junio C Hamano Wed, 17 Dec 2014 19:20:31 +0000 (11:20 -0800)

Sync with v1.8.5.6

* maint-1.8.5:
Git 1.8.5.6
fsck: complain about NTFS ".git" aliases in trees
read-cache: optionally disallow NTFS .git variants
path: add is_ntfs_dotgit() helper
fsck: complain about HFS+ ".git" aliases in trees
read-cache: optionally disallow HFS+ .git variants
utf8: add is_hfs_dotgit() helper
fsck: notice .git case-insensitively
t1450: refactor ".", "..", and ".git" fsck tests
verify_dotfile(): reject .git case-insensitively
read-tree: add tests for confusing paths like ".." and ".git"
unpack-trees: propagate errors adding entries to the index

Git 1.8.5.6 v1.8.5.6Junio C Hamano Wed, 17 Dec 2014 19:18:45 +0000 (11:18 -0800)

Git 1.8.5.6

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'dotgit-case-maint-1.8.5' into maint-1.8.5Junio C Hamano Wed, 17 Dec 2014 19:11:15 +0000 (11:11 -0800)

Merge branch 'dotgit-case-maint-1.8.5' into maint-1.8.5

* dotgit-case-maint-1.8.5:
fsck: complain about NTFS ".git" aliases in trees
read-cache: optionally disallow NTFS .git variants
path: add is_ntfs_dotgit() helper
fsck: complain about HFS+ ".git" aliases in trees
read-cache: optionally disallow HFS+ .git variants
utf8: add is_hfs_dotgit() helper
fsck: notice .git case-insensitively
t1450: refactor ".", "..", and ".git" fsck tests
verify_dotfile(): reject .git case-insensitively
read-tree: add tests for confusing paths like ".." and ".git"
unpack-trees: propagate errors adding entries to the index

fsck: complain about NTFS ".git" aliases in treesJohannes Schindelin Wed, 10 Dec 2014 21:28:27 +0000 (22:28 +0100)

fsck: complain about NTFS ".git" aliases in trees

Now that the index can block pathnames that can be mistaken
to mean ".git" on NTFS and FAT32, it would be helpful for
fsck to notice such problematic paths. This lets servers
which use receive.fsckObjects block them before the damage
spreads.

Note that the fsck check is always on, even for systems
without core.protectNTFS set. This is technically more
restrictive than we need to be, as a set of users on ext4
could happily use these odd filenames without caring about
NTFS.

However, on balance, it's helpful for all servers to block
these (because the paths can be used for mischief, and
servers which bother to fsck would want to stop the spread
whether they are on NTFS themselves or not), and hardly
anybody will be affected (because the blocked names are
variants of .git or git~1, meaning mischief is almost
certainly what the tree author had in mind).

Ideally these would be controlled by a separate
"fsck.protectNTFS" flag. However, it would be much nicer to
be able to enable/disable _any_ fsck flag individually, and
any scheme we choose should match such a system. Given the
likelihood of anybody using such a path in practice, it is
not unreasonable to wait until such a system materializes.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

read-cache: optionally disallow NTFS .git variantsJohannes Schindelin Tue, 16 Dec 2014 22:46:59 +0000 (23:46 +0100)

read-cache: optionally disallow NTFS .git variants

The point of disallowing ".git" in the index is that we
would never want to accidentally overwrite files in the
repository directory. But this means we need to respect the
filesystem's idea of when two paths are equal. The prior
commit added a helper to make such a comparison for NTFS
and FAT32; let's use it in verify_path().

We make this check optional for two reasons:

1. It restricts the set of allowable filenames, which is
unnecessary for people who are not on NTFS nor FAT32.
In practice this probably doesn't matter, though, as
the restricted names are rather obscure and almost
certainly would never come up in practice.

2. It has a minor performance penalty for every path we
insert into the index.

This patch ties the check to the core.protectNTFS config
option. Though this is expected to be most useful on Windows,
we allow it to be set everywhere, as NTFS may be mounted on
other platforms. The variable does default to on for Windows,
though.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

path: add is_ntfs_dotgit() helperJohannes Schindelin Tue, 16 Dec 2014 22:31:03 +0000 (23:31 +0100)

path: add is_ntfs_dotgit() helper

We do not allow paths with a ".git" component to be added to
the index, as that would mean repository contents could
overwrite our repository files. However, asking "is this
path the same as .git" is not as simple as strcmp() on some
filesystems.

On NTFS (and FAT32), there exist so-called "short names" for
backwards-compatibility: 8.3 compliant names that refer to the same files
as their long names. As ".git" is not an 8.3 compliant name, a short name
is generated automatically, typically "git~1".

Depending on the Windows version, any combination of trailing spaces and
periods are ignored, too, so that both "git~1." and ".git." still refer
to the Git directory. The reason is that 8.3 stores file names shorter
than 8 characters with trailing spaces. So literally, it does not matter
for the short name whether it is padded with spaces or whether it is
shorter than 8 characters, it is considered to be the exact same.

The period is the separator between file name and file extension, and
again, an empty extension consists just of spaces in 8.3 format. So
technically, we would need only take care of the equivalent of this
regex:
(\.git {0,4}|git~1 {0,3})\. {0,3}

However, there are indications that at least some Windows versions might
be more lenient and accept arbitrary combinations of trailing spaces and
periods and strip them out. So we're playing it real safe here. Besides,
there can be little doubt about the intention behind using file names
matching even the more lenient pattern specified above, therefore we
should be fine with disallowing such patterns.

Extra care is taken to catch names such as '.\\.git\\booh' because the
backslash is marked as a directory separator only on Windows, and we want
to use this new helper function also in fsck on other platforms.

A big thank you goes to Ed Thomson and an unnamed Microsoft engineer for
the detailed analysis performed to come up with the corresponding fixes
for libgit2.

This commit adds a function to detect whether a given file name can refer
to the Git directory by mistake.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

fsck: complain about HFS+ ".git" aliases in treesJeff King Mon, 15 Dec 2014 23:21:57 +0000 (18:21 -0500)

fsck: complain about HFS+ ".git" aliases in trees

Now that the index can block pathnames that case-fold to
".git" on HFS+, it would be helpful for fsck to notice such
problematic paths. This lets servers which use
receive.fsckObjects block them before the damage spreads.

Note that the fsck check is always on, even for systems
without core.protectHFS set. This is technically more
restrictive than we need to be, as a set of users on ext4
could happily use these odd filenames without caring about
HFS+.

However, on balance, it's helpful for all servers to block
these (because the paths can be used for mischief, and
servers which bother to fsck would want to stop the spread
whether they are on HFS+ themselves or not), and hardly
anybody will be affected (because the blocked names are
variants of .git with invisible Unicode code-points mixed
in, meaning mischief is almost certainly what the tree
author had in mind).

Ideally these would be controlled by a separate
"fsck.protectHFS" flag. However, it would be much nicer to
be able to enable/disable _any_ fsck flag individually, and
any scheme we choose should match such a system. Given the
likelihood of anybody using such a path in practice, it is
not unreasonable to wait until such a system materializes.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

read-cache: optionally disallow HFS+ .git variantsJeff King Mon, 15 Dec 2014 23:15:20 +0000 (18:15 -0500)

read-cache: optionally disallow HFS+ .git variants

The point of disallowing ".git" in the index is that we
would never want to accidentally overwrite files in the
repository directory. But this means we need to respect the
filesystem's idea of when two paths are equal. The prior
commit added a helper to make such a comparison for HFS+;
let's use it in verify_path.

We make this check optional for two reasons:

1. It restricts the set of allowable filenames, which is
unnecessary for people who are not on HFS+. In practice
this probably doesn't matter, though, as the restricted
names are rather obscure and almost certainly would
never come up in practice.

2. It has a minor performance penalty for every path we
insert into the index.

This patch ties the check to the core.protectHFS config
option. Though this is expected to be most useful on OS X,
we allow it to be set everywhere, as HFS+ may be mounted on
other platforms. The variable does default to on for OS X,
though.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

utf8: add is_hfs_dotgit() helperJeff King Mon, 15 Dec 2014 22:56:59 +0000 (17:56 -0500)

utf8: add is_hfs_dotgit() helper

We do not allow paths with a ".git" component to be added to
the index, as that would mean repository contents could
overwrite our repository files. However, asking "is this
path the same as .git" is not as simple as strcmp() on some
filesystems.

HFS+'s case-folding does more than just fold uppercase into
lowercase (which we already handle with strcasecmp). It may
also skip past certain "ignored" Unicode code points, so
that (for example) ".gi\u200ct" is mapped ot ".git".

The full list of folds can be found in the tables at:

https://www.opensource.apple.com/source/xnu/xnu-1504.15.3/bsd/hfs/hfscommon/Unicode/UCStringCompareData.h

Implementing a full "is this path the same as that path"
comparison would require us importing the whole set of
tables. However, what we want to do is much simpler: we
only care about checking ".git". We know that 'G' is the
only thing that folds to 'g', and so on, so we really only
need to deal with the set of ignored code points, which is
much smaller.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

fsck: notice .git case-insensitivelyJeff King Mon, 24 Nov 2014 18:40:44 +0000 (13:40 -0500)

fsck: notice .git case-insensitively

We complain about ".git" in a tree because it cannot be
loaded into the index or checked out. Since we now also
reject ".GIT" case-insensitively, fsck should notice the
same, so that errors do not propagate.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t1450: refactor ".", "..", and ".git" fsck testsJeff King Mon, 24 Nov 2014 18:40:11 +0000 (13:40 -0500)

t1450: refactor ".", "..", and ".git" fsck tests

We check that fsck notices and complains about confusing
paths in trees. However, there are a few shortcomings:

1. We check only for these paths as file entries, not as
intermediate paths (so ".git" and not ".git/foo").

2. We check "." and ".." together, so it is possible that
we notice only one and not the other.

3. We repeat a lot of boilerplate.

Let's use some loops to be more thorough in our testing, and
still end up with shorter code.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

verify_dotfile(): reject .git case-insensitivelyJeff King Mon, 24 Nov 2014 18:39:12 +0000 (13:39 -0500)

verify_dotfile(): reject .git case-insensitively

We do not allow ".git" to enter into the index as a path
component, because checking out the result to the working
tree may causes confusion for subsequent git commands.
However, on case-insensitive file systems, ".Git" or ".GIT"
is the same. We should catch and prevent those, too.

Note that technically we could allow this for repos on
case-sensitive filesystems. But there's not much point. It's
unlikely that anybody cares, and it creates a repository
that is unexpectedly non-portable to other systems.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

read-tree: add tests for confusing paths like ".."... Jeff King Mon, 24 Nov 2014 18:37:56 +0000 (13:37 -0500)

read-tree: add tests for confusing paths like ".." and ".git"

We should prevent nonsense paths from entering the index in
the first place, as they can cause confusing results if they
are ever checked out into the working tree. We already do
so, but we never tested it.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

unpack-trees: propagate errors adding entries to the... Jeff King Mon, 24 Nov 2014 18:36:51 +0000 (13:36 -0500)

unpack-trees: propagate errors adding entries to the index

When unpack_trees tries to write an entry to the index,
add_index_entry may report an error to stderr, but we ignore
its return value. This leads to us returning a successful
exit code for an operation that partially failed. Let's make
sure to propagate this code.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

tests: make comment on GPG keyring match the codeChristian Hesse Tue, 16 Dec 2014 08:40:05 +0000 (09:40 +0100)

tests: make comment on GPG keyring match the code

GnuPG homedir is generated on the fly and keys are imported from
armored key file. Make comment match available key info and new key
generation procedure.

Signed-off-by: Christian Hesse <mail@eworm.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-prompt.sh: make $f local to __git_eread()Justin Guenther Fri, 12 Dec 2014 21:59:56 +0000 (15:59 -0600)

git-prompt.sh: make $f local to __git_eread()

This function uses (non-local) $f to store the value of its first parameter.
This can interfere with the user's environment.

Signed-off-by: Justin Guenther <jguenther@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Second batch for 2.3 cycleJunio C Hamano Fri, 12 Dec 2014 22:37:33 +0000 (14:37 -0800)

Second batch for 2.3 cycle

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'jk/pack-bitmap'Junio C Hamano Fri, 12 Dec 2014 22:31:41 +0000 (14:31 -0800)

Merge branch 'jk/pack-bitmap'

* jk/pack-bitmap:
pack-bitmap: do not use gcc packed attribute

Merge branch 'jk/push-simple'Junio C Hamano Fri, 12 Dec 2014 22:31:40 +0000 (14:31 -0800)

Merge branch 'jk/push-simple'

Git 2.0 was supposed to make the "simple" mode for the default of
"git push", but it didn't.

* jk/push-simple:
push: truly use "simple" as default, not "upstream"

Merge branch 'da/difftool-mergetool-simplify-reporting... Junio C Hamano Fri, 12 Dec 2014 22:31:39 +0000 (14:31 -0800)

Merge branch 'da/difftool-mergetool-simplify-reporting-status'

Code simplification.

* da/difftool-mergetool-simplify-reporting-status:
mergetools: stop setting $status in merge_cmd()
mergetool: simplify conditionals
difftool--helper: add explicit exit statement
mergetool--lib: remove use of $status global
mergetool--lib: remove no-op assignment to $status from setup_user_tool

Merge branch 'jk/colors-fix'Junio C Hamano Fri, 12 Dec 2014 22:31:38 +0000 (14:31 -0800)

Merge branch 'jk/colors-fix'

* jk/colors-fix:
t4026: test "normal" color
config: fix parsing of "git config --get-color some.key -1"
docs: describe ANSI 256-color mode

Merge branch 'rt/push-recurse-submodule-usage-string'Junio C Hamano Fri, 12 Dec 2014 22:31:38 +0000 (14:31 -0800)

Merge branch 'rt/push-recurse-submodule-usage-string'

* rt/push-recurse-submodule-usage-string:
builtin/push.c: fix description of --recurse-submodules option

Merge branch 'jk/rebuild-perl-scripts-with-no-perl... Junio C Hamano Fri, 12 Dec 2014 22:31:36 +0000 (14:31 -0800)

Merge branch 'jk/rebuild-perl-scripts-with-no-perl-seting-change'

The build procedure did not bother fixing perl and python scripts
when NO_PERL and NO_PYTHON build-time configuration changed.

* jk/rebuild-perl-scripts-with-no-perl-seting-change:
Makefile: have python scripts depend on NO_PYTHON setting
Makefile: simplify by using SCRIPT_{PERL,SH}_GEN macros
Makefile: have perl scripts depend on NO_PERL setting

Merge branch 'jk/no-perl-tests'Junio C Hamano Fri, 12 Dec 2014 22:31:36 +0000 (14:31 -0800)

Merge branch 'jk/no-perl-tests'

Some tests that depend on perl lacked PERL prerequisite to protect
them, breaking build with NO_PERL configuration.

* jk/no-perl-tests:
t960[34]: mark cvsimport tests as requiring perl
t0090: mark add-interactive test with PERL prerequisite

Merge branch 'sv/typofix-apply-error-message'Junio C Hamano Fri, 12 Dec 2014 22:31:35 +0000 (14:31 -0800)

Merge branch 'sv/typofix-apply-error-message'

* sv/typofix-apply-error-message:
apply: fix typo in an error message

Merge branch 'po/everyday-doc'Junio C Hamano Fri, 12 Dec 2014 22:31:34 +0000 (14:31 -0800)

Merge branch 'po/everyday-doc'

* po/everyday-doc:
Documentation: change "gitlink" typo in git-push

Merge branch 'mh/config-copy-string-from-git-path'Junio C Hamano Fri, 12 Dec 2014 22:31:33 +0000 (14:31 -0800)

Merge branch 'mh/config-copy-string-from-git-path'

* mh/config-copy-string-from-git-path:
cmd_config(): make a copy of path obtained from git_path()

Merge branch 'jc/unpack-trees-plug-leak'Junio C Hamano Fri, 12 Dec 2014 22:31:33 +0000 (14:31 -0800)

Merge branch 'jc/unpack-trees-plug-leak'

* jc/unpack-trees-plug-leak:
unpack_trees: plug leakage of o->result

tests: squelch noise from GPG machinery set-upJunio C Hamano Fri, 12 Dec 2014 20:33:56 +0000 (12:33 -0800)

tests: squelch noise from GPG machinery set-up

It is distracting to let the GPG message while setting up the test
gpghome leak into the test output, especially without running these
tests with "-v" option.

The splitting of RFC1991 prerequiste part is about future-proofing.
When we want to define other kinds of specific prerequisites in the
future, we'd prefer to see it done separately from the basic set-up
code.

Signed-off-by: Junio C Hamano <gitster@pobox.com>

tests: replace binary GPG keyrings with ASCII-armored... Christian Hesse Fri, 12 Dec 2014 08:50:14 +0000 (09:50 +0100)

tests: replace binary GPG keyrings with ASCII-armored keys

Importing PGP key public and security ring works, but we do not have
all secret keys in one binary blob and all public keys in another.
Instead import public and secret keys for one key pair from a text
file that holds ASCII-armored export of them.

Signed-off-by: Christian Hesse <mail@eworm.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

use strbuf_complete_line() for adding a newline if... René Scharfe Fri, 12 Dec 2014 19:16:38 +0000 (20:16 +0100)

use strbuf_complete_line() for adding a newline if needed

Call strbuf_complete_line() instead of open-coding it. Also remove
surrounding comments indicating the intent to complete a line since
this information is already included in the function name.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>