Commit graph

41586 commits

Author SHA1 Message Date
Junio C Hamano de60b97422 Merge branch 'js/emu-write-epipe-on-windows'
The write(2) emulation for Windows learned to set errno to EPIPE
when necessary.

* js/emu-write-epipe-on-windows:
  mingw: emulate write(2) that fails with a EPIPE
2015-12-22 14:45:16 -08:00
Ralf Thielow 6a4f2eced4 push: don't mark options of recurse-submodules for translation
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-12-22 14:40:47 -08:00
Junio C Hamano 1d88dab47a Update release notes to 2.7
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-12-21 11:08:20 -08:00
Junio C Hamano fbe959dde7 Merge branch 'bc/format-patch-null-from-line'
"format-patch" has learned a new option to zero-out the commit
object name on the mbox "From " line.

* bc/format-patch-null-from-line:
  format-patch: check that header line has expected format
  format-patch: add an option to suppress commit hash
  sha1_file.c: introduce a null_oid constant
2015-12-21 10:59:08 -08:00
Junio C Hamano 5498c57cdd Merge branch 'jk/ident-loosen-getpwuid'
When getpwuid() on the system returned NULL (e.g. the user is not
in the /etc/passwd file or other uid-to-name mappings), the
codepath to find who the user is to record it in the reflog barfed
and died.  Loosen the check in this codepath, which already accepts
questionable ident string (e.g. host part of the e-mail address is
obviously bogus), and in general when we operate fmt_ident() function
in non-strict mode.

* jk/ident-loosen-getpwuid:
  ident: loosen getpwuid error in non-strict mode
  ident: keep a flag for bogus default_email
  ident: make xgetpwuid_self() a static local helper
2015-12-21 10:59:07 -08:00
Junio C Hamano 7aaff08f39 Merge branch 'jk/send-email-ssl-errors'
Improve error reporting when SMTP TLS fails.

* jk/send-email-ssl-errors:
  send-email: enable SSL level 1 debug output
2015-12-21 10:59:06 -08:00
Junio C Hamano d78cba4b8f Merge branch 'sg/completion-no-column'
The completion script (in contrib/) used to list "git column"
(which is not an end-user facing command) as one of the choices

* sg/completion-no-column:
  completion: remove 'git column' from porcelain commands
2015-12-21 10:59:06 -08:00
Junio C Hamano 5d35d72fc3 Merge branch 'mc/push-recurse-submodules-config'
Add new config to avoid typing "--recurse-submodules" on each push.

* mc/push-recurse-submodules-config:
  push: follow the "last one wins" convention for --recurse-submodules
  push: test that --recurse-submodules on command line overrides config
  push: add recurseSubmodules config option
2015-12-21 10:59:05 -08:00
Johannes Schindelin 2b86292ed1 mingw: emulate write(2) that fails with a EPIPE
On Windows, when writing to a pipe fails, errno is always
EINVAL. However, Git expects it to be EPIPE.

According to the documentation, there are two cases in which write()
triggers EINVAL: the buffer is NULL, or the length is odd but the mode
is 16-bit Unicode (the broken pipe is not mentioned as possible cause).
Git never sets the file mode to anything but binary, therefore we know
that errno should actually be EPIPE if it is EINVAL and the buffer is
not NULL.

See https://msdn.microsoft.com/en-us/library/1570wh78.aspx for more
details.

This works around t5571.11 failing with v2.6.4 on Windows.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Acked-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-12-21 08:59:04 -08:00
Junio C Hamano c3ee2e2c9d Merge git://ozlabs.org/~paulus/gitk
* git://ozlabs.org/~paulus/gitk:
  gitk: sv.po: Update Swedish translation (311t)
  gitk: Let .bleft.mid widgets 'breathe'
  gitk: Match ttk fonts to gitk fonts
  gitk: Update revision date in Japanese PO file
  gitk: Update "Language:" header
  gitk: Improve translation message
  gitk: Remove unused line
  gitk: Update year
  gitk: Change last translator line
  gitk: Update fuzzy messages
  gitk: Update Japanese translation
  gitk: Fix translation around copyright sign
  gitk: Update Japanese translation
  gitk: Fix wrong translation
  gitk: Translate Japanese catalog
  gitk: Translate more to Japanese catalog
  gitk: Update Japanese message catalog
  gitk: Re-sync line number in Japanese message catalogue
  gitk: Color name update
2015-12-21 08:56:16 -08:00
Paul Mackerras 0de75aafb6 Merge branch 'ja.po' of https://github.com/qykth-git/gitk 2015-12-19 13:33:16 +11:00
Paul Mackerras 04d04c071e Merge branch 'color-fix' of https://github.com/qykth-git/gitk 2015-12-19 13:29:35 +11:00
Junio C Hamano f3adf457e0 Merge branch 'fr/rebase-i-continue-preserve-options'
"git rebase -i" started with merge strategy options did not
propagate them upon "git rebase --continue".

* fr/rebase-i-continue-preserve-options:
  rebase -i: remember merge options beyond continue actions
2015-12-16 14:42:52 -08:00
Junio C Hamano 787407e5e0 Merge branch 'maint'
* maint:
  credential-store: don't pass strerror to die_errno()
2015-12-16 14:40:30 -08:00
Junio C Hamano 1ff88560c8 Merge branch 'sg/lock-file-commit-error' into maint
* sg/lock-file-commit-error:
  credential-store: don't pass strerror to die_errno()
2015-12-16 10:27:22 -08:00
SZEDER Gábor 87d01c854b credential-store: don't pass strerror to die_errno()
Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-12-16 10:27:12 -08:00
brian m. carlson 06dfc9ebaa format-patch: check that header line has expected format
The format of the "From " header line is very specific to allow
utilities to detect Git-style patches.  Add a test that the patches
created are in the expected format.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-12-15 10:03:56 -08:00
brian m. carlson 3a30aa1787 format-patch: add an option to suppress commit hash
Oftentimes, patches created by git format-patch will be stored in
version control or compared with diff.  In these cases, two otherwise
identical patches can have different commit hashes, leading to diff
noise.  Teach git format-patch a --zero-commit option that instead
produces an all-zero hash to avoid this diff noise.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-12-15 10:03:40 -08:00
Junio C Hamano f900c8326a Git 2.7-rc1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-12-15 09:47:11 -08:00
Junio C Hamano bdb32a88fa Sync with maint 2015-12-15 09:45:16 -08:00
Junio C Hamano 1aaf149757 Update draft release notes to 2.6.5
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-12-15 09:44:54 -08:00
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
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
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