Commit graph

38760 commits

Author SHA1 Message Date
Junio C Hamano 3a52578eef Git 2.3.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-23 11:27:27 -07:00
Junio C Hamano 437ed4cea1 Merge branch 'rs/use-isxdigit' into maint
Code cleanup.

* rs/use-isxdigit:
  use isxdigit() for checking if a character is a hexadecimal digit
2015-03-23 11:23:41 -07:00
Junio C Hamano a393c6bfd9 Merge branch 'rs/deflate-init-cleanup' into maint
Code simplification.

* rs/deflate-init-cleanup:
  zlib: initialize git_zstream in git_deflate_init{,_gzip,_raw}
2015-03-23 11:23:38 -07:00
Junio C Hamano a4f287e5aa Merge branch 'ak/git-done-help-cleanup' into maint
Code simplification.

* ak/git-done-help-cleanup:
  git: make was_alias and done_help non-static
2015-03-23 11:23:35 -07:00
Junio C Hamano 7d6f6e3730 Merge branch 'sg/completion-remote' into maint
Code simplification.

* sg/completion-remote:
  completion: simplify __git_remotes()
  completion: add a test for __git_remotes() helper function
2015-03-23 11:23:33 -07:00
Junio C Hamano ffac6258de Merge branch 'mg/doc-status-color-slot' into maint
Documentation fixes.

* mg/doc-status-color-slot:
  config,completion: add color.status.unmerged
2015-03-23 11:23:31 -07:00
Junio C Hamano 3f6f5c9dbe Merge branch 'jc/decorate-leaky-separator-color' into maint
"git log --decorate" did not reset colors correctly around the
branch names.

* jc/decorate-leaky-separator-color:
  log --decorate: do not leak "commit" color into the next item
  Documentation/config.txt: simplify boolean description in the syntax section
  Documentation/config.txt: describe 'color' value type in the "Values" section
  Documentation/config.txt: have a separate "Values" section
  Documentation/config.txt: describe the structure first and then meaning
  Documentation/config.txt: explain multi-valued variables once
  Documentation/config.txt: avoid unnecessary negation
2015-03-23 11:23:28 -07:00
Junio C Hamano c97418466a Merge branch 'kn/git-cd-to-empty' into maint
"git -C '' subcmd" refused to work in the current directory, unlike
"cd ''" which silently behaves as a no-op.

* kn/git-cd-to-empty:
  git: treat "git -C '<path>'" as a no-op when <path> is empty
2015-03-23 11:23:25 -07:00
Junio C Hamano 84a37fae51 Merge branch 'km/imap-send-libcurl-options' into maint
"git imap-send" learned to optionally talk with an IMAP server via
libcURL; because there is no other option when Git is built with
NO_OPENSSL option, use that codepath by default under such
configuration.

* km/imap-send-libcurl-options:
  imap-send: use cURL automatically when NO_OPENSSL defined
2015-03-23 11:23:23 -07:00
Junio C Hamano 82b6e331a4 Merge branch 'mg/verify-commit' into maint
Workarounds for certain build of GPG that triggered false breakage
in a test.

* mg/verify-commit:
  t7510: do not fail when gpg warns about insecure memory
2015-03-23 11:23:20 -07:00
Junio C Hamano f63ed085e2 Merge branch 'es/rebase-i-count-todo' into maint
"git rebase -i" recently started to include the number of
commits in the insn sheet to be processed, but on a platform
that prepends leading whitespaces to "wc -l" output, the numbers
are shown with extra whitespaces that aren't necessary.

* es/rebase-i-count-todo:
  rebase-interactive: re-word "item count" comment
  rebase-interactive: suppress whitespace preceding item count
2015-03-23 11:23:17 -07:00
Junio C Hamano 8c2ea51254 Merge branch 'tb/connect-ipv6-parse-fix' into maint
We did not parse username followed by literal IPv6 address in SSH
transport URLs, e.g. ssh://user@[2001:db8::1]:22/repo.git
correctly.

* tb/connect-ipv6-parse-fix:
  t5500: show user name and host in diag-url
  t5601: add more test cases for IPV6
  connect.c: allow ssh://user@[2001:db8::1]/repo.git
2015-03-23 11:23:13 -07:00
Junio C Hamano bb8577532a Git 2.3.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-13 22:57:25 -07:00
Junio C Hamano 4b23b5d1af Merge branch 'mr/doc-clean-f-f' into maint
Documentation update.

* mr/doc-clean-f-f:
  Documentation/git-clean.txt: document that -f may need to be given twice
2015-03-13 22:56:12 -07:00
Junio C Hamano 113bc16094 Merge branch 'ak/t5516-typofix' into maint
* ak/t5516-typofix:
  t5516: correct misspelled pushInsteadOf
2015-03-13 22:56:11 -07:00
Junio C Hamano bb8f6de064 Merge branch 'jc/diff-test-updates' into maint
Test clean-up.

* jc/diff-test-updates:
  test_ln_s_add: refresh stat info of fake symbolic links
  t4008: modernise style
  t/diff-lib: check exact object names in compare_diff_raw
  tests: do not borrow from COPYING and README from the real source
  t4010: correct expected object names
  t9300: correct expected object names
  t4008: correct stale comments
2015-03-13 22:56:10 -07:00
Junio C Hamano 3aab60b3ba Merge branch 'jk/diffcore-rename-duplicate' into maint
A corrupt input to "git diff -M" can cause us to segfault.

* jk/diffcore-rename-duplicate:
  diffcore-rename: avoid processing duplicate destinations
  diffcore-rename: split locate_rename_dst into two functions
2015-03-13 22:56:08 -07:00
Junio C Hamano ae8ada450a Merge branch 'bw/kwset-use-unsigned' into maint
The borrowed code in kwset API did not follow our usual convention
to use "unsigned char" to store values that range from 0-255.

* bw/kwset-use-unsigned:
  kwset: use unsigned char to store values with high-bit set
2015-03-13 22:56:07 -07:00
Junio C Hamano 2408f3b74b Merge branch 'nd/grep-exclude-standard-help-fix' into maint
Description given by "grep -h" for its --exclude-standard option
was phrased poorly.

* nd/grep-exclude-standard-help-fix:
  grep: correct help string for --exclude-standard
2015-03-13 22:56:06 -07:00
Junio C Hamano 3af1bcafff Merge branch 'mg/doc-remote-tags-or-not' into maint
"git remote add" mentioned "--tags" and "--no-tags" and was not
clear that fetch from the remote in the future will use the default
behaviour when neither is given to override it.

* mg/doc-remote-tags-or-not:
  git-remote.txt: describe behavior without --tags and --no-tags
2015-03-13 22:56:05 -07:00
Junio C Hamano a4b4f9b8e3 Merge branch 'mk/diff-shortstat-dirstat-fix' into maint
"git diff --shortstat --dirstat=changes" showed a dirstat based on
lines that was never asked by the end user in addition to the
dirstat that the user asked for.

* mk/diff-shortstat-dirstat-fix:
  diff --shortstat --dirstat: remove duplicate output
2015-03-13 22:56:04 -07:00
Junio C Hamano 30a52c1dcb Merge branch 'ms/submodule-update-config-doc' into maint
The interaction between "git submodule update" and the
submodule.*.update configuration was not clearly documented.

* ms/submodule-update-config-doc:
  submodule: improve documentation of update subcommand
2015-03-13 22:56:03 -07:00
Junio C Hamano 5244a31039 Merge branch 'jc/apply-beyond-symlink' into maint
"git apply" was not very careful about reading from, removing,
updating and creating paths outside the working tree (under
--index/--cached) or the current directory (when used as a
replacement for GNU patch).

* jc/apply-beyond-symlink:
  apply: do not touch a file beyond a symbolic link
  apply: do not read from beyond a symbolic link
  apply: do not read from the filesystem under --index
  apply: reject input that touches outside the working area
2015-03-13 22:56:02 -07:00
Junio C Hamano 1469d99068 Merge branch 'rs/daemon-interpolate' into maint
"git daemon" looked up the hostname even when "%CH" and "%IP"
interpolations are not requested, which was unnecessary.

* rs/daemon-interpolate:
  daemon: use callback to build interpolated path
  daemon: look up client-supplied hostname lazily
2015-03-13 22:56:01 -07:00
Junio C Hamano c722ba4814 Merge branch 'jk/daemon-interpolate' into maint
The "interpolated-path" option of "git daemon" inserted any string
client declared on the "host=" capability request without checking.
Sanitize and limit %H and %CH to a saner and a valid DNS name.

* jk/daemon-interpolate:
  daemon: sanitize incoming virtual hostname
  t5570: test git-daemon's --interpolated-path option
  git_connect: let user override virtual-host we send to daemon
2015-03-13 22:55:59 -07:00
René Scharfe 6f75d45b24 use isxdigit() for checking if a character is a hexadecimal digit
Use the standard function isxdigit() to make the intent clearer and
avoid using magic constants.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-10 15:44:41 -07:00
Michael J Gruber 0d6accc01d config,completion: add color.status.unmerged
Reported-by: "Mladen B." <mladen074@gmail.com>
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-10 15:27:59 -07:00
Kyle J. McKay 3f88c1b524 t7510: do not fail when gpg warns about insecure memory
Depending on how gpg was built, it may issue the following
message to stderr when run:

  Warning: using insecure memory!

When the test is collecting gpg output it is therefore not
enough to just match on a "gpg: " prefix it must also match
on a "Warning: " prefix wherever it needs to match lines
that have been produced by gpg.

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
Acked-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-10 15:25:22 -07:00
Kyle J. McKay dcd01ea187 imap-send: use cURL automatically when NO_OPENSSL defined
If both USE_CURL_FOR_IMAP_SEND and NO_OPENSSL are defined do
not force the user to add --curl to get a working git imap-send
command.

Instead automatically select --curl and warn and ignore the
--no-curl option.  And while we're in there, correct the
warning message when --curl is requested but not supported.

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-10 15:19:05 -07:00
Karthik Nayak 6a536e2076 git: treat "git -C '<path>'" as a no-op when <path> is empty
'git -C ""' unhelpfully dies with error "Cannot change to ''",
whereas the shell treats `cd ""' as a no-op.  Taking the shell's
behavior as a precedent, teach git to treat `-C ""' as a no-op, as
well.

Helped-by: Junio C Hamano <gitster@pobox.com>
Helped-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-06 19:42:00 -08:00
Junio C Hamano 1165ae6f3d Git 2.3.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-06 14:58:14 -08:00
Junio C Hamano f69f5f19cf Merge branch 'rj/no-xopen-source-for-cygwin' into maint
Code cleanups.

* rj/no-xopen-source-for-cygwin:
  git-compat-util.h: remove redundant code
2015-03-06 14:57:58 -08:00
Junio C Hamano f56a5f4fed Merge branch 'rs/simple-cleanups' into maint
Code cleanups.

* rs/simple-cleanups:
  sha1_name: use strlcpy() to copy strings
  pretty: use starts_with() to check for a prefix
  for-each-ref: use skip_prefix() to avoid duplicate string comparison
  connect: use strcmp() for string comparison
2015-03-06 14:57:57 -08:00
Junio C Hamano d86679fa06 Merge branch 'mm/am-c-doc' into maint
The configuration variable 'mailinfo.scissors' was hard to
discover in the documentation.

* mm/am-c-doc:
  Documentation/git-am.txt: mention mailinfo.scissors config variable
  Documentation/config.txt: document mailinfo.scissors
2015-03-06 14:57:56 -08:00
Junio C Hamano 2e7ca2745b Merge branch 'ew/svn-maint-fixes' into maint
Correct a breakage to git-svn around v2.2 era that triggers
premature closing of FileHandle.

* ew/svn-maint-fixes:
  Git::SVN::*: avoid premature FileHandle closure
  git-svn: fix localtime=true on non-glibc environments
2015-03-06 14:57:55 -08:00
Junio C Hamano e1db59e179 Merge branch 'km/send-email-getopt-long-workarounds' into maint
Even though we officially haven't dropped Perl 5.8 support, the
Getopt::Long package that came with it does not support "--no-"
prefix to negate a boolean option; manually add support to help
people with older Getopt::Long package.

* km/send-email-getopt-long-workarounds:
  git-send-email.perl: support no- prefix with older GetOptions
2015-03-06 14:57:54 -08:00
SZEDER Gábor 53e53c7c81 completion: simplify __git_remotes()
The __git_remotes() helper function lists the remotes from the config
file by processing the output of a 'git config' query.  A simple 'git
remote' produces the exact same output, so run that instead.

Remotes under '$GIT_DIR/remotes' are still listed by running 'ls -1',
because 'git remote' unfortunately ignores them.

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-06 12:48:02 -08:00
SZEDER Gábor 2acc194075 completion: add a test for __git_remotes() helper function
The test checks that both remotes under '$GIT_DIR/remotes' and remotes
in the config file are listed.

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-06 12:48:00 -08:00
Eric Sunshine 2185d3b7ad rebase-interactive: re-word "item count" comment
97f05f43 (Show number of TODO items for interactive rebase, 2014-12-10)
taught rebase-interactive to display an item count in the instruction
list comments:

    # Rebase 46640c6..5568fd5 onto 46640c6 (4 TODO item(s))
    #
    # Commands:
    # p, pick = use commit
    # ...

However, with the exception of the --edit-todo option, "TODO" is a
one-off term, never presented to the user by rebase-interactive in
any other context. The item count is in fact the number of commands
("pick", "edit", etc.) remaining on the instruction sheet, and the
comment immediately following it talks about "Commands". Consequently,
replace "(# TODO item(s))" with the more accurate and meaningful
"(# command(s))".

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-06 12:25:33 -08:00
Eric Sunshine 28c8cfc363 rebase-interactive: suppress whitespace preceding item count
97f05f43 (Show number of TODO items for interactive rebase, 2014-12-10)
taught rebase-interactive to compute an item count with 'wc -l' and
display it in the instruction list comments:

    # Rebase 46640c6..5568fd5 onto 46640c6 (4 TODO item(s))

On Mac OS X, however, it renders as:

    # Rebase 46640c6..5568fd5 onto 46640c6 (       4 TODO item(s))

since 'wc -l' indents its output with leading spaces. Fix this.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-06 12:11:27 -08:00
Alexander Kuleshov 8fa7975b07 git: make was_alias and done_help non-static
'was_alias' variable does not need to store it's value on each
iteration in the loop; this variable gets assigned the result
of run_argv() every time in the loop before being used.

'done_help' variable does not need to be static variable too if
we move it out the loop.

Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
Helped-by: Eric Sunshine <sunshine@sunshineco.com>
Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-06 12:03:30 -08:00
René Scharfe 9a6f1287fb zlib: initialize git_zstream in git_deflate_init{,_gzip,_raw}
Clear the git_zstream variable at the start of git_deflate_init() etc.
so that callers don't have to do that.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-05 15:46:03 -08:00
Junio C Hamano 3ebda3e9f5 Prepare for 2.3.2 2015-03-05 13:15:53 -08:00
Junio C Hamano 1e299f5286 Merge branch 'sb/plug-leak-in-make-cache-entry' into maint
"update-index --refresh" used to leak when an entry cannot be
refreshed for whatever reason.

* sb/plug-leak-in-make-cache-entry:
  read-cache.c: free cache entry when refreshing fails
2015-03-05 13:13:14 -08:00
Junio C Hamano 4e0d6207e5 Merge branch 'jk/fast-import-die-nicely-fix' into maint
"git fast-import" used to crash when it could not close and
conclude the resulting packfile cleanly.

* jk/fast-import-die-nicely-fix:
  fast-import: avoid running end_packfile recursively
2015-03-05 13:13:13 -08:00
Junio C Hamano 007f7f6e54 Merge branch 'es/blame-commit-info-fix' into maint
"git blame" died, trying to free an uninitialized piece of memory.

* es/blame-commit-info-fix:
  builtin/blame: destroy initialized commit_info only
2015-03-05 13:13:12 -08:00
Junio C Hamano 33367575b8 Merge branch 'ab/merge-file-prefix' into maint
"git merge-file" did not work correctly in a subdirectory.

* ab/merge-file-prefix:
  merge-file: correctly open files when in a subdir
2015-03-05 13:13:11 -08:00
Junio C Hamano 3630be2749 Merge branch 'ps/submodule-sanitize-path-upon-add' into maint
"git submodule add" failed to squash "path/to/././submodule" to
"path/to/submodule".

* ps/submodule-sanitize-path-upon-add:
  git-submodule.sh: fix '/././' path normalization
2015-03-05 13:13:10 -08:00
Junio C Hamano cbc8d6d8f8 Merge branch 'jk/prune-mtime' into maint
In v2.2.0, we broke "git prune" that runs in a repository that
borrows from an alternate object store.

* jk/prune-mtime:
  sha1_file: fix iterating loose alternate objects
  for_each_loose_file_in_objdir: take an optional strbuf path
2015-03-05 13:13:08 -08:00
Junio C Hamano f5a191d3dc Merge branch 'tc/curl-vernum-output-broken-in-7.11' into maint
Certain older vintages of cURL give irregular output from
"curl-config --vernum", which confused our build system.

* tc/curl-vernum-output-broken-in-7.11:
  Makefile: handle broken curl version number in version check
2015-03-05 13:13:07 -08:00