Pat Thoyts [Sat, 30 Aug 2014 21:38:59 +0000 (23:38 +0200)]
Makefile: propagate NATIVE_CRLF to C
Commit
95f31e9a (convert: The native line-ending is \r\n on MinGW,
2010-09-04) correctly points out that the NATIVE_CRLF setting is
incorrectly set on Mingw git. However, the Makefile variable is not
propagated to the C preprocessor and results in no change. This patch
pushes the definition to the C code and adds a test to validate that
when core.eol as native is crlf, we actually normalize text files to
this line ending convention when core.autocrlf is false.
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Signed-off-by: Stepan Kasal <kasal@ucw.cz>
Signed-off-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Torsten Bögershausen [Sat, 16 Aug 2014 20:16:58 +0000 (22:16 +0200)]
t0027: Tests for core.eol=native, eol=lf, eol=crlf
Add test cases for core.eol "native" and "" (unset).
(MINGW uses CRLF, all other systems LF as native line endings)
Add test cases for the attributes "eol=lf" and "eol=crlf"
Other minor changes:
- Use the more portable 'tr' instead of 'od -c' to convert '\n' into 'Q'
and '\0' into 'N'
- Style fixes for shell functions according to the coding guide lines
- Replace "txtbin" with "attr"
Signed-off-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Torsten Bögershausen [Sun, 29 Jun 2014 06:34:54 +0000 (08:34 +0200)]
t0027: combinations of core.autocrlf, core.eol and text
Historically there are 3 different parameters controlling how line endings
are handled by Git:
- core.autocrlf
- core.eol
- the "text" attribute in .gitattributes
There are different types of content:
- (1) Files with only LF
- (2) Files with only CRLF
- (3) Files with mixed LF and CRLF
- (4) Files with LF and/or CRLF with CR not followed by LF
- (5) Files which are binary (e.g. have NUL bytes)
Recently the question came up, how files with mixed EOLs are handled by Git
(and libgit2) when they are checked out and core.autocrlf=true.
See
http://git.661346.n2.nabble.com/The-different-EOL-behavior-between-libgit2-based-software-and-official-Git-td7613670.html#
a7613801
Add the EXPENSIVE t0027-auto-crlf.sh to test all combination of files
and parameters for both "git add/commit" and "git checkout".
Signed-off-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Torsten Bögershausen [Sun, 29 Jun 2014 06:34:22 +0000 (08:34 +0200)]
t0025: rename the test files
The current test files are named one, two and three.
Make it clearer what the tests do and rename them into
LFonly, CRLFonly and LFwithNUL.
After the renaming we can see easier that we may want more test cases
for 2 types of files:
- files which have mixed LF and CRLF line endings,
- files which have mixed LF and CR line endings.
See commit
fd6cce9e, "Add per-repository eol normalization" and
"the new safer autocrlf handling" in convert.c
Signed-off-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Fri, 27 Jun 2014 18:23:03 +0000 (11:23 -0700)]
Merge git://ozlabs.org/~paulus/gitk
* git://ozlabs.org/~paulus/gitk:
gitk: Add visiblerefs option, which lists always-shown branches
gitk: Catch mkdtemp errors
gitk: Use mktemp -d to avoid predictable temporary directories
gitk: Honor TMPDIR when viewing external diffs
Max Kirillov [Tue, 24 Jun 2014 05:19:44 +0000 (08:19 +0300)]
gitk: Add visiblerefs option, which lists always-shown branches
When many branches contain a commit, the branches used to be shown in
the form "A, B and many more", where A, B can be master of current
HEAD. But there are more which might be interesting to always know about.
For example, "origin/master".
The new option, visiblerefs, is stored in ~/.gitk. It contains a list
of references which are always shown before "and many more" if they
contain the commit. By default it is `{"master"}', which is compatible
with previous behavior.
Signed-off-by: Max Kirillov <max@max630.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
David Aguilar [Thu, 19 Jun 2014 02:53:14 +0000 (19:53 -0700)]
gitk: Catch mkdtemp errors
105b5d3f ("gitk: Use mktemp -d to avoid predictable temporary
directories") introduced a dependency on mkdtemp, which is not
available on Windows.
Use the original temporary directory behavior when mkdtemp fails.
This makes the code use mkdtemp when available and gracefully
fallback to the existing behavior when it is not available.
Helped-by: Junio C Hamano <gitster@pobox.com>
Helped-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Junio C Hamano [Thu, 26 Jun 2014 20:46:09 +0000 (13:46 -0700)]
Merge early parts from git://ozlabs.org/~paulus/gitk.git
* master~2:
gitk: Show staged submodules regardless of ignore config
gitk: Allow displaying time zones from author and commit dates timestamps
gitk: Switch to patch mode when searching for line origin
gitk: Replace SHA1 entry field on keyboard paste
l10n: Init Vietnamese translation
Junio C Hamano [Thu, 26 Jun 2014 20:44:11 +0000 (13:44 -0700)]
Merge git://repo.or.cz/git-gui
* git://repo.or.cz/git-gui:
git-gui: tolerate major version changes when comparing the git version
git-gui: show staged submodules regardless of ignore config
Junio C Hamano [Wed, 25 Jun 2014 19:32:58 +0000 (12:32 -0700)]
Sync with maint
Junio C Hamano [Wed, 25 Jun 2014 19:32:23 +0000 (12:32 -0700)]
Fifth batch for 2.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Wed, 25 Jun 2014 19:23:57 +0000 (12:23 -0700)]
Merge branch 'jm/dedup-name-compare'
* jm/dedup-name-compare:
cleanup duplicate name_compare() functions
name-hash.c: replace cache_name_compare() with memcmp(3)
Junio C Hamano [Wed, 25 Jun 2014 19:23:56 +0000 (12:23 -0700)]
Merge branch 'ep/avoid-test-a-o'
Update tests and scripts to avoid "test ... -a ...", which is often
more error-prone than "test ... && test ...".
Squashed misconversion fix-up into git-submodule.sh updates.
* ep/avoid-test-a-o:
git-submodule.sh: avoid "echo" path-like values
git-submodule.sh: avoid "test <cond> -a/-o <cond>"
t/test-lib-functions.sh: avoid "test <cond> -a/-o <cond>"
t/t9814-git-p4-rename.sh: avoid "test <cond> -a/-o <cond>"
t/t5538-push-shallow.sh: avoid "test <cond> -a/-o <cond>"
t/t5403-post-checkout-hook.sh: avoid "test <cond> -a/-o <cond>"
t/t5000-tar-tree.sh: avoid "test <cond> -a/-o <cond>"
t/t4102-apply-rename.sh: avoid "test <cond> -a/-o <cond>"
t/t0026-eol-config.sh: avoid "test <cond> -a/-o <cond>"
t/t0025-crlf-auto.sh: avoid "test <cond> -a/-o <cond>"
t/lib-httpd.sh: avoid "test <cond> -a/-o <cond>"
git-rebase--interactive.sh: avoid "test <cond> -a/-o <cond>"
git-mergetool.sh: avoid "test <cond> -a/-o <cond>"
git-bisect.sh: avoid "test <cond> -a/-o <cond>"
contrib/examples/git-resolve.sh: avoid "test <cond> -a/-o <cond>"
contrib/examples/git-repack.sh: avoid "test <cond> -a/-o <cond>"
contrib/examples/git-merge.sh: avoid "test <cond> -a/-o <cond>"
contrib/examples/git-commit.sh: avoid "test <cond> -a/-o <cond>"
contrib/examples/git-clone.sh: avoid "test <cond> -a/-o <cond>"
check_bindir: avoid "test <cond> -a/-o <cond>"
Junio C Hamano [Wed, 25 Jun 2014 19:23:54 +0000 (12:23 -0700)]
Merge branch 'tb/unicode-7.0-display-width'
* tb/unicode-7.0-display-width:
Update of unicode_width.h to Unicode Version 7.0
Junio C Hamano [Wed, 25 Jun 2014 19:23:52 +0000 (12:23 -0700)]
Merge branch 'ye/doc-http-proto'
* ye/doc-http-proto:
http-protocol.txt: Basic Auth is defined in RFC 2617, not RFC 2616
Junio C Hamano [Wed, 25 Jun 2014 19:23:36 +0000 (12:23 -0700)]
Merge branch 'rs/blame-refactor'
* rs/blame-refactor:
blame: simplify prepare_lines()
blame: factor out get_next_line()
Junio C Hamano [Wed, 25 Jun 2014 19:23:34 +0000 (12:23 -0700)]
Merge branch 'pb/trim-trailing-spaces'
* pb/trim-trailing-spaces:
t0008: do not depend on 'echo' handling backslashes specially
Junio C Hamano [Wed, 25 Jun 2014 19:23:29 +0000 (12:23 -0700)]
Merge branch 'mc/doc-submodule-sync-recurse'
* mc/doc-submodule-sync-recurse:
submodule: document "sync --recursive"
Junio C Hamano [Wed, 25 Jun 2014 19:23:27 +0000 (12:23 -0700)]
Merge branch 'sp/complete-ext-alias'
* sp/complete-ext-alias:
completion: handle '!f() { ... }; f' and "!sh -c '...' -" aliases
Junio C Hamano [Wed, 25 Jun 2014 19:23:24 +0000 (12:23 -0700)]
Merge branch 'mc/git-p4-prepare-p4-only'
* mc/git-p4-prepare-p4-only:
git-p4: fix submit in non --prepare-p4-only mode
Junio C Hamano [Wed, 25 Jun 2014 19:23:19 +0000 (12:23 -0700)]
Merge branch 'jk/repack-pack-writebitmaps-config'
* jk/repack-pack-writebitmaps-config:
t7700: drop explicit --no-pack-kept-objects from .keep test
repack: introduce repack.writeBitmaps config option
repack: simplify handling of --write-bitmap-index
pack-objects: stop respecting pack.writebitmaps
Junio C Hamano [Wed, 25 Jun 2014 19:22:00 +0000 (12:22 -0700)]
Merge branch 'nd/init-restore-env'
Some subcommands do not want to be aliased because of the side
effects that happens while the definitions of the aliases are looked
up from configuration system.
* nd/init-restore-env:
git potty: restore environments after alias expansion
Junio C Hamano [Wed, 25 Jun 2014 19:21:51 +0000 (12:21 -0700)]
Merge branch 'jk/repack-pack-keep-objects'
Recent updates to "git repack" started to duplicate objects that
are in packfiles marked with .keep flag into the new packfile by
mistake.
* jk/repack-pack-keep-objects:
repack: s/write_bitmap/&s/ in code
repack: respect pack.writebitmaps
repack: do not accidentally pack kept objects by default
Junio C Hamano [Wed, 25 Jun 2014 19:21:45 +0000 (12:21 -0700)]
Merge branch 'fr/sequencer-fail-with-not-one-upon-no-ff'
* fr/sequencer-fail-with-not-one-upon-no-ff:
sequencer: signal failed ff as an aborted, not a conflicted merge
Junio C Hamano [Wed, 25 Jun 2014 19:21:11 +0000 (12:21 -0700)]
Git 2.0.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Wed, 25 Jun 2014 18:50:13 +0000 (11:50 -0700)]
Merge branch 'na/no-http-test-in-the-middle' into maint
The mode to run tests with HTTP server tests disabled was broken.
* na/no-http-test-in-the-middle:
t5538: move http push tests out to t5542
Junio C Hamano [Wed, 25 Jun 2014 18:50:03 +0000 (11:50 -0700)]
Merge branch 'jl/status-added-submodule-is-never-ignored' into maint
"git status" (and "git commit") behaved as if changes in a modified
submodule are not there if submodule.*.ignore configuration is set,
which was misleading. The configuration is only to unclutter diff
output during the course of development, and should not to hide
changes in the "status" output to cause the users forget to commit
them.
* jl/status-added-submodule-is-never-ignored:
commit -m: commit staged submodules regardless of ignore config
status/commit: show staged submodules regardless of ignore config
Junio C Hamano [Wed, 25 Jun 2014 18:49:48 +0000 (11:49 -0700)]
Merge branch 'ym/fix-opportunistic-index-update-race' into maint
"git status", even though it is a read-only operation, tries to
update the index with refreshed lstat(2) info to optimize future
accesses to the working tree opportunistically, but this could
race with a "read-write" operation that modify the index while it
is running. Detect such a race and avoid overwriting the index.
* ym/fix-opportunistic-index-update-race:
read-cache.c: verify index file before we opportunistically update it
wrapper.c: add xpread() similar to xread()
Junio C Hamano [Wed, 25 Jun 2014 18:49:39 +0000 (11:49 -0700)]
Merge branch 'mk/show-s-no-extra-blank-line-for-merges' into maint
"git show -s" (i.e. show log message only) used to incorrectly emit
an extra blank line after a merge commit.
* mk/show-s-no-extra-blank-line-for-merges:
git-show: fix 'git show -s' to not add extra terminator after merge commit
Junio C Hamano [Wed, 25 Jun 2014 18:49:31 +0000 (11:49 -0700)]
Merge branch 'rr/rebase-autostash-fix' into maint
The autostash mode of "git rebase -i" did not restore the dirty
working tree state if the user aborted the interactive rebase by
emptying the insn sheet.
* rr/rebase-autostash-fix:
rebase -i: test "Nothing to do" case with autostash
rebase -i: handle "Nothing to do" case with autostash
Junio C Hamano [Wed, 25 Jun 2014 18:49:10 +0000 (11:49 -0700)]
Merge branch 'jc/shortlog-ref-exclude' into maint
"git log --exclude=<glob> --all | git shortlog" worked as expected,
but "git shortlog --exclude=<glob> --all", which is supposed to be
identical to the above pipeline, was not accepted at the command
line argument parser level.
* jc/shortlog-ref-exclude:
shortlog: allow --exclude=<glob> to be passed
Junio C Hamano [Wed, 25 Jun 2014 18:49:01 +0000 (11:49 -0700)]
Merge branch 'jl/remote-rm-prune' into maint
"git remote rm" and "git remote prune" can involve removing many
refs at once, which is not a very efficient thing to do when very
many refs exist in the packed-refs file.
* jl/remote-rm-prune:
remote prune: optimize "dangling symref" check/warning
remote: repack packed-refs once when deleting multiple refs
remote rm: delete remote configuration as the last
Junio C Hamano [Wed, 25 Jun 2014 18:48:54 +0000 (11:48 -0700)]
Merge branch 'fc/rerere-conflict-style' into maint
"git rerere forget" did not work well when merge.conflictstyle
was set to a non-default value.
* fc/rerere-conflict-style:
rerere: fix for merge.conflictstyle
Junio C Hamano [Wed, 25 Jun 2014 18:48:42 +0000 (11:48 -0700)]
Merge branch 'rs/pack-objects-no-unnecessary-realloc' into maint
"git pack-objects" unnecessarily copied the previous contents when
extending the hashtable, even though it will populate the table
from scratch anyway.
* rs/pack-objects-no-unnecessary-realloc:
pack-objects: use free()+xcalloc() instead of xrealloc()+memset()
Junio C Hamano [Wed, 25 Jun 2014 18:48:34 +0000 (11:48 -0700)]
Merge branch 'dt/merge-recursive-case-insensitive' into maint
On a case insensitive filesystem, merge-recursive incorrectly
deleted the file that is to be renamed to a name that is the same
except for case differences.
* dt/merge-recursive-case-insensitive:
mv: allow renaming to fix case on case insensitive filesystems
merge-recursive.c: fix case-changing merge bug
Junio C Hamano [Wed, 25 Jun 2014 18:48:23 +0000 (11:48 -0700)]
Merge branch 'rs/mailinfo-header-cmp' into maint
"git mailinfo" used to read beyond the end of header string while
parsing an incoming e-mail message to extract the patch.
* rs/mailinfo-header-cmp:
mailinfo: use strcmp() for string comparison
Junio C Hamano [Wed, 25 Jun 2014 18:48:13 +0000 (11:48 -0700)]
Merge branch 'jk/index-pack-report-missing' into maint
The error reporting from "git index-pack" has been improved to
distinguish missing objects from type errors.
* jk/index-pack-report-missing:
index-pack: distinguish missing objects from type errors
Junio C Hamano [Wed, 25 Jun 2014 18:47:58 +0000 (11:47 -0700)]
Merge branch 'nd/index-pack-one-fd-per-thread' into maint
We used to disable threaded "git index-pack" on platforms without
thread-safe pread(); use a different workaround for such
platforms to allow threaded "git index-pack".
* nd/index-pack-one-fd-per-thread:
index-pack: work around thread-unsafe pread()
Junio C Hamano [Wed, 25 Jun 2014 18:47:49 +0000 (11:47 -0700)]
Merge branch 'sk/spawn-less-case-insensitively-from-grep-O-i' into maint
"git grep -O" to show the lines that hit in the pager did not work
well with case insensitive search. We now spawn "less" with its
"-I" option when it is used as the pager (which is the default).
* sk/spawn-less-case-insensitively-from-grep-O-i:
git grep -O -i: if the pager is 'less', pass the '-I' option
Junio C Hamano [Wed, 25 Jun 2014 18:47:36 +0000 (11:47 -0700)]
Merge branch 'nd/daemonize-gc' into maint
"git gc --auto" was recently changed to run in the background to
give control back early to the end-user sitting in front of the
terminal, but it forgot that housekeeping involving reflogs should
be done without other processes competing for accesses to the refs.
* nd/daemonize-gc:
gc --auto: do not lock refs in the background
Junio C Hamano [Wed, 25 Jun 2014 18:47:23 +0000 (11:47 -0700)]
Merge branch 'jk/diff-follow-must-take-one-pathspec' into maint
"git format-patch" did not enforce the rule that the "--follow"
option from the log/diff family of commands must be used with
exactly one pathspec.
* jk/diff-follow-must-take-one-pathspec:
move "--follow needs one pathspec" rule to diff_setup_done
Junio C Hamano [Wed, 25 Jun 2014 18:47:09 +0000 (11:47 -0700)]
Merge branch 'jk/diff-files-assume-unchanged' into maint
"git diff --find-copies-harder" sometimes pretended as if the mode
bits have changed for paths that are marked with assume-unchanged
bit.
* jk/diff-files-assume-unchanged:
run_diff_files: do not look at uninitialized stat data
Junio C Hamano [Wed, 25 Jun 2014 18:46:54 +0000 (11:46 -0700)]
Merge branch 'jk/commit-C-pick-empty' into maint
"git commit --allow-empty-message -C $commit" did not work when the
commit did not have any log message.
* jk/commit-C-pick-empty:
commit: do not complain of empty messages from -C
Junio C Hamano [Wed, 25 Jun 2014 18:46:44 +0000 (11:46 -0700)]
Merge branch 'bc/blame-crlf-test' into maint
"git blame" assigned the blame to the copy in the working-tree if
the repository is set to core.autocrlf=input and the file used CRLF
line endings.
* bc/blame-crlf-test:
blame: correctly handle files regardless of autocrlf
Junio C Hamano [Wed, 25 Jun 2014 18:46:34 +0000 (11:46 -0700)]
Merge branch 'jx/blame-align-relative-time' into maint
"git blame" miscounted number of columns needed to show localized
timestamps, resulting in jaggy left-side-edge of the source code
lines in its output.
* jx/blame-align-relative-time:
blame: dynamic blame_date_width for different locales
blame: fix broken time_buf paddings in relative timestamp
Junio C Hamano [Wed, 25 Jun 2014 18:46:23 +0000 (11:46 -0700)]
Merge branch 'jc/apply-ignore-whitespace' into maint
"--ignore-space-change" option of "git apply" ignored the spaces
at the beginning of line too aggressively, which is inconsistent
with the option of the same name "diff" and "git diff" have.
* jc/apply-ignore-whitespace:
apply --ignore-space-change: lines with and without leading whitespaces do not match
Junio C Hamano [Wed, 25 Jun 2014 18:46:12 +0000 (11:46 -0700)]
Merge branch 'jk/complete-merge-pull' into maint
The completion scripts (in contrib/) did not know about quite a few
options that are common between "git merge" and "git pull", and a
couple of options unique to "git merge".
* jk/complete-merge-pull:
completion: add missing options for git-merge
completion: add a note that merge options are shared
Junio C Hamano [Wed, 25 Jun 2014 18:45:55 +0000 (11:45 -0700)]
Merge branch 'ow/config-mailmap-pathname' into maint
The "mailmap.file" configuration option did not support the tilde
expansion (i.e. ~user/path and ~/path).
* ow/config-mailmap-pathname:
config: respect '~' and '~user' in mailmap.file
Junio C Hamano [Wed, 25 Jun 2014 18:45:31 +0000 (11:45 -0700)]
Merge branch 'as/pretty-truncate' into maint
The "%<(10,trunc)%s" pretty format specifier in the log family of
commands is used to truncate the string to a given length (e.g. 10
in the example) with padding to column-align the output, but did
not take into account that number of bytes and number of display
columns are different.
* as/pretty-truncate:
pretty.c: format string with truncate respects logOutputEncoding
t4205, t6006: add tests that fail with i18n.logOutputEncoding set
t4205 (log-pretty-format): use `tformat` rather than `format`
t4041, t4205, t6006, t7102: don't hardcode tested encoding value
t4205 (log-pretty-formats): don't hardcode SHA-1 in expected outputs
Junio C Hamano [Wed, 25 Jun 2014 18:44:53 +0000 (11:44 -0700)]
Merge branch 'jc/revision-dash-count-parsing' into maint
"git log -2master" is a common typo that shows two commits starting
from whichever random branch that is not 'master' that happens to
be checked out currently.
* jc/revision-dash-count-parsing:
revision: parse "git log -<count>" more carefully
Junio C Hamano [Wed, 25 Jun 2014 18:43:57 +0000 (11:43 -0700)]
Merge branch 'jk/report-fail-to-read-objects-better' into maint
Reworded the error message given upon a failure to open an existing
loose object file due to e.g. permission issues; it was reported as
the object being corrupt, but that is not quite true.
* jk/report-fail-to-read-objects-better:
open_sha1_file: report "most interesting" errno
Junio C Hamano [Wed, 25 Jun 2014 18:43:43 +0000 (11:43 -0700)]
Merge branch 'mn/sideband-no-ansi' into maint
Tools that read diagnostic output in our standard error stream do
not want to see terminal control sequence (e.g. erase-to-eol).
Detect them by checking if the standard error stream is connected
to a tty.
* mn/sideband-no-ansi:
sideband.c: do not use ANSI control sequence on non-terminal
Junio C Hamano [Wed, 25 Jun 2014 18:43:07 +0000 (11:43 -0700)]
Merge branch 'je/pager-do-not-recurse' into maint
We used to unconditionally disable the pager in the pager process
we spawn to feed out output, but that prevented people who want to
run "less" within "less" from doing so.
* je/pager-do-not-recurse:
pager: do allow spawning pager recursively
Junio C Hamano [Fri, 20 Jun 2014 20:22:55 +0000 (13:22 -0700)]
Fourth batch for 2.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Fri, 20 Jun 2014 20:21:26 +0000 (13:21 -0700)]
Merge branch 'jc/test-lazy-prereq' (early part)
* 'jc/test-lazy-prereq' (early part):
t3419: drop unnecessary NOT_EXPENSIVE pseudo-prerequisite
t3302: drop unnecessary NOT_EXPENSIVE pseudo-prerequisite
t3302: do not chdir around in the primary test process
t3302: coding style updates
test: turn USR_BIN_TIME into a lazy prerequisite
test: turn EXPENSIVE into a lazy prerequisite
Junio C Hamano [Fri, 20 Jun 2014 20:14:10 +0000 (13:14 -0700)]
Merge branch 'jc/fetch-pull-refmap'
* jc/fetch-pull-refmap:
docs: Explain the purpose of fetch's and pull's <refspec> parameter.
fetch: allow explicit --refmap to override configuration
fetch doc: add a section on configured remote-tracking branches
fetch doc: remove "short-cut" section
fetch doc: update refspec format description
fetch doc: on pulling multiple refspecs
fetch doc: remove notes on outdated "mixed layout"
fetch doc: update note on '+' in front of the refspec
fetch doc: move FETCH_HEAD material lower and add an example
fetch doc: update introductory part for clarity
Junio C Hamano [Fri, 20 Jun 2014 20:12:19 +0000 (13:12 -0700)]
Merge branch 'mt/send-email-cover-to-cc'
* mt/send-email-cover-to-cc:
t9001: avoid non-portable '\n' with sed
test/send-email: to-cover, cc-cover tests
git-send-email: two new options: to-cover, cc-cover
Junio C Hamano [Fri, 20 Jun 2014 20:12:17 +0000 (13:12 -0700)]
Merge branch 'tb/t5551-clone-notice-to-stderr'
* tb/t5551-clone-notice-to-stderr:
t5551: fix the 50,000 tag test
Junio C Hamano [Fri, 20 Jun 2014 20:12:13 +0000 (13:12 -0700)]
Merge branch 'rs/more-starts-with'
* rs/more-starts-with:
Use starts_with() for C strings instead of memcmp()
Junio C Hamano [Fri, 20 Jun 2014 20:12:10 +0000 (13:12 -0700)]
Merge branch 'jm/api-strbuf-doc'
* jm/api-strbuf-doc:
api-strbuf.txt minor typos
Junio C Hamano [Fri, 20 Jun 2014 20:10:25 +0000 (13:10 -0700)]
Merge branch 'jc/revision-dash-count-parsing'
"git log -2master" is a common typo that shows two commits starting
from whichever random branch that is not 'master' that happens to
be checked out currently.
* jc/revision-dash-count-parsing:
revision: parse "git log -<count>" more carefully
Jeremiah Mahler [Fri, 20 Jun 2014 02:06:44 +0000 (19:06 -0700)]
cleanup duplicate name_compare() functions
We often represent our strings as a counted string, i.e. a pair of
the pointer to the beginning of the string and its length, and the
string may not be NUL terminated to that length.
To compare a pair of such counted strings, unpack-trees.c and
read-cache.c implement their own name_compare() functions
identically. In addition, the cache_name_compare() function in
read-cache.c is nearly identical. The only difference is when one
string is the prefix of the other string, in which case
name_compare() returns -1/+1 to show which one is longer, and
cache_name_compare() returns the difference of the lengths to show
the same information.
Unify these three functions by using the implementation from
cache_name_compare(). This does not make any difference to the
existing and future callers, as they must be paying attention only
to the sign of the returned value (and not the magnitude) because
the original implementations of these two functions return values
returned by memcmp(3) when the one string is not a prefix of the
other string, and the only thing memcmp(3) guarantees its callers is
the sign of the returned value, not the magnitude.
Signed-off-by: Jeremiah Mahler <jmmahler@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeremiah Mahler [Fri, 20 Jun 2014 02:06:43 +0000 (19:06 -0700)]
name-hash.c: replace cache_name_compare() with memcmp(3)
The same_name() private function wants a quick-and-exact check to
see if they two names are byte-for-byte identical first and then
fall back to the slow path. Use memcmp(3) for the former to make it
clear that we do not want any "name" specific comparison.
Signed-off-by: Jeremiah Mahler <jmmahler@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Tue, 10 Jun 2014 15:33:39 +0000 (08:33 -0700)]
git-submodule.sh: avoid "echo" path-like values
SysV-derived implementation of "echo" interprets some backslash
sequences as special instruction, e.g. "echo 'ab\c'" shows an
incomplete line with 'a' and 'b' on it. Avoid using it when showing
a path-like values in the script.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Elia Pinto [Tue, 10 Jun 2014 12:28:33 +0000 (05:28 -0700)]
git-submodule.sh: avoid "test <cond> -a/-o <cond>"
The construct is error-prone; "test" being built-in in most modern
shells, the reason to avoid "test <cond> && test <cond>" spawning
one extra process by using a single "test <cond> -a <cond>" no
longer exists.
Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Torsten Bögershausen [Tue, 17 Jun 2014 19:56:08 +0000 (21:56 +0200)]
Update of unicode_width.h to Unicode Version 7.0
Unicode Version 7.0 was released yesterday.
Run ./update_unicode.sh to update the zero_width table.
Note: the double_width is unchanged.
Signed-off-by: Torsten Bögershausen <tboegi@web.de>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 16 Jun 2014 19:39:35 +0000 (12:39 -0700)]
Third batch for 2.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 16 Jun 2014 19:18:56 +0000 (12:18 -0700)]
Merge branch 'ib/test-selectively-run'
Allow specifying only certain individual test pieces to be run
using a range notation (e.g. "t1234-test.sh --run='1-4 6 8 9-'").
* ib/test-selectively-run:
t0000-*.sh: fix the GIT_SKIP_TESTS sub-tests
test-lib: '--run' to run only specific tests
test-lib: tests skipped by GIT_SKIP_TESTS say so
test-lib: document short options in t/README
Junio C Hamano [Mon, 16 Jun 2014 19:18:55 +0000 (12:18 -0700)]
Merge branch 'ta/string-list-init'
* ta/string-list-init:
string-list: spell all values out that are given to a string_list initializer
Junio C Hamano [Mon, 16 Jun 2014 19:18:54 +0000 (12:18 -0700)]
Merge branch 'jm/dedup-test-config'
* jm/dedup-test-config:
t/t7810-grep.sh: remove duplicate test_config()
Junio C Hamano [Mon, 16 Jun 2014 19:18:52 +0000 (12:18 -0700)]
Merge branch 'dt/refs-check-refname-component-optim'
* dt/refs-check-refname-component-optim:
refs.c: optimize check_refname_component()
Junio C Hamano [Mon, 16 Jun 2014 19:18:50 +0000 (12:18 -0700)]
Merge branch 'sk/test-cmp-bin'
* sk/test-cmp-bin:
t5000, t5003: do not use test_cmp to compare binary files
Junio C Hamano [Mon, 16 Jun 2014 19:18:49 +0000 (12:18 -0700)]
Merge branch 'sh/enable-preloadindex'
* sh/enable-preloadindex:
environment.c: enable core.preloadindex by default
Junio C Hamano [Mon, 16 Jun 2014 19:18:48 +0000 (12:18 -0700)]
Merge branch 'rs/read-ref-at'
* rs/read-ref-at:
refs.c: change read_ref_at to use the reflog iterators
Junio C Hamano [Mon, 16 Jun 2014 19:18:47 +0000 (12:18 -0700)]
Merge branch 'jk/error-resolve-conflict-advice'
* jk/error-resolve-conflict-advice:
error_resolve_conflict: drop quotations around operation
error_resolve_conflict: rewrap advice message
Junio C Hamano [Mon, 16 Jun 2014 19:18:42 +0000 (12:18 -0700)]
Merge branch 'rs/pack-objects-no-unnecessary-realloc'
Avoid unnecessary copy of previous contents when extending the
hashtable used in pack-objects.
* rs/pack-objects-no-unnecessary-realloc:
pack-objects: use free()+xcalloc() instead of xrealloc()+memset()
Junio C Hamano [Mon, 16 Jun 2014 19:18:41 +0000 (12:18 -0700)]
Merge branch 'lt/log-auto-decorate'
* lt/log-auto-decorate:
git log: support "auto" decorations
Junio C Hamano [Mon, 16 Jun 2014 19:18:39 +0000 (12:18 -0700)]
Merge branch 'jm/doc-wording-tweaks'
* jm/doc-wording-tweaks:
Documentation: wording fixes in the user manual and glossary
Junio C Hamano [Mon, 16 Jun 2014 19:18:38 +0000 (12:18 -0700)]
Merge branch 'jm/format-patch-mail-sig'
* jm/format-patch-mail-sig:
format-patch: add "--signature-file=<file>" option
format-patch: make newline after signature conditional
Junio C Hamano [Mon, 16 Jun 2014 19:18:35 +0000 (12:18 -0700)]
Merge branch 'jk/http-errors'
Propagate the error messages from the webserver better to the
client coming over the HTTP transport.
* jk/http-errors:
http: default text charset to iso-8859-1
remote-curl: reencode http error messages
strbuf: add strbuf_reencode helper
http: optionally extract charset parameter from content-type
http: extract type/subtype portion of content-type
t5550: test display of remote http error messages
t/lib-httpd: use write_script to copy CGI scripts
test-lib: preserve GIT_CURL_VERBOSE from the environment
Junio C Hamano [Mon, 16 Jun 2014 19:18:24 +0000 (12:18 -0700)]
Merge branch 'ow/config-mailmap-pathname'
mailmap.file configuration names a pathname, hence should honor
~/path and ~user/path as its value.
* ow/config-mailmap-pathname:
config: respect '~' and '~user' in mailmap.file
Junio C Hamano [Mon, 16 Jun 2014 19:18:15 +0000 (12:18 -0700)]
Merge branch 'fc/remote-helper-refmap'
Allow remote-helper/fast-import based transport to rename the refs
while transferring the history.
* fc/remote-helper-refmap:
transport-helper: remove unnecessary strbuf resets
transport-helper: add support to delete branches
fast-export: add support to delete refs
fast-import: add support to delete refs
transport-helper: add support to push symbolic refs
transport-helper: add support for old:new refspec
fast-export: add new --refspec option
fast-export: improve argument parsing
Junio C Hamano [Mon, 16 Jun 2014 19:18:12 +0000 (12:18 -0700)]
Merge branch 'nd/daemonize-gc'
"git gc --auto" was recently changed to run in the background to
give control back early to the end-user sitting in front of the
terminal, but it forgot that housekeeping involving reflogs should
be done without other processes competing for accesses to the refs.
* nd/daemonize-gc:
gc --auto: do not lock refs in the background
Junio C Hamano [Mon, 16 Jun 2014 19:18:09 +0000 (12:18 -0700)]
Merge branch 'jm/t9138-style-fix'
* jm/t9138-style-fix:
t9138-git-svn-authors-prog.sh fixups
Junio C Hamano [Mon, 16 Jun 2014 19:18:06 +0000 (12:18 -0700)]
Merge branch 'jm/instaweb-apache-24'
* jm/instaweb-apache-24:
git-instaweb: add support for Apache 2.4
Junio C Hamano [Mon, 16 Jun 2014 19:17:58 +0000 (12:17 -0700)]
Merge branch 'jl/remote-rm-prune'
"git remote rm" and "git remote prune" can involve removing many
refs at once, which is not a very efficient thing to do when very
many refs exist in the packed-refs file.
* jl/remote-rm-prune:
remote prune: optimize "dangling symref" check/warning
remote: repack packed-refs once when deleting multiple refs
remote rm: delete remote configuration as the last
Junio C Hamano [Mon, 16 Jun 2014 19:17:53 +0000 (12:17 -0700)]
Merge branch 'jk/complete-merge-pull'
The completion code did not know about quite a few options that are
common between "git merge" and "git pull", and a couple of options
unique to "git merge".
* jk/complete-merge-pull:
completion: add missing options for git-merge
completion: add a note that merge options are shared
Junio C Hamano [Mon, 16 Jun 2014 19:17:50 +0000 (12:17 -0700)]
Merge branch 'bg/xcalloc-nmemb-then-size'
Like calloc(3), xcalloc() takes nmemb and then size.
* bg/xcalloc-nmemb-then-size:
transport-helper.c: rearrange xcalloc arguments
remote.c: rearrange xcalloc arguments
reflog-walk.c: rearrange xcalloc arguments
pack-revindex.c: rearrange xcalloc arguments
notes.c: rearrange xcalloc arguments
imap-send.c: rearrange xcalloc arguments
http-push.c: rearrange xcalloc arguments
diff.c: rearrange xcalloc arguments
config.c: rearrange xcalloc arguments
commit.c: rearrange xcalloc arguments
builtin/remote.c: rearrange xcalloc arguments
builtin/ls-remote.c: rearrange xcalloc arguments
Yi EungJun [Sat, 14 Jun 2014 19:09:29 +0000 (04:09 +0900)]
http-protocol.txt: Basic Auth is defined in RFC 2617, not RFC 2616
Signed-off-by: Yi EungJun <eungjun.yi@navercorp.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 16 Jun 2014 17:07:19 +0000 (10:07 -0700)]
Merge branch 'jl/status-added-submodule-is-never-ignored'
submodule.*.ignore and diff.ignoresubmodules are used to ignore all
submodule changes in "diff" output, but it can be confusing to
apply these configuration values to status and commit.
This is a backward-incompatible change, but should be so in a good
way (aka bugfix).
* jl/status-added-submodule-is-never-ignored:
commit -m: commit staged submodules regardless of ignore config
status/commit: show staged submodules regardless of ignore config
Junio C Hamano [Mon, 16 Jun 2014 17:07:17 +0000 (10:07 -0700)]
Merge branch 'cb/byte-order'
Compatibility enhancement for Solaris.
* cb/byte-order:
compat/bswap.h: fix endianness detection
compat/bswap.h: restore preference __BIG_ENDIAN over BIG_ENDIAN
compat/bswap.h: detect endianness on more platforms that don't use BYTE_ORDER
Junio C Hamano [Mon, 16 Jun 2014 17:07:16 +0000 (10:07 -0700)]
Merge branch 'jk/strbuf-tolower'
* jk/strbuf-tolower:
strbuf: add strbuf_tolower function
Junio C Hamano [Mon, 16 Jun 2014 17:07:14 +0000 (10:07 -0700)]
Merge branch 'jk/daemon-tolower'
* jk/daemon-tolower:
daemon/config: factor out duplicate xstrdup_tolower
Junio C Hamano [Mon, 16 Jun 2014 17:07:12 +0000 (10:07 -0700)]
Merge branch 'as/pretty-truncate'
* as/pretty-truncate:
pretty.c: format string with truncate respects logOutputEncoding
t4205, t6006: add tests that fail with i18n.logOutputEncoding set
t4205 (log-pretty-format): use `tformat` rather than `format`
t4041, t4205, t6006, t7102: don't hardcode tested encoding value
t4205 (log-pretty-formats): don't hardcode SHA-1 in expected outputs
Junio C Hamano [Mon, 16 Jun 2014 17:07:09 +0000 (10:07 -0700)]
Merge branch 'jk/diff-follow-must-take-one-pathspec'
* jk/diff-follow-must-take-one-pathspec:
move "--follow needs one pathspec" rule to diff_setup_done
Junio C Hamano [Mon, 16 Jun 2014 17:07:03 +0000 (10:07 -0700)]
Merge branch 'sk/windows-unc-path'
* sk/windows-unc-path:
Windows: allow using UNC path for git repository
Junio C Hamano [Mon, 16 Jun 2014 17:06:57 +0000 (10:06 -0700)]
Merge branch 'rr/rebase-autostash-fix'
* rr/rebase-autostash-fix:
rebase -i: test "Nothing to do" case with autostash
rebase -i: handle "Nothing to do" case with autostash
Junio C Hamano [Mon, 16 Jun 2014 17:06:15 +0000 (10:06 -0700)]
Merge branch 'jk/report-fail-to-read-objects-better'
* jk/report-fail-to-read-objects-better:
open_sha1_file: report "most interesting" errno
Junio C Hamano [Mon, 16 Jun 2014 17:06:12 +0000 (10:06 -0700)]
Merge branch 'jk/diff-files-assume-unchanged'
* jk/diff-files-assume-unchanged:
run_diff_files: do not look at uninitialized stat data
Junio C Hamano [Mon, 16 Jun 2014 17:06:10 +0000 (10:06 -0700)]
Merge branch 'jk/argv-array-for-child-process'
* jk/argv-array-for-child-process:
argv-array: drop "detach" code
get_importer: use run-command's internal argv_array
get_exporter: use argv_array
get_helper: use run-command's internal argv_array
git_connect: use argv_array
run_column_filter: use argv_array
run-command: store an optional argv_array