Commit Graph

61390 Commits

Author SHA1 Message Date
Johannes Schindelin
2910d90089 mingw: include the full version information in the resources
This fixes https://github.com/git-for-windows/git/issues/723

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2016-08-12 16:04:46 +02:00
Johannes Schindelin
207577383b Start the merging-rebase to junio/maint
This commit starts the rebase of 7b3d14e to 8e4b75a
2016-08-12 16:04:08 +02:00
Junio C Hamano
8e4b75a97b Yet another batch for 2.9.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-08-10 11:56:56 -07:00
Junio C Hamano
019d8a409f Merge branch 'jh/clean-smudge-f-doc' into maint
A minor documentation update.

This was split out from a stalled jh/clean-smudge-annex topic
before discarding it.

* jh/clean-smudge-f-doc:
  clarify %f documentation
2016-08-10 11:55:34 -07:00
Junio C Hamano
574a31b5b7 Merge branch 'rs/use-strbuf-addstr' into maint
* rs/use-strbuf-addstr:
  use strbuf_addstr() instead of strbuf_addf() with "%s"
  use strbuf_addstr() for adding constant strings to a strbuf
2016-08-10 11:55:34 -07:00
Junio C Hamano
9a54075c80 Merge branch 'cp/completion-clone-recurse-submodules' into maint
* cp/completion-clone-recurse-submodules:
  completion: add option '--recurse-submodules' to 'git clone'
2016-08-10 11:55:33 -07:00
Junio C Hamano
66d6511c53 Merge branch 'jk/t4205-cleanup' into maint
Test modernization.

* jk/t4205-cleanup:
  t4205: indent here documents
  t4205: drop top-level &&-chaining
2016-08-10 11:55:32 -07:00
Junio C Hamano
33481c1e59 Merge branch 'jc/hashmap-doc-init' into maint
The API documentation for hashmap was unclear if hashmap_entry
can be safely discarded without any other consideration.  State
that it is safe to do so.

* jc/hashmap-doc-init:
  hashmap: clarify that hashmap_entry can safely be discarded
2016-08-10 11:55:31 -07:00
Junio C Hamano
05a6d0e9d0 Merge branch 'js/nedmalloc-gcc6-warnings' into maint
Squelch compiler warnings for netmalloc (in compat/) library.

* js/nedmalloc-gcc6-warnings:
  nedmalloc: work around overzealous GCC 6 warning
  nedmalloc: fix misleading indentation
2016-08-10 11:55:31 -07:00
Junio C Hamano
f7fb6e21b8 Merge branch 'nd/fbsd-lazy-mtime' into maint
FreeBSD can lie when asked mtime of a directory, which made the
untracked cache code to fall back to a slow-path, which in turn
caused tests in t7063 to fail because it wanted to verify the
behaviour of the fast-path.

* nd/fbsd-lazy-mtime:
  t7063: work around FreeBSD's lazy mtime update feature
2016-08-10 11:55:30 -07:00
Junio C Hamano
1dc4aa67d6 Merge branch 'ab/gitweb-link-html-escape' into maint
The characters in the label shown for tags/refs for commits in
"gitweb" output are now properly escaped for proper HTML output.

* ab/gitweb-link-html-escape:
  gitweb: escape link body in format_ref_marker
2016-08-10 11:55:30 -07:00
Junio C Hamano
85b2ea29e8 Merge branch 'js/t4130-rename-without-ino' into maint
Windows port was failing some tests in t4130, due to the lack of
inum in the returned values by its lstat(2) emulation.

* js/t4130-rename-without-ino:
  t4130: work around Windows limitation
2016-08-10 11:55:30 -07:00
Junio C Hamano
7b163e9187 Merge branch 'jc/grep-commandline-vs-configuration' into maint
"git -c grep.patternType=extended log --basic-regexp" misbehaved
because the internal API to access the grep machinery was not
designed well.

* jc/grep-commandline-vs-configuration:
  grep: further simplify setting the pattern type
2016-08-10 11:55:29 -07:00
Junio C Hamano
cee6c5b47b Merge branch 'jk/diff-do-not-reuse-wtf-needs-cleaning' into maint
There is an optimization used in "git diff $treeA $treeB" to borrow
an already checked-out copy in the working tree when it is known to
be the same as the blob being compared, expecting that open/mmap of
such a file is faster than reading it from the object store, which
involves inflating and applying delta.  This however kicked in even
when the checked-out copy needs to go through the convert-to-git
conversion (including the clean filter), which defeats the whole
point of the optimization.  The optimization has been disabled when
the conversion is necessary.

* jk/diff-do-not-reuse-wtf-needs-cleaning:
  diff: do not reuse worktree files that need "clean" conversion
2016-08-10 11:55:28 -07:00
Junio C Hamano
d1d9c3cc60 Merge branch 'pm/build-persistent-https-with-recent-go' into maint
The build procedure for "git persistent-https" helper (in contrib/)
has been updated so that it can be built with more recent versions
of Go.

* pm/build-persistent-https-with-recent-go:
  contrib/persistent-https: use Git version for build label
  contrib/persistent-https: update ldflags syntax for Go 1.7+
2016-08-10 11:55:27 -07:00
Junio C Hamano
366d2d5f48 Merge branch 'da/subtree-2.9-regression' into maint
"git merge" in Git v2.9 was taught to forbid merging an unrelated
lines of history by default, but that is exactly the kind of thing
the "--rejoin" mode of "git subtree" (in contrib/) wants to do.
"git subtree" has been taught to use the "--allow-unrelated-histories"
option to override the default.

* da/subtree-2.9-regression:
  subtree: fix "git subtree split --rejoin"
  t7900-subtree.sh: fix quoting and broken && chains
2016-08-10 11:55:26 -07:00
Junio C Hamano
d9d7ab3b1d Merge branch 'os/no-verify-skips-commit-msg-too' into maint
"git commit --help" said "--no-verify" is only about skipping the
pre-commit hook, and failed to say that it also skipped the
commit-msg hook.

* os/no-verify-skips-commit-msg-too:
  commit: describe that --no-verify skips the commit-msg hook in the help text
2016-08-10 11:55:25 -07:00
Junio C Hamano
b7fb136bf6 Merge branch 'rs/rm-strbuf-optim' into maint
The use of strbuf in "git rm" to build filename to remove was a bit
suboptimal, which has been fixed.

* rs/rm-strbuf-optim:
  rm: reuse strbuf for all remove_dir_recursively() calls
2016-08-10 11:55:24 -07:00
Junio C Hamano
60b84ba26c Merge branch 'jk/parse-options-concat' into maint
Users of the parse_options_concat() API function need to allocate
extra slots in advance and fill them with OPT_END() when they want
to decide the set of supported options dynamically, which makes the
code error-prone and hard to read.  This has been corrected by tweaking
the API to allocate and return a new copy of "struct option" array.

* jk/parse-options-concat:
  parse_options: allocate a new array when concatenating
2016-08-10 11:55:24 -07:00
Junio C Hamano
dbc5276fed Merge branch 'ls/travis-enable-httpd-tests' into maint
Allow http daemon tests in Travis CI tests.

* ls/travis-enable-httpd-tests:
  travis-ci: enable web server tests t55xx on Linux
2016-08-10 11:55:23 -07:00
Junio C Hamano
f98a20c50a Merge branch 'ew/autoconf-pthread' into maint
Existing autoconf generated test for the need to link with pthread
library did not check all the functions from pthread libraries;
recent FreeBSD has some functions in libc but not others, and we
mistakenly thought linking with libc is enough when it is not.

* ew/autoconf-pthread:
  configure.ac: stronger test for pthread linkage
2016-08-10 11:55:21 -07:00
Junio C Hamano
e223c2c77f Merge branch 'rs/help-c-source-with-gitattributes' into maint
The .c/.h sources are marked as such in our .gitattributes file so
that "git diff -W" and friends would work better.

* rs/help-c-source-with-gitattributes:
  .gitattributes: set file type for C files
2016-08-10 11:55:20 -07:00
Junio C Hamano
61efc5c2d8 Merge branch 'mm/status-suggest-merge-abort' into maint
"git status" learned to suggest "merge --abort" during a conflicted
merge, just like it already suggests "rebase --abort" during a
conflicted rebase.

* mm/status-suggest-merge-abort:
  status: suggest 'git merge --abort' when appropriate
2016-08-10 11:55:19 -07:00
Johannes Schindelin
b4090b3aea Merge 'cat-file-smudge'
This topic branch adds support to cat-file to apply the smudge filter
(if any) when showing blobs.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2016-08-09 17:40:52 +02:00
Johannes Schindelin
87bf61d41c cat-file: introduce the --smudge option
As suggested by its name, the --smudge option applies the smudge filter
that is currently configured for the specified path.

This feature comes in handy when a 3rd-party tool wants to work with the
contents of files from past revisions as if they had been checked out,
but without detouring via temporary files.

Note that we ensure that symbolic links are unaffected (we know from
looking at the mode).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2016-08-09 17:33:07 +02:00
Johannes Schindelin
beb6b985eb cat-file: fix a grammo in the man page
"... has be ..." -> "... has to be ..."

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2016-08-09 17:33:07 +02:00
Johannes Schindelin
9cfbaf59e1 Merge 'kw/patch-ids-optim'
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2016-08-09 17:29:30 +02:00
Kevin Willford
bb5e532c54 rebase: avoid computing unnecessary patch IDs
The `rebase` family of Git commands avoid applying patches that were
already integrated upstream. They do that by using the revision walking
option that computes the patch IDs of the two sides of the rebase
(local-only patches vs upstream-only ones) and skipping those local
patches whose patch ID matches one of the upstream ones.

In many cases, this causes unnecessary churn, as already the set of
paths touched by a given commit would suffice to determine that an
upstream patch has no local equivalent.

This hurts performance in particular when there are a lot of upstream
patches, and/or large ones.

Therefore, let's introduce the concept of a "diff-header-only" patch ID,
compare those first, and only evaluate the "full" patch ID lazily.

Please note that in contrast to the "full" patch IDs, those
"diff-header-only" patch IDs are prone to collide with one another, as
adjacent commits frequently touch the very same files. Hence we now
have to be careful to allow multiple hash entries with the same hash.
We accomplish that by using the hashmap_add() function that does not even
test for hash collisions.  This also allows us to evaluate the full patch ID
lazily, i.e. only when we found commits with matching diff-header-only
patch IDs.

We add a performance test that demonstrates ~1-6% improvement.  In
practice this will depend on various factors such as how many upstream
changes and how big those changes are along with whether file system
caches are cold or warm.  As Git's test suite has no way of catching
performance regressions, we also add a regression test that verifies
that the full patch ID computation is skipped when the diff-header-only
computation suffices.

Signed-off-by: Kevin Willford <kcwillford@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-08-09 17:25:24 +02:00
Johannes Schindelin
77073280d5 Merge 'jh/status-v2-porcelain'
Backported onto `maint` by me...

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2016-08-09 17:22:30 +02:00
Jeff Hostetler
af336aeceb status: unit tests for --porcelain=v2
Test porcelain v2 status format.

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-08-09 17:20:05 +02:00
Jeff Hostetler
0915645334 test-lib-functions.sh: Add lf_to_nul
Add lf_to_nul() function to test-lib-functions.

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-08-09 17:19:44 +02:00
Jeff Hostetler
d05bb8aaaf git-status.txt: describe --porcelain=v2 format
Update status manpage to include information about
porcelain v2 format.

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-08-09 17:19:24 +02:00
Jeff Hostetler
8c0cff9a60 status: print branch info with --porcelain=v2 --branch
Expand porcelain v2 output to include branch and tracking
branch information. This includes the commit id, the branch,
the upstream branch, and the ahead and behind counts.

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-08-09 17:19:01 +02:00
Jeff Hostetler
8dcba40646 status: print per-file porcelain v2 status data
Print per-file information in porcelain v2 format.

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-08-09 17:18:36 +02:00
Jeff Hostetler
41f9d92eb6 status: collect per-file data for --porcelain=v2
Collect extra per-file data for porcelain V2 format.

The output of `git status --porcelain` leaves out many
details about the current status that clients might like
to have.  This can force them to be less efficient as they
may need to launch secondary commands (and try to match
the logic within git) to accumulate this extra information.
For example, a GUI IDE might want the file mode to display
the correct icon for a changed item (without having to stat
it afterwards).

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-08-09 17:18:27 +02:00
Jeff Hostetler
6872353b0c status: support --porcelain[=<version>]
Update --porcelain argument to take optional version parameter
to allow multiple porcelain formats to be supported in the future.

The token "v1" is the default value and indicates the traditional
porcelain format.  (The token "1" is an alias for that.)

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-08-09 17:11:28 +02:00
Jeff Hostetler
999dce9020 status: cleanup API to wt_status_print
Refactor the API between builtin/commit.c and wt-status.[ch].

Hide the details of the various wt_*status_print() routines inside
wt-status.c behind a single (new) wt_status_print() routine.
Eliminate the switch statements from builtin/commit.c.
Allow details of new status formats to be isolated within wt-status.c

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-08-09 17:11:28 +02:00
Jeff Hostetler
4df1ff0df3 status: rename long-format print routines
Rename the various wt_status_print*() routines to be
wt_longstatus_print*() to make it clear that these
routines are only concerned with the normal/long
status output and reduce developer confusion as other
status formats are added in the future.

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-08-09 17:11:27 +02:00
Johannes Schindelin
6ac7a1cf02 Merge branch 'consolez'
This fixes an issue where the Git wrapper would terminate upon Ctrl+C,
even in the case when its child process would *not* terminate.

Note: while the original intention was to fix running Git Bash in
ConsoleZ, the bug fix applies also to running

	C:\Program Files\Git\bin\bash -l -i

in a cmd window.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2016-08-09 16:51:40 +02:00
Johannes Schindelin
4e6dd6db29 Merge branch 'git-wrapper-interpolate'
There was a bug in the wrapper where it would interpolate incorrectly if
the name of the environment variable to expand was longer than the value.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2016-08-09 16:51:40 +02:00
Johannes Schindelin
a34b7237e6 Merge branch 'home-bin' 2016-08-09 16:51:39 +02:00
Johannes Schindelin
89b579d429 Merge branch 'conhost-git-bash' 2016-08-09 16:51:39 +02:00
Johannes Schindelin
8484b9bbfd Merge branch 'bash-redirector' 2016-08-09 16:51:39 +02:00
Johannes Schindelin
8a1df2b4a5 Merge branch 'pinnable'
Part 2/3 of fixing https://github.com/git-for-windows/git/issues/263

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2016-08-09 16:51:39 +02:00
Johannes Schindelin
1ecd520349 Merge branch 'git-wrapper--command'
This topic branch adds the --command=<command> option that allows
starting the Git Bash (or Git CMD) with different terminal emulators
than the one encoded via embedded string resources.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2016-08-09 16:51:39 +02:00
Johannes Schindelin
86afed781c Merge 'git-wrapper' into HEAD
Use msysGit's `git-wrapper` instead of the builtins. This works around
two issues:

- when the file system does not allow hard links, we would waste over
  800 megabyte by having 109 copies of a multi-megabyte executable

- even when the file system allows hard links, the Windows Explorer
  counts the disk usage as if it did not. Many users complained about
  Git for Windows using too much space (when it actually did not). We
  can easily avoid those user complaints by merging this branch.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2016-08-09 16:51:38 +02:00
Johannes Schindelin
287a84a4d6 Merge 'gcc-6' into HEAD 2016-08-09 16:51:38 +02:00
Johannes Schindelin
e3a8a13084 Merge pull request #797 from glhez/master
`git bundle create <bundle>` leaks handle the revlist is empty.
2016-08-09 16:51:38 +02:00
Johannes Schindelin
3afe86d645 Merge 'release-gc-repack' into HEAD 2016-08-09 16:51:38 +02:00
Johannes Schindelin
e67e204bd4 Merge pull request #755 from bwijen/master
Prevent child processes from inheriting a handle to index.lock
2016-08-09 16:51:38 +02:00