Commit graph

41721 commits

Author SHA1 Message Date
Junio C Hamano
a61fd3fc3f Merge branch 'dt/fsck-verify-pack-error' into maint
The exit code of git-fsck didnot reflect some types of errors found
in packed objects, which has been corrected.

* dt/fsck-verify-pack-error:
  verify_pack: do not ignore return value of verification function
2015-12-15 09:42:20 -08:00
Junio C Hamano
de301c5c85 Merge branch 'ep/ident-with-getaddrinfo' into maint
A fix-up for recent topic.

* ep/ident-with-getaddrinfo:
  ident: fix undefined variable when NO_IPV6 is set
  ident.c: add support for IPv6
2015-12-15 09:42:01 -08:00
Junio C Hamano
f97f2e5c64 Merge branch 'ls/p4-keep-empty-commits' into maint
"git p4" used to import Perforce CLs that touch only paths outside
the client spec as empty commits.  It has been corrected to ignore
them instead, with a new configuration git-p4.keepEmptyCommits as a
backward compatibility knob.

* ls/p4-keep-empty-commits:
  git-p4: add option to keep empty commits
2015-12-15 09:34:19 -08:00
Junio C Hamano
9c69f77dcb Merge branch 'jk/send-email-complete-aliases'
A fix-up for recent topic.

* jk/send-email-complete-aliases:
  completion: fix completing unstuck email alias arguments
2015-12-15 09:33:19 -08:00
Junio C Hamano
47be26dfcc Merge branch 'ep/ident-with-getaddrinfo'
A fix-up for recent topic.

* ep/ident-with-getaddrinfo:
  ident: fix undefined variable when NO_IPV6 is set
2015-12-15 09:33:19 -08:00
Junio C Hamano
3b65c248a3 Merge branch 'jk/prune-mtime' into maint
The helper used to iterate over loose object directories to prune
stale objects did not closedir() immediately when it is done with a
directory--a callback such as the one used for "git prune" may want
to do rmdir(), but it would fail on open directory on platforms
such as WinXP.

* jk/prune-mtime:
  prune: close directory earlier during loose-object directory traversal
2015-12-15 09:27:12 -08:00
Junio C Hamano
a899d500c6 Merge branch 'ls/p4-keep-empty-commits'
"git p4" used to import Perforce CLs that touch only paths outside
the client spec as empty commits.  It has been corrected to ignore
them instead, with a new configuration git-p4.keepEmptyCommits as a
backward compatibility knob.

* ls/p4-keep-empty-commits:
  git-p4: add option to keep empty commits
2015-12-15 08:02:19 -08:00
Junio C Hamano
897b18508b Merge branch 'jk/prune-mtime'
The helper used to iterate over loose object directories to prune
stale objects did not closedir() immediately when it is done with a
directory--a callback such as the one used for "git prune" may want
to do rmdir(), but it would fail on open directory on platforms
such as WinXP.

* jk/prune-mtime:
  prune: close directory earlier during loose-object directory traversal
2015-12-15 08:02:16 -08:00
Luke Diamand
785e70f467 git-p4: failing test case for skipping changes with multiple depots
James Farwell reported that with multiple depots git-p4 would
skip changes.

http://article.gmane.org/gmane.comp.version-control.git/282297

Add a failing test case demonstrating the problem.

Signed-off-by: Luke Diamand <luke@diamand.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-12-14 14:03:45 -08:00
SZEDER Gábor
ccab28a947 completion: fix completing unstuck email alias arguments
Completing unstuck form of email aliases doesn't quite work:

  $ git send-email --to <TAB>
  alice   bob     cecil
  $ git send-email --to a<TAB>
  alice   bob     cecil

While listing email aliases works as expected, the second case should
just complete to 'alice', but it keeps offering all email aliases
instead.

The cause for this behavior is that in this case we mistakenly tell
__gitcomp() explicitly that the current word to be completed is empty,
while in reality it is not.  As a result __gitcomp() doesn't filter
out non-matching aliases, so all aliases end up being offered over and
over again.

Fix this by not passing the current word to be completed to
__gitcomp() and letting it go the default route and grab it from the
'$cur' variable.  Don't pass empty prefix either, because it's assumed
to be empty when unspecified, so it's not necessary.

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-12-14 14:01:37 -08:00
brian m. carlson
3e56e7245c sha1_file.c: introduce a null_oid constant
null_oid is the struct object_id equivalent to null_sha1.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-12-14 13:35:54 -08:00
Jeff King
58d29ececf ident: fix undefined variable when NO_IPV6 is set
Commit 00bce77 (ident.c: add support for IPv6, 2015-11-27)
moved the "gethostbyname" call out of "add_domainname" and
into the helper function "canonical_name". But when moving
the code, it forgot that the "buf" variable is passed as
"host" in the helper.

Reported-by: johan defries <johandefries@gmail.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-12-14 13:06:00 -08:00
Jeff King
92bcbb9b33 ident: loosen getpwuid error in non-strict mode
If the user has not specified an identity and we have to
turn to getpwuid() to find the username or gecos field, we
die immediately when getpwuid fails (e.g., because the user
does not exist). This is OK for making a commit, where we
have set IDENT_STRICT and would want to bail on bogus input.

But for something like a reflog, where the ident is "best
effort", it can be pain. For instance, even running "git
clone" with a UID that is not in /etc/passwd will result in
git barfing, just because we can't find an ident to put in
the reflog.

Instead of dying in xgetpwuid_self, we can instead return a
fallback value, and set a "bogus" flag. For the username in
an email, we already have a "default_email_is_bogus" flag.
For the name field, we introduce (and check) a matching
"default_name_is_bogus" flag. As a bonus, this means you now
get the usual "tell me who you are" advice instead of just a
"no such user" error.

No tests, as this is dependent on configuration outside of
git's control. However, I did confirm that it behaves
sensibly when I delete myself from the local /etc/passwd
(reflogs get written, and commits complain).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-12-14 11:44:38 -08:00
Tran Ngoc Quan
843565a8ed l10n: vi.po: Updated translation (2477t)
Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com>
2015-12-12 14:34:08 +07:00
Peter Krefting
4f7214bf19 gitk: sv.po: Update Swedish translation (311t)
Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2015-12-12 13:48:20 +11:00
Giuseppe Bilotta
cae4b60a98 gitk: Let .bleft.mid widgets 'breathe'
The widgets on top of the diff window are very tightly packed. Make
them breathe a little by adding an 'i'-spaced padding between them.

Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2015-12-12 13:43:53 +11:00
Giuseppe Bilotta
6cb73c84e1 gitk: Match ttk fonts to gitk fonts
The fonts set in setoptions aren't consistently picked up by ttk, which
uses its own predefined fonts. This is noticeable when switching
between using and not using ttk with custom fonts or in HiDPI settings
(where the default TTK fonts do _not_ respect tk sclaing).

Fix by mapping the ttk fontset to the one used by gitk internally.

Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2015-12-12 13:43:52 +11:00
Fabian Ruch
040fd39e67 rebase -i: remember merge options beyond continue actions
If the user explicitly specified a merge strategy or strategy
options, continue to use that strategy/option after
"rebase --continue".  Add a test of the corrected behavior.

If --merge is specified or implied by -s or -X, then "strategy and
"strategy_opts" are set to values from which "strategy_args" can be
derived; otherwise they are set to empty strings.  Either way,
their values are propagated from one step of an interactive rebase
to the next via state files.

"do_merge", on the other hand, is *not* propagated to later steps of
an interactive rebase.  Therefore, making the initialization of
"strategy_args" conditional on "do_merge" being set prevents later
steps of an interactive rebase from setting it correctly.

Luckily, we don't need the "do_merge" guard at all.  If the rebase
was started without --merge, then "strategy" and "strategy_opts"
are both the empty string, which results in "strategy_args" also
being set to the empty string, which is just what we want in that
situation.  So remove the "do_merge" guard and derive
"strategy_args" from "strategy" and "strategy_opts" every time.

Reported-by: Diogo de Campos <campos@esss.com.br>
Signed-off-by: Fabian Ruch <bafain@gmail.com>
Helped-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-12-11 12:44:44 -08:00
SZEDER Gábor
160fcdb007 completion: remove 'git column' from porcelain commands
'git column' is an internal helper, so it should not be offered on
'git <TAB>' along with porcelain commands.

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-12-11 12:43:16 -08:00
Junio C Hamano
4b9ab0ee01 Update release notes to 2.7
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-12-11 11:20:23 -08:00
Junio C Hamano
52b2e6be99 Merge branch 'maint'
* maint:
  Prepare for 2.6.5
2015-12-11 11:19:43 -08:00
Junio C Hamano
49e863b02a Prepare for 2.6.5
This back-merges hopefully the last batch of trivially correct fixes
to the 2.6.x maintenance track from the master branch.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-12-11 11:17:47 -08:00
Junio C Hamano
58e3dd21f6 Merge branch 'sn/null-pointer-arith-in-mark-tree-uninteresting' into maint
mark_tree_uninteresting() has code to handle the case where it gets
passed a NULL pointer in its 'tree' parameter, but the function had
'object = &tree->object' assignment before checking if tree is
NULL.  This gives a compiler an excuse to declare that tree will
never be NULL and apply a wrong optimization.  Avoid it.

* sn/null-pointer-arith-in-mark-tree-uninteresting:
  revision.c: fix possible null pointer arithmetic
2015-12-11 11:14:38 -08:00
Junio C Hamano
abca668a93 Merge branch 'sg/lock-file-commit-error' into maint
Cosmetic improvement to lock-file error messages.

* sg/lock-file-commit-error:
  Make error message after failing commit_lock_file() less confusing
2015-12-11 11:14:18 -08:00
Junio C Hamano
76058817e8 Merge branch 'cb/t3404-shellquote' into maint
* cb/t3404-shellquote:
  t3404: fix quoting of redirect for some versions of bash
2015-12-11 11:14:18 -08:00
Junio C Hamano
17e5bcab71 Merge branch 'sb/doc-submodule-sync-recursive' into maint
* sb/doc-submodule-sync-recursive:
  document submodule sync --recursive
2015-12-11 11:14:17 -08:00
Junio C Hamano
63b3db71d8 Merge branch 'nd/doc-check-ref-format-typo' into maint
* nd/doc-check-ref-format-typo:
  git-check-ref-format.txt: typo, s/avoids/avoid/
2015-12-11 11:14:15 -08:00
Junio C Hamano
288fe0cfb6 Merge branch 'rs/show-branch-argv-array' into maint
Code simplification.

* rs/show-branch-argv-array:
  show-branch: use argv_array for default arguments
2015-12-11 11:14:14 -08:00
Junio C Hamano
0af22d6fff Merge branch 'rs/pop-commit' into maint
Code simplification.

* rs/pop-commit:
  use pop_commit() for consuming the first entry of a struct commit_list
2015-12-11 11:14:13 -08:00
Junio C Hamano
8c0a546670 Merge branch 'as/subtree-with-spaces' into maint
Update "git subtree" (in contrib/) so that it can take whitespaces
in the pathnames, not only in the in-tree pathname but the name of
the directory that the repository is in.

* as/subtree-with-spaces:
  contrib/subtree: respect spaces in a repository path
  t7900-subtree: test the "space in a subdirectory name" case
2015-12-11 11:14:11 -08:00
Junio C Hamano
4cb5488fa6 Merge branch 'jk/test-lint-forbid-when-finished-in-subshell' into maint
Because "test_when_finished" in our test framework queues the
clean-up tasks to be done in a shell variable, it should not be
used inside a subshell.  Add a mechanism to allow 'bash' to catch
such uses, and fix the ones that were found.

* jk/test-lint-forbid-when-finished-in-subshell:
  test-lib-functions: detect test_when_finished in subshell
  t7800: don't use test_config in a subshell
  test-lib-functions: support "test_config -C <dir> ..."
  t5801: don't use test_when_finished in a subshell
  t7610: don't use test_config in a subshell
2015-12-11 11:14:10 -08:00
Junio C Hamano
782ca8c44e Merge branch 'sn/null-pointer-arith-in-mark-tree-uninteresting'
mark_tree_uninteresting() has code to handle the case where it gets
passed a NULL pointer in its 'tree' parameter, but the function had
'object = &tree->object' assignment before checking if tree is
NULL.  This gives a compiler an excuse to declare that tree will
never be NULL and apply a wrong optimization.  Avoid it.

* sn/null-pointer-arith-in-mark-tree-uninteresting:
  revision.c: fix possible null pointer arithmetic
2015-12-11 10:41:01 -08:00
Junio C Hamano
fa41b05253 Merge branch 'sb/doc-submodule-sync-recursive'
* sb/doc-submodule-sync-recursive:
  document submodule sync --recursive
2015-12-11 10:41:00 -08:00
Junio C Hamano
c87eec9784 Merge branch 'cb/t3404-shellquote'
* cb/t3404-shellquote:
  t3404: fix quoting of redirect for some versions of bash
2015-12-11 10:40:58 -08:00
Junio C Hamano
e0048d3e0d Merge branch 'sg/lock-file-commit-error'
Cosmetic improvement to lock-file error messages.

* sg/lock-file-commit-error:
  Make error message after failing commit_lock_file() less confusing
2015-12-11 10:40:55 -08:00
John Keeping
9d605249e5 send-email: enable SSL level 1 debug output
If a server's certificate isn't accepted by send-email, the output is:

	Unable to initialize SMTP properly. Check config and use --smtp-debug.

but adding --smtp-debug=1 just produces the same output since we don't
get as far as talking SMTP.

Turning on SSL debug at level 1 gives:

	DEBUG: .../IO/Socket/SSL.pm:1796: SSL connect attempt failed error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed
	DEBUG: .../IO/Socket/SSL.pm:673: fatal SSL error: SSL connect attempt failed error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed
	DEBUG: .../IO/Socket/SSL.pm:1780: IO::Socket::IP configuration failed

IO::Socket::SSL defines level 1 debug as "print out errors from
IO::Socket::SSL and ciphers from Net::SSLeay".  In fact, it aliases
Net::SSLeay::trace which is defined to guarantee silence at level 0 and
only emit error messages at level 1, so let's enable it by default.

The modification of warnings is needed to avoid a warning about:

	Name "IO::Socket::SSL::DEBUG" used only once: possible typo

Signed-off-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-12-11 09:41:10 -08:00
Jiang Xin
f4f2c8f87e l10n: git.pot: v2.7.0 round 1 (66 new, 29 removed)
Generate po/git.pot from v2.7.0-rc0 for git v2.7.0 l10n round 1.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2015-12-11 23:37:11 +08:00
Jiang Xin
c65da26899 Merge branch 'master' of git://github.com/git-l10n/git-po
* 'master' of git://github.com/git-l10n/git-po:
  l10n: fr.po: Fix typo
  l10n: fr.po: Fix typo
2015-12-11 23:33:45 +08:00
Jeff King
19ce497cf5 ident: keep a flag for bogus default_email
If we have to deduce the user's email address and can't come
up with something plausible for the hostname, we simply
write "(none)" or ".(none)" in the hostname.

Later, our strict-check is forced to use strstr to look for
this magic string. This is probably not a problem in
practice, but it's rather ugly. Let's keep an extra flag
that tells us the email is bogus, and check that instead.

We could get away with simply setting the global in
add_domainname(); it only gets called to write into
git_default_email. However, let's make the code a little
more obvious to future readers by actually passing a pointer
to our "bogus" flag down the call-chain.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-12-10 15:39:25 -08:00
Jeff King
e850194c83 ident: make xgetpwuid_self() a static local helper
This function is defined in wrapper.c, but nobody besides
ident.c uses it. And nobody is likely to in the future,
either, as anything that cares about the user's name should
be going through the ident code.

Moving it here is a cleanup of the global namespace, but it
will also enable further cleanups inside ident.c.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-12-10 15:38:59 -08:00
Junio C Hamano
7d722536dd Git 2.7-rc0
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-12-10 12:59:37 -08:00
Junio C Hamano
39e07f77b6 Sync with maint
* maint:
  Documentation/git-update-index: add missing opts to synopsis
2015-12-10 12:45:17 -08:00
Junio C Hamano
86c95ac5d2 Update release notes to 2.7
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-12-10 12:43:52 -08:00
Junio C Hamano
56d63d0eab Merge branch 'nd/doc-check-ref-format-typo'
* nd/doc-check-ref-format-typo:
  git-check-ref-format.txt: typo, s/avoids/avoid/
2015-12-10 12:36:15 -08:00
Junio C Hamano
844a9ce472 Merge branch 'bc/object-id'
More transition from "unsigned char[40]" to "struct object_id".

This needed a few merge fixups, but is mostly disentangled from other
topics.

* bc/object-id:
  remote: convert functions to struct object_id
  Remove get_object_hash.
  Convert struct object to object_id
  Add several uses of get_object_hash.
  object: introduce get_object_hash macro.
  ref_newer: convert to use struct object_id
  push_refs_with_export: convert to struct object_id
  get_remote_heads: convert to struct object_id
  parse_fetch: convert to use struct object_id
  add_sought_entry_mem: convert to struct object_id
  Convert struct ref to use object_id.
  sha1_file: introduce has_object_file helper.
2015-12-10 12:36:13 -08:00
Junio C Hamano
b12a966eff Merge branch 'dt/fsck-verify-pack-error'
The exit code of git-fsck didnot reflect some types of errors found
in packed objects, which has been corrected.

* dt/fsck-verify-pack-error:
  verify_pack: do not ignore return value of verification function
2015-12-10 12:36:12 -08:00
Junio C Hamano
9eb2449c35 Merge branch 'ls/travis-yaml'
The necessary infrastructure to build topics using the free Travis
CI has been added. Developers forking from this topic (and enabling
Travis) can do their own builds, and we can turn on auto-builds for
git/git (including build-status for pull requests that people
open).

* ls/travis-yaml:
  Add Travis CI support
2015-12-10 12:36:12 -08:00
Christian Couder
bc49712789 Documentation/git-update-index: add missing opts to synopsis
Split index related options should appear in the 'SYNOPSIS'
section.

These options are already documented in the 'OPTIONS' section.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-12-10 12:21:26 -08:00
Lars Schneider
4ae048e67e git-p4: add option to keep empty commits
A changelist that contains only excluded files due to a client spec was
imported as an empty commit. Fix that issue by ignoring these commits.
Add option "git-p4.keepEmptyCommits" to make the previous behavior
available.

Signed-off-by: Lars Schneider <larsxschneider@gmail.com>
Helped-by: Pete Harlan
Acked-by: Luke Diamand <luke@diamand.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-12-10 10:45:02 -08:00
Junio C Hamano
545299f822 Merge branch 'ep/ident-with-getaddrinfo'
A build without NO_IPv6 used to use gethostbyname() when guessing
user's hostname, instead of getaddrinfo() that is used in other
codepaths in such a build.

* ep/ident-with-getaddrinfo:
  ident.c: add support for IPv6
2015-12-08 14:14:50 -08:00