Commit graph

41280 commits

Author SHA1 Message Date
Junio C Hamano 23d58a00e5 Merge branch 'mk/blame-error-message'
The error message from "git blame --contents --reverse" incorrectly
talked about "--contents --children".

* mk/blame-error-message:
  blame: fix option name in error message
2015-10-30 13:07:02 -07:00
Junio C Hamano 808d119263 Merge branch 'js/misc-fixes'
Various compilation fixes and squelching of warnings.

* js/misc-fixes:
  Correct fscanf formatting string for I64u values
  Silence GCC's "cast of pointer to integer of a different size" warning
  Squelch warning about an integer overflow
2015-10-30 13:07:00 -07:00
Junio C Hamano e88e424f4c Merge branch 'js/imap-send-curl-compilation-fix'
"git imap-send" did not compile well with older version of cURL library.

* js/imap-send-curl-compilation-fix:
  imap-send: only use CURLOPT_LOGIN_OPTIONS if it is actually available
2015-10-30 13:06:58 -07:00
Junio C Hamano 203501b39f Merge branch 'jk/delete-modechange-conflict'
Merging a branch that removes a path and another that changes the
mode bits on the same path should have conflicted at the path, but
it didn't and silently favoured the removal.

* jk/delete-modechange-conflict:
  merge: detect delete/modechange conflict
  t6031: generalize for recursive and resolve strategies
  t6031: move triple-rename test to t3030
2015-10-30 13:06:57 -07:00
Junio C Hamano f7722a447a Merge branch 'jc/add-u-A-default-to-top'
"git --literal-pathspecs add -u/-A" without any command line
argument misbehaved ever since Git 2.0.

* jc/add-u-A-default-to-top:
  add: simplify -u/-A without pathspec
2015-10-30 13:06:55 -07:00
Junio C Hamano 908700c008 Merge branch 'ar/clone-dissociate'
"git clone --dissociate" used to require that "--reference" was
used at the same time, but you can create a new repository that
borrows objects from another without using "--reference", namely
with "clone --local" from a repository that borrows objects from
other repositories.

* ar/clone-dissociate:
  clone: allow "--dissociate" without reference
2015-10-30 13:06:53 -07:00
Junio C Hamano 482456a414 Merge git://ozlabs.org/~paulus/gitk
* git://ozlabs.org/~paulus/gitk:
  gitk: Update Russian translation
  gitk: Add accelerator to German locale
  gitk: Add accelerators to Japanese locale
  gitk: Update msgid's for menu items with accelerator
  gitk: l10n: Update Catalan translation
  gitk: Add missing accelerators
  Updated Vietnamese translation
2015-10-30 09:02:27 -07:00
Paul Mackerras d70c034a75 Merge https://github.com/vnwildman/gitk
This brings in an update to the Vietnamese translation.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2015-10-30 21:01:55 +11:00
Dimitriy Ryazantcev 222e878802 gitk: Update Russian translation
Signed-off-by: Dimitriy Ryazantcev <dimitriy.ryazantcev@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2015-10-30 20:56:11 +11:00
Takashi Iwai 61aae60af1 gitk: Add accelerator to German locale
Assigned either to the first letter or some unique letter.  At least
there are no conflicts, as far as I see...

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2015-10-30 20:45:56 +11:00
Takashi Iwai c3f695d5f7 gitk: Add accelerators to Japanese locale
Just follow the English accelerator keys.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2015-10-30 20:45:55 +11:00
Takashi Iwai 4ed950841e gitk: Update msgid's for menu items with accelerator
The commit d99b4b0de2 ("gitk: Accelerators for the main menu")
modified the menu item strings with the accelerator, but the
translations didn't follow, thus the menus are shown without
translations.

This patch systematically update the msgid keys just to follow this
change.  The contents aren't changed, so the accelerator won't work in
these locales for now.  Each locale translator needs to add proper
acceleration keys appropriately.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2015-10-30 20:45:55 +11:00
Alex Henrie a822fdbe8e gitk: l10n: Update Catalan translation
The gitk included in git 2.6.0 crashes if run from a Catalan locale.
I'm hoping that a translation update will fix this.

Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2015-10-30 20:39:31 +11:00
Beat Bolli 28de56856a gitk: Add missing accelerators
In d99b4b0de2 ("gitk: Accelerators for the main menu", 2015-09-09),
accelerators were added to allow efficient keyboard navigation. One
instance of the strings "Edit view..." and "Delete view" were left
without the ampersand.

Add the missing ampersand characters to unbreak our international
users.

Signed-off-by: Beat Bolli <dev+git@drbeat.li>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2015-10-30 20:38:11 +11:00
Junio C Hamano 80980a1d5c Eighth batch for 2.7
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-10-29 14:02:40 -07:00
Junio C Hamano 95b86a60cf Merge branch 'jc/am-mailinfo-direct'
"git am" used to spawn "git mailinfo" via run_command() API once
per each patch, but learned to make a direct call to mailinfo()
instead.

* jc/am-mailinfo-direct:
  am: make direct call to mailinfo
2015-10-29 13:59:23 -07:00
Junio C Hamano ba5312da19 Merge branch 'jc/mailinfo-lib'
The implementation of "git mailinfo" was refactored so that a
mailinfo() function can be directly called from inside a process.

* jc/mailinfo-lib: (34 commits)
  mailinfo: remove calls to exit() and die() deep in the callchain
  mailinfo: handle charset conversion errors in the caller
  mailinfo: libify
  mailinfo: keep the parsed log message in a strbuf
  mailinfo: handle_commit_msg() shouldn't be called after finding patchbreak
  mailinfo: move content/content_top to struct mailinfo
  mailinfo: move [ps]_hdr_data to struct mailinfo
  mailinfo: move cmitmsg and patchfile to struct mailinfo
  mailinfo: move charset to struct mailinfo
  mailinfo: move transfer_encoding to struct mailinfo
  mailinfo: move check for metainfo_charset to convert_to_utf8()
  mailinfo: move metainfo_charset to struct mailinfo
  mailinfo: move use_scissors and use_inbody_headers to struct mailinfo
  mailinfo: move add_message_id and message_id to struct mailinfo
  mailinfo: move patch_lines to struct mailinfo
  mailinfo: move filter/header stage to struct mailinfo
  mailinfo: move global "FILE *fin, *fout" to struct mailinfo
  mailinfo: move keep_subject & keep_non_patch_bracket to struct mailinfo
  mailinfo: introduce "struct mailinfo" to hold globals
  mailinfo: move global "line" into mailinfo() function
  ...
2015-10-29 13:59:22 -07:00
Junio C Hamano 9627b0a49f Merge branch 'rp/link-curl-before-ssl'
The linkage order of libraries was wrong in places around libcurl.

* rp/link-curl-before-ssl:
  configure.ac: detect ssl need with libcurl
  Makefile: make curl-config path configurable
  Makefile: link libcurl before zlib
2015-10-29 13:59:20 -07:00
Junio C Hamano 69fe31887b Merge branch 'dt/name-hash-dir-entry-fix'
The name-hash subsystem that is used to cope with case insensitive
filesystems keeps track of directories and their on-filesystem
cases for all the paths in the index by holding a pointer to a
randomly chosen cache entry that is inside the directory (for its
ce->ce_name component).  This pointer was not updated even when the
cache entry was removed from the index, leading to use after free.
This was fixed by recording the path for each directory instead of
borrowing cache entries and restructuring the API somewhat.

* dt/name-hash-dir-entry-fix:
  name-hash: don't reuse cache_entry in dir_entry
2015-10-29 13:59:19 -07:00
Junio C Hamano 433cc7e3fb Merge branch 'tk/sigchain-unnecessary-post-tempfile'
Remove no-longer used #include.

* tk/sigchain-unnecessary-post-tempfile:
  shallow: remove unused #include "sigchain.h"
  read-cache: remove unused #include "sigchain.h"
  diff: remove unused #include "sigchain.h"
  credential-cache--daemon: remove unused #include "sigchain.h"
2015-10-29 13:59:18 -07:00
Junio C Hamano 228905fbce Merge branch 'jk/war-on-sprintf'
* jk/war-on-sprintf:
  compat/mingw.c: remove printf format warning
  read_branches_file: plug a FILE* leak
2015-10-29 13:59:17 -07:00
Junio C Hamano 73167677c0 Merge branch 'jc/em-dash-in-doc'
AsciiDoc markup fixes.

* jc/em-dash-in-doc:
  Documentation: AsciiDoc spells em-dash as double-dashes, not triple
2015-10-29 13:59:16 -07:00
Junio C Hamano f7a88b6c58 Merge branch 'jc/everyday-markup'
AsciiDoc markup fixes.

* jc/everyday-markup:
  Documentation/everyday: match undefline with the text
2015-10-29 13:59:15 -07:00
Junio C Hamano 6abe8f4439 Merge branch 'xf/user-manual-markup'
AsciiDoc markup fixes.

* xf/user-manual-markup:
  Documentation: match undefline with the text in old release notes
  Documentation: match underline with the text
  Documentation: fix header markup
2015-10-29 13:59:14 -07:00
Junio C Hamano 37023ba381 Seventh batch for 2.7
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-10-26 16:02:08 -07:00
Junio C Hamano 922239e7da Merge branch 'dk/p4-import-ctypes'
"git-p4" tried to use from ctypes module without first importing
it.

* dk/p4-import-ctypes:
  git-p4: import the ctypes module
2015-10-26 15:55:26 -07:00
Junio C Hamano fa46579555 Merge branch 'jk/repository-extension'
Prepare for Git on-disk repository representation to undergo
backward incompatible changes by introducing a new repository
format version "1", with an extension mechanism.

* jk/repository-extension:
  introduce "preciousObjects" repository extension
  introduce "extensions" form of core.repositoryformatversion
2015-10-26 15:55:25 -07:00
Junio C Hamano 9d4a0692dc Merge branch 'dt/t7063-fix-flaky-test'
* dt/t7063-fix-flaky-test:
  t7063: fix flaky untracked-cache test
2015-10-26 15:55:23 -07:00
Junio C Hamano 2be421dbb6 Merge branch 'kn/for-each-tag'
Recent update to "git tag --contains" caused a performance
regression.

* kn/for-each-tag:
  tag.c: use the correct algorithm for the '--contains' option
2015-10-26 15:55:22 -07:00
Junio C Hamano 522e2f4515 Merge branch 'es/worktree-add'
* es/worktree-add:
  worktree: usage: denote <branch> as optional with 'add'
2015-10-26 15:55:21 -07:00
Junio C Hamano 1ad7c0f689 Merge branch 'tk/stripspace'
The internal stripspace() function has been moved to where it
logically belongs to, i.e. strbuf API, and the command line parser
of "git stripspace" has been updated to use the parse_options API.

* tk/stripspace:
  stripspace: use parse-options for command-line parsing
  strbuf: make stripspace() part of strbuf
2015-10-26 15:55:20 -07:00
Junio C Hamano 0884726b43 Merge branch 'rt/placeholder-in-usage'
A couple of commands still showed "[options]" in their usage string
to note where options should come on their command line, but we
spell that "[<options>]" in most places these days.

* rt/placeholder-in-usage:
  am, credential-cache: add angle brackets to usage string
2015-10-26 15:55:18 -07:00
Junio C Hamano 97a9e546a2 Merge branch 'jc/usage-stdin'
The synopsis text and the usage string of subcommands that read
list of things from the standard input are often shown as if they
only take input from a file on a filesystem, which was misleading.

* jc/usage-stdin:
  usage: do not insist that standard input must come from a file
2015-10-26 15:55:17 -07:00
Junio C Hamano a46dcfb840 Merge branch 'mr/worktree-list'
Add the "list" subcommand to "git worktree".

* mr/worktree-list:
  worktree: add 'list' command
  worktree: add details to the worktree struct
  worktree: add a function to get worktree details
  worktree: refactor find_linked_symref function
  worktree: add top-level worktree.c
2015-10-26 15:55:16 -07:00
Junio C Hamano 9c53de7de1 Merge branch 'jc/am-3-fallback-regression-fix'
"git am -3" had a small regression where it is aborted in its error
handling codepath when underlying merge-recursive failed in certain
ways, as it assumed that the internal call to merge-recursive will
never die, which is not the case (yet).

* jc/am-3-fallback-regression-fix:
  am -3: do not let failed merge from completing the error codepath
2015-10-26 15:55:15 -07:00
Jeff King 72fac66bca merge: detect delete/modechange conflict
If one side deletes a file and the other changes its
content, we notice and report a conflict. However, if
instead of changing the content, we change only the mode,
the merge does not notice (and the mode change is silently
dropped).

The trivial index merge notices the problem and correctly
leaves the conflict in the index, but both merge-recursive
and merge-one-file will silently resolve this in favor of
the deletion.  In many cases that is a sane resolution, but
we should be punting to the user whenever there is any
question. So let's detect and treat this as a conflict (in
both strategies).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-10-26 14:49:31 -07:00
Jeff King f78d1fe208 t6031: generalize for recursive and resolve strategies
This script tests the filemode handling of merge-recursive,
but we do not test the same thing for merge-resolve. Let's
generalize the script a little:

  1. Break out the setup steps for each test into a separate
     snippet.

  2. For each test, run it twice; once with "-s recursive"
     and once with "-s resolve". We can avoid repeating
     ourselves by adding a function.

  3. Since we have a nice abstracted function, we can make
     our tests more thorough by testing both directions
     (change on "ours" versus "theirs").

This improves our test coverage, and will make this the
place to add more tests related to merging mode changes.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-10-26 14:48:56 -07:00
Jeff King 6f50833e98 t6031: move triple-rename test to t3030
The t6031 test was introduced to check filemode handling of
merge-recursive. Much later, an unrelated test was tacked on
to look at renames and d/f conflicts. This test does not
depend on anything that happened before (it actually blows
away any existing content in the test repo). Let's move it
to t3030, where there are more related tests.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-10-26 14:48:54 -07:00
Waldek Maleska fdcdb77855 Correct fscanf formatting string for I64u values
This fix is probably purely cosmetic because PRIuMAX is likely identical
to SCNuMAX. Nevertheless, when using a function of the scanf() family,
the correct interpolation to use is the latter, not the former.

Signed-off-by: Waldek Maleska <w.maleska@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-10-26 13:24:03 -07:00
Johannes Schindelin 56a1a3ab44 Silence GCC's "cast of pointer to integer of a different size" warning
When calculating hashes from pointers, it actually makes sense to cut
off the most significant bits. In that case, said warning does not make
a whole lot of sense.

So let's just work around it by casting the pointer first to intptr_t
and then casting up/down to the final integral type.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-10-26 13:24:03 -07:00
Johannes Schindelin 8f77442358 Squelch warning about an integer overflow
We cannot rely on long integers to have more than 32 bits.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-10-26 13:23:59 -07:00
Johannes Schindelin 71d9257525 imap-send: only use CURLOPT_LOGIN_OPTIONS if it is actually available
This fixes the compilation on an older Linux that was used to debug
test failures when upgrading Git for Windows to Git v2.3.0.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-10-26 13:10:30 -07:00
Max Kirillov 95261974bb blame: fix option name in error message
The option name used in blame's UI is `--reverse`.

Signed-off-by: Max Kirillov <max@max630.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-10-26 13:08:21 -07:00
Junio C Hamano 29abb33978 add: simplify -u/-A without pathspec
Since Git 2.0, "add -u" and "add -A" run from a subdirectory without
any pathspec mean "everything in the working tree" (before 2.0, they
were limited to the current directory).  The limiting to the current
directory was implemented by inserting "." to the command line when
the end user did not give us any pathspec.  At 2.0, we updated the
code to insert ":/" (instead of '.') to consider everything from the
top-level, by using a pathspec magic "top".

The call to parse_pathspec() using the command line arguments is,
however, made with PATHSPEC_PREFER_FULL option since 5a76aff1 (add:
convert to use parse_pathspec, 2013-07-14), which predates Git 2.0.
In retrospect, there was no need to turn "adding . to limit to the
directory" into "adding :/ to unlimit to everywhere" in Git 2.0;
instead we could just have done "if there is no pathspec on the
command line, just let it be".  The parse_pathspec() then would give
us a pathspec that matches everything and all is well.

Incidentally such a simplification also fixes a corner case bug that
stems from the fact that ":/" does not necessarily mean any magic.
A user would say "git --literal-pathspecs add -u :/" from the
command line when she has a directory ':' and wants to add
everything in it (and she knows that her :/ will be taken as
'everything under the sun' magic pathspec unless she disables the
magic with --literal-pathspecs).  The internal use of ':/' would
behave the same way as such an explicitly given ":/" when run with
"--literal-pathspecs", and will not add everything under the sun as
the code originally intended.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-10-24 19:32:47 -07:00
Johannes Sixt d62c89afb2 compat/mingw.c: remove printf format warning
5096d490 (convert trivial sprintf / strcpy calls to xsnprintf) converted
two sprintf calls. Now GCC warns that "format '%u' expects argument of
type 'unsigned int', but argument 4 has type 'long unsigned int'".
Instead of changing the format string, use a variable of type unsigned
in place of the typedef-ed type DWORD, which hides that it is actually an
unsigned long.

There is no correctness issue with the old code because unsigned long and
unsigned are always of the same size on Windows, even in 64-bit builds.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-10-23 10:17:53 -07:00
Johannes Sixt 0fb19906b5 read_branches_file: plug a FILE* leak
The earlier rewrite f28e3ab2 (read_branches_file: simplify string handling)
of read_branches_file() lost an fclose() call. Put it back.

As on Windows files that are open cannot be removed, the leak manifests in
a failure of 'git remote rename origin origin' when the remote's URL is
specified in .git/branches/origin, because by the time that the command
attempts to remove this file, it is still open.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-10-23 10:17:48 -07:00
Junio C Hamano 3b19dba703 Documentation: AsciiDoc spells em-dash as double-dashes, not triple
Again, we do not usually process release notes with AsciiDoc, but it
is better to be consistent.

This incidentally reveals breakages left by an ancient 5e00439f
(Documentation: build html for all files in technical and howto,
2012-10-23).  The index-format documentation was originally written
to be read as straight text without formatting and when the commit
forced everything in Documentation/ to go through AsciiDoc, it did
not do any adjustment--hence the double-dashes will be seen in the
resulting text that is rendered as preformatted fixed-width without
converted into em-dashes.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-10-22 13:02:33 -07:00
Alex Riesen 0181681e92 clone: allow "--dissociate" without reference
The "--reference" option is not the only way to provide a repository
to borrow objects from.  A repository that borrows from another
repository can be cloned with "clone --local" and the resulting
repository will borrow from the same repository, which the user
may want to "--dissociate" from.

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-10-22 12:13:29 -07:00
Tobias Klauser 4b7c50a184 shallow: remove unused #include "sigchain.h"
After switching to use the tempfile module in commit 6e122b44
(setup_temporary_shallow(): use tempfile module), no declarations from
sigchain.h are used in read-cache.c anymore. Thus, remove the #include.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-10-22 11:12:38 -07:00
Tobias Klauser a559263cae read-cache: remove unused #include "sigchain.h"
After switching to use the tempfile module in commit f6ecc62d
(write_shared_index(): use tempfile module), no declarations from
sigchain.h are used in read-cache.c anymore. Thus, remove the #include.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-10-22 11:12:37 -07:00