gitweb.git
resolve_ref_unsafe(): close race condition reading... Michael Haggerty Wed, 19 Jun 2013 06:36:28 +0000 (08:36 +0200)

resolve_ref_unsafe(): close race condition reading loose refs

We read loose references in two steps. The code is roughly:

lstat()
if error ENOENT:
loose ref is missing; look for corresponding packed ref
else if S_ISLNK:
readlink()
if error:
report failure
else if S_ISDIR:
report failure
else
open()
if error:
report failure
read()

The problem is that the first filesystem call, to lstat(), is not
atomic with the second filesystem call, to readlink() or open().
Therefore it is possible for another process to change the file
between our two calls, for example:

* If the other process deletes the file, our second call will fail
with ENOENT, which we *should* interpret as "loose ref is missing;
look for corresponding packed ref". This can arise if the other
process is pack-refs; it might have just written a new packed-refs
file containing the old contents of the reference then deleted the
loose ref.

* If the other process changes a symlink into a plain file, our call
to readlink() will fail with EINVAL, which we *should* respond to by
trying to open() and read() the file.

The old code treats the reference as missing in both of these cases,
which is incorrect.

So instead, handle errors more selectively: if the result of
readline()/open() is a failure that is inconsistent with the result of
the previous lstat(), then something is fishy. In this case jump back
and start over again with a fresh call to lstat().

One race is still possible and undetected: another process could
change the file from a regular file into a symlink between the call to
lstat and the call to open(). The open() call would silently follow
the symlink and not know that something is wrong. This situation
could be detected in two ways:

* On systems that support O_NOFOLLOW, pass that option to the open().

* On other systems, call fstat() on the fd returned by open() and make
sure that it agrees with the stat info from the original lstat().

However, we don't use symlinks anymore, so this situation is unlikely.
Moreover, it doesn't appear that treating a symlink as a regular file
would have grave consequences; after all, this is exactly how the code
handles non-relative symlinks. So this commit leaves that race
unaddressed.

Note that this solves only the part of the race within
resolve_ref_unsafe. In the situation described above, we may still be
depending on a cached view of the packed-refs file; that race will be
dealt with in a future patch.

This problem was reported and diagnosed by Jeff King <peff@peff.net>,
and this solution is derived from his patch.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

resolve_ref_unsafe(): handle the case of an SHA-1 withi... Michael Haggerty Wed, 19 Jun 2013 06:36:27 +0000 (08:36 +0200)

resolve_ref_unsafe(): handle the case of an SHA-1 within loop

There is only one "break" statement within the loop, which jumps to
the code after the loop that handles the case of a file that holds a
SHA-1. So move that code from below the loop into the if statement
where the break was previously located. This makes the logic flow
more local.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

resolve_ref_unsafe(): extract function handle_missing_l... Michael Haggerty Wed, 19 Jun 2013 06:36:26 +0000 (08:36 +0200)

resolve_ref_unsafe(): extract function handle_missing_loose_ref()

The nesting was getting a bit out of hand, and it's about to get
worse.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint'Junio C Hamano Tue, 11 Jun 2013 21:25:09 +0000 (14:25 -0700)

Merge branch 'maint'

* maint:
t0070 "mktemp to unwritable directory" needs SANITY
pre-push.sample: Make the script executable

Merge branch 'maint-1.8.2' into maintJunio C Hamano Tue, 11 Jun 2013 21:24:56 +0000 (14:24 -0700)

Merge branch 'maint-1.8.2' into maint

* maint-1.8.2:
t0070 "mktemp to unwritable directory" needs SANITY
pre-push.sample: Make the script executable

t0070 "mktemp to unwritable directory" needs SANITYTorsten Bögershausen Sat, 8 Jun 2013 12:17:49 +0000 (14:17 +0200)

t0070 "mktemp to unwritable directory" needs SANITY

Use the SANITY prerequisite when testing if a temp file can
be created in a read only directory.
Skip the test under CYGWIN, or skip it under Unix/Linux when
it is run as root.

Signed-off-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Update draft release notesJunio C Hamano Tue, 11 Jun 2013 20:50:12 +0000 (13:50 -0700)

Update draft release notes

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'cm/gitweb-project-list-persistent-cgi... Junio C Hamano Tue, 11 Jun 2013 20:31:45 +0000 (13:31 -0700)

Merge branch 'cm/gitweb-project-list-persistent-cgi-fix'

"gitweb" forgot to clear a global variable $search_regexp upon each
request, mistakenly carrying over the previous search to a new one
when used as a persistent CGI.

* cm/gitweb-project-list-persistent-cgi-fix:
gitweb: fix problem causing erroneous project list

Merge branch 'rr/maint-fetch-tag-doc-asterisks'Junio C Hamano Tue, 11 Jun 2013 20:31:41 +0000 (13:31 -0700)

Merge branch 'rr/maint-fetch-tag-doc-asterisks'

* rr/maint-fetch-tag-doc-asterisks:
fetch-options.txt: prevent a wildcard refspec from getting misformatted

Merge branch 'rr/rebase-autostash'Junio C Hamano Tue, 11 Jun 2013 20:31:28 +0000 (13:31 -0700)

Merge branch 'rr/rebase-autostash'

* rr/rebase-autostash:
rebase: implement --[no-]autostash and rebase.autostash
rebase --merge: return control to caller, for housekeeping
rebase -i: return control to caller, for housekeeping
am: return control to caller, for housekeeping
rebase: prepare to do generic housekeeping
rebase -i: don't error out if $state_dir already exists
am: tighten a conditional that checks for $dotest

Merge branch 'jk/test-exit-code-by-signal'Junio C Hamano Tue, 11 Jun 2013 20:31:25 +0000 (13:31 -0700)

Merge branch 'jk/test-exit-code-by-signal'

* jk/test-exit-code-by-signal:
t0005: skip signal death exit code test on Windows
t0005: test git exit code from signal death

Merge branch 'fc/at-head'Junio C Hamano Tue, 11 Jun 2013 20:31:23 +0000 (13:31 -0700)

Merge branch 'fc/at-head'

Instead of typing four capital letters "HEAD", you can say "@"
instead.

* fc/at-head:
sha1_name: compare variable with constant, not constant with variable
Add new @ shortcut for HEAD
sha1_name: refactor reinterpret()
sha1_name: check @{-N} errors sooner
sha1_name: reorganize get_sha1_basic()
sha1_name: don't waste cycles in the @-parsing loop
sha1_name: remove unnecessary braces
sha1_name: remove no-op
tests: at-combinations: @{N} versus HEAD@{N}
tests: at-combinations: increase coverage
tests: at-combinations: improve nonsense()
tests: at-combinations: check ref names directly
tests: at-combinations: simplify setup

Merge branch 'ar/wildmatch-foldcase'Junio C Hamano Tue, 11 Jun 2013 20:31:21 +0000 (13:31 -0700)

Merge branch 'ar/wildmatch-foldcase'

The wildmatch engine did not honor WM_CASEFOLD option correctly.

* ar/wildmatch-foldcase:
wildmatch: properly fold case everywhere

Merge branch 'tr/sha1-file-silence-loose-object-info... Junio C Hamano Tue, 11 Jun 2013 20:31:19 +0000 (13:31 -0700)

Merge branch 'tr/sha1-file-silence-loose-object-info-under-prune-race'

* tr/sha1-file-silence-loose-object-info-under-prune-race:
sha1_file: silence sha1_loose_object_info

Merge branch 'nd/warn-ambiguous-object-name'Junio C Hamano Tue, 11 Jun 2013 20:31:07 +0000 (13:31 -0700)

Merge branch 'nd/warn-ambiguous-object-name'

"git cmd <name>", when <name> happens to be a 40-hex string,
directly uses the 40-hex string as an object name, even if a ref
"refs/<some hierarchy>/<name>" exists. This disambiguation order
is unlikely to change, but we should warn about the ambiguity just
like we warn when more than one refs/ hierachies share the same
name.

* nd/warn-ambiguous-object-name:
get_sha1: warn about full or short object names that look like refs

Merge branch 'rr/diffcore-pickaxe-doc'Junio C Hamano Tue, 11 Jun 2013 20:31:04 +0000 (13:31 -0700)

Merge branch 'rr/diffcore-pickaxe-doc'

Update the low-level diffcore documentation on -S/-G and --pickaxe-all.

* rr/diffcore-pickaxe-doc:
diffcore-pickaxe doc: document -S and -G properly
diffcore-pickaxe: make error messages more consistent

Merge branch 'cr/git-work-tree-sans-git-dir'Junio C Hamano Tue, 11 Jun 2013 20:31:01 +0000 (13:31 -0700)

Merge branch 'cr/git-work-tree-sans-git-dir'

These days, "git --work-tree=there cmd" without specifying an
explicit --git-dir=here will do the usual discovery, but we had a
description of older behaviour in the documentation.

* cr/git-work-tree-sans-git-dir:
git.txt: remove stale comment regarding GIT_WORK_TREE

Merge branch 'mm/mediawiki-https-fail-message'Junio C Hamano Tue, 11 Jun 2013 20:30:43 +0000 (13:30 -0700)

Merge branch 'mm/mediawiki-https-fail-message'

Hint users when https:// connection failed to check the certificate.

* mm/mediawiki-https-fail-message:
git-remote-mediawiki: better error message when HTTP(S) access fails

Merge branch 'cb/log-follow-with-combined'Junio C Hamano Tue, 11 Jun 2013 20:30:36 +0000 (13:30 -0700)

Merge branch 'cb/log-follow-with-combined'

* cb/log-follow-with-combined:
fix segfault with git log -c --follow

Merge branch 'xq/credential-osxkeychain'Junio C Hamano Tue, 11 Jun 2013 20:30:31 +0000 (13:30 -0700)

Merge branch 'xq/credential-osxkeychain'

* xq/credential-osxkeychain:
credential-osxkeychain: support more protocols

Merge branch 'fc/do-not-use-the-index-in-add-to-index'Junio C Hamano Tue, 11 Jun 2013 20:30:28 +0000 (13:30 -0700)

Merge branch 'fc/do-not-use-the-index-in-add-to-index'

* fc/do-not-use-the-index-in-add-to-index:
read-cache: trivial style cleanups
read-cache: fix wrong 'the_index' usage

Merge branch 'fc/remote-bzr'Junio C Hamano Tue, 11 Jun 2013 20:30:26 +0000 (13:30 -0700)

Merge branch 'fc/remote-bzr'

* fc/remote-bzr:
remote-bzr: add fallback check for a partial clone
remote-bzr: reorganize the way 'wanted' works
remote-bzr: trivial cleanups
remote-bzr: change global repo
remote-bzr: delay cloning/pulling
remote-bzr: simplify get_remote_branch()
remote-bzr: fix for files with spaces
remote-bzr: recover from failed clones

Merge branch 'fc/remote-hg'Junio C Hamano Tue, 11 Jun 2013 20:30:24 +0000 (13:30 -0700)

Merge branch 'fc/remote-hg'

* fc/remote-hg: (50 commits)
remote-hg: add support for --force
remote-hg: add support for --dry-run
remote-hg: check if a fetch is needed
remote-hg: trivial cleanup
remote-helpers: improve marks usage
remote-hg: add check_push() helper
remote-hg: add setup_big_push() helper
remote-hg: remove files before modifications
remote-hg: improve lightweight tag author
remote-hg: use remote 'default' not local one
remote-hg: improve branch listing
remote-hg: simplify branch_tip()
remote-hg: check diverged bookmarks
remote-hg: pass around revision refs
remote-hg: implement custom checkheads()
remote-hg: implement custom push()
remote-hg: only update necessary revisions
remote-hg: force remote bookmark push selectively
remote-hg: reorganize bookmark handling
remote-hg: add test for failed double push
...

Merge branch 'rj/mingw-cygwin'Junio C Hamano Tue, 11 Jun 2013 20:30:20 +0000 (13:30 -0700)

Merge branch 'rj/mingw-cygwin'

Update build for Cygwin 1.[57]. Torsten Bögershausen reports that
this is fine with Cygwin 1.7 ($gmane/225824) so let's try moving it
ahead.

* rj/mingw-cygwin:
cygwin: Remove the CYGWIN_V15_WIN32API build variable
mingw: rename WIN32 cpp macro to GIT_WINDOWS_NATIVE

Merge branch 'fc/completion-less-ls-remote'Junio C Hamano Tue, 11 Jun 2013 20:30:16 +0000 (13:30 -0700)

Merge branch 'fc/completion-less-ls-remote'

* fc/completion-less-ls-remote:
completion: avoid ls-remote in certain scenarios

Merge branch 'tr/test-commit-only-on-orphan'Junio C Hamano Tue, 11 Jun 2013 20:30:12 +0000 (13:30 -0700)

Merge branch 'tr/test-commit-only-on-orphan'

* tr/test-commit-only-on-orphan:
Test 'commit --only' after 'checkout --orphan'

Merge branch 'rs/unpack-trees-plug-leak'Junio C Hamano Tue, 11 Jun 2013 20:30:05 +0000 (13:30 -0700)

Merge branch 'rs/unpack-trees-plug-leak'

* rs/unpack-trees-plug-leak:
unpack-trees: free cache_entry array members for merges
diff-lib, read-tree, unpack-trees: mark cache_entry array paramters const
diff-lib, read-tree, unpack-trees: mark cache_entry pointers const
unpack-trees: create working copy of merge entry in merged_entry
unpack-trees: factor out dup_entry
read-cache: mark cache_entry pointers const
cache: mark cache_entry pointers const

Merge branch 'rr/die-on-missing-upstream'Junio C Hamano Tue, 11 Jun 2013 20:29:58 +0000 (13:29 -0700)

Merge branch 'rr/die-on-missing-upstream'

When a reflog notation is used for implicit "current branch", we
did not say which branch and worse said "branch ''".

* rr/die-on-missing-upstream:
sha1_name: fix error message for @{<N>}, @{<date>}
sha1_name: fix error message for @{u}

pre-push.sample: Make the script executableWieland Hoffmann Tue, 11 Jun 2013 12:14:56 +0000 (14:14 +0200)

pre-push.sample: Make the script executable

githooks(5) says that "[...]the .sample files are executable by default"
which was not true.

Signed-off-by: Wieland Hoffmann <themineo@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Sync with 1.8.3.1Junio C Hamano Mon, 10 Jun 2013 19:35:32 +0000 (12:35 -0700)

Sync with 1.8.3.1

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Git 1.8.3.1 v1.8.3.1Junio C Hamano Mon, 10 Jun 2013 00:16:20 +0000 (17:16 -0700)

Git 1.8.3.1

Primarily to push out two regression issues that seem to affect many
people, namely, the ".gitignore !directory" bug and "daemon cannot
read from $HOME owned by root" bug.

Signed-off-by: Junio C Hamano <gitster@pobox.com>

mingw: make mingw_signal return the correct handlerErik Faye-Lund Mon, 10 Jun 2013 05:48:17 +0000 (07:48 +0200)

mingw: make mingw_signal return the correct handler

Returning the SIGALRM handler for SIGINT is not very useful.

Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'jn/config-ignore-inaccessible' into maintJunio C Hamano Mon, 10 Jun 2013 00:06:55 +0000 (17:06 -0700)

Merge branch 'jn/config-ignore-inaccessible' into maint

A git daemon that starts as "root" and then drops privilege often
leaves $HOME set to that of the root user, which is unreadable by
the daemon process, which was diagnosed as a configuration error.

Make per-user configuration files that are inaccessible due to
EACCES as though these files do not exist to avoid this issue, as
the tightening which was originally meant as an additional security
has annoyed enough sysadmins.

* jn/config-ignore-inaccessible:
config: allow inaccessible configuration under $HOME

Merge branch 'kb/status-ignored-optim-2' into maintJunio C Hamano Mon, 10 Jun 2013 00:05:15 +0000 (17:05 -0700)

Merge branch 'kb/status-ignored-optim-2' into maint

Fix recent regression of .gitignore files that list !directory to
mark it not-ignored.

* kb/status-ignored-optim-2:
dir.c: fix ignore processing within not-ignored directories

submodule: remove redundant check for the_index.initializedRené Scharfe Sun, 9 Jun 2013 16:33:45 +0000 (18:33 +0200)

submodule: remove redundant check for the_index.initialized

read_cache already performs the same check and returns immediately if
the cache has already been loaded.

Signed-off-by: René Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Document .git/modulesFredrik Gustafsson Sun, 9 Jun 2013 11:11:36 +0000 (13:11 +0200)

Document .git/modules

A note in the beginning of this document describes the behavior already.
This patch just adds where to find the repositories.

Signed-off-by: Fredrik Gustafsson <iveqy@iveqy.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

gitweb: fix problem causing erroneous project listCharles McGarvey Wed, 5 Jun 2013 04:44:28 +0000 (22:44 -0600)

gitweb: fix problem causing erroneous project list

The bug is manifest when running gitweb in a persistent process (e.g.
FastCGI, PSGI), and it's easy to reproduce. If a gitweb request
includes the searchtext parameter (i.e. s), subsequent requests using
the project_list action--which is the default action--and without
a searchtext parameter will be filtered by the searchtext value of the
first request. This is because the value of the $search_regexp global
(the value of which is based on the searchtext parameter) is currently
being persisted between requests.

Instead, clear $search_regexp before dispatching each request.

Signed-off-by: Charles McGarvey <chazmcgarvey@brokenzipper.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

fetch-options.txt: prevent a wildcard refspec from... Junio C Hamano Fri, 7 Jun 2013 15:09:51 +0000 (08:09 -0700)

fetch-options.txt: prevent a wildcard refspec from getting misformatted

When explaining the "--tags" option as an equivalent to giving an
explicit "refs/tags/*:refs/tags/*" refspec, the two asterisks were
misinterpreted by AsciiDoc as a request to typeset the string
segment between them in bold.

We could fix it in two ways. We can replace them with {asterisk}s
while keeping the string as body text, or we can mark it as a
literal string with backquotes around it.

Let's do the latter, as it is teaching the user an "exactly as
typed" alternative.

Noticed-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge tag 'post183-for-junio' of github.com/msysgit/gitJunio C Hamano Fri, 7 Jun 2013 14:38:37 +0000 (07:38 -0700)

Merge tag 'post183-for-junio' of github.com/msysgit/git

Collected msysgit build patches for upstream

This set of patches collects a number of build fixes that have been
used on the msysgit port for a while and merging upstream should
simplify future maintenance.

* tag 'post183-for-junio' of http://github.com/msysgit/git:
Set the default help format to html for msys builds.
Ensure the resource file is rebuilt when the version changes.
Windows resource: handle dashes in the Git version gracefully
Provide a Windows version resource for the git executables.
msysgit: Add the --large-address-aware linker directive to the makefile.
Define NO_GETTEXT for Git for Windows
Makefile: Do not use OLD_ICONV on MINGW anymore

Update draft release notes to 1.8.4Junio C Hamano Thu, 6 Jun 2013 21:42:56 +0000 (14:42 -0700)

Update draft release notes to 1.8.4

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'rj/mingw-compat-st-mode-bits'Junio C Hamano Thu, 6 Jun 2013 19:19:06 +0000 (12:19 -0700)

Merge branch 'rj/mingw-compat-st-mode-bits'

* rj/mingw-compat-st-mode-bits:
path: Fix a sparse warning

Merge branch 'sb/archive-zip-double-assignment-fix'Junio C Hamano Thu, 6 Jun 2013 19:19:04 +0000 (12:19 -0700)

Merge branch 'sb/archive-zip-double-assignment-fix'

* sb/archive-zip-double-assignment-fix:
archive-zip:write_zip_entry: Remove second reset of size variable to zero.

Merge branch 'rr/push-head'Junio C Hamano Thu, 6 Jun 2013 19:19:00 +0000 (12:19 -0700)

Merge branch 'rr/push-head'

"git push $there HEAD:branch" did not resolve HEAD early enough, so
it was easy to flip it around while push is still going on and push
out a branch that the user did not originally intended when the
command was started.

* rr/push-head:
push: make push.default = current use resolved HEAD
push: fail early with detached HEAD and current
push: factor out the detached HEAD error message

Merge branch 'ks/difftool-dir-diff-copy-fix'Junio C Hamano Thu, 6 Jun 2013 19:18:47 +0000 (12:18 -0700)

Merge branch 'ks/difftool-dir-diff-copy-fix'

"difftool --dir-diff" did not copy back changes made by the
end-user in the diff tool backend to the working tree in some
cases.

* ks/difftool-dir-diff-copy-fix:
difftool --dir-diff: allow changing any clean working tree file

Merge branch 'fc/show-branch-in-rebase-am'Junio C Hamano Thu, 6 Jun 2013 19:18:41 +0000 (12:18 -0700)

Merge branch 'fc/show-branch-in-rebase-am'

The bash prompt code (in contrib/) displayed the name of the branch
being rebased when "rebase -i/-m/-p" modes are in use, but not the
plain vanilla "rebase".

* fc/show-branch-in-rebase-am:
prompt: fix for simple rebase

Merge branch 'nd/clone-connectivity-shortcut'Junio C Hamano Thu, 6 Jun 2013 19:17:55 +0000 (12:17 -0700)

Merge branch 'nd/clone-connectivity-shortcut'

Special case "git clone" and use lighter-weight implementation to
check the completeness of the history behind refs.

* nd/clone-connectivity-shortcut:
clone: open a shortcut for connectivity check
index-pack: remove dead code (it should never happen)
fetch-pack: prepare updated shallow file before fetching the pack
clone: let the user know when check_everything_connected is run

Merge branch 'nd/prune-packed-dryrun-verbose'Junio C Hamano Thu, 6 Jun 2013 19:17:52 +0000 (12:17 -0700)

Merge branch 'nd/prune-packed-dryrun-verbose'

* nd/prune-packed-dryrun-verbose:
prune-packed: avoid implying "1" is DRY_RUN in prune_packed_objects()

Merge branch 'fc/transport-helper-no-refspec'Junio C Hamano Thu, 6 Jun 2013 19:17:22 +0000 (12:17 -0700)

Merge branch 'fc/transport-helper-no-refspec'

With "export" remote-helper protocol,

(1) a push that tries to update a remote ref whose name is
different from the pushing side does not work yet, and

(2) the helper may not know how to do --dry-run

Detect such problematic cases and disable them for now.

* fc/transport-helper-no-refspec:
transport-helper: check if the dry-run is supported
transport-helper: barf when user tries old:new

t0005: skip signal death exit code test on WindowsJohannes Sixt Thu, 6 Jun 2013 06:34:41 +0000 (08:34 +0200)

t0005: skip signal death exit code test on Windows

The test case depends on that test-sigchain can commit suicide by a
call to raise(SIGTERM) in a way that run-command.c::wait_or_whine()
can detect as death through a signal. There are no POSIX signals on
Windows, and a sufficiently close emulation is not available in the
Microsoft C runtime (and probably not even possible).

The particular deficiency is that when a signal is raise()d whose
SIG_DFL action will cause process death (SIGTERM in this case), the
implementation of raise() in msvcrt just calls exit(3).

We could check for exit code 3 in addition to 143, but that would
miss the point of the test entirely. Hence, just skip it on Windows.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Update draft release notes to 1.8.4Junio C Hamano Wed, 5 Jun 2013 22:14:02 +0000 (15:14 -0700)

Update draft release notes to 1.8.4

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'rs/commit-m-no-edit'Junio C Hamano Wed, 5 Jun 2013 21:59:53 +0000 (14:59 -0700)

Merge branch 'rs/commit-m-no-edit'

"git commit --allow-empty-message -m ''" should not start an
editor.

* rs/commit-m-no-edit:
commit: don't start editor if empty message is given with -m

Merge branch 'fc/send-email-chainreplyto-warning'Junio C Hamano Wed, 5 Jun 2013 21:59:34 +0000 (14:59 -0700)

Merge branch 'fc/send-email-chainreplyto-warning'

An overdue removal of "behaviour changed at 1.7.0; if you were
living in a cave, here is what you can adjust to it" message.

* fc/send-email-chainreplyto-warning:
send-email: remove warning about unset chainreplyto

Merge branch 'fc/cleanups'Junio C Hamano Wed, 5 Jun 2013 21:59:31 +0000 (14:59 -0700)

Merge branch 'fc/cleanups'

* fc/cleanups:
test: rebase: fix --interactive test
test: trivial cleanups
remote: trivial style cleanup

Merge branch 'fc/makefile'Junio C Hamano Wed, 5 Jun 2013 21:56:56 +0000 (14:56 -0700)

Merge branch 'fc/makefile'

Update Makefile to use handy automatic variables where appropriate,
and stop installing a script that is only used for testing.

* fc/makefile:
build: do not install git-remote-testpy
build: add NO_INSTALL variable
build: cleanup using $<
build: cleanup using $^
build: trivial simplification

Merge branch 'nd/urls-doc-no-file-hyperlink-fix'Junio C Hamano Wed, 5 Jun 2013 21:56:51 +0000 (14:56 -0700)

Merge branch 'nd/urls-doc-no-file-hyperlink-fix'

* nd/urls-doc-no-file-hyperlink-fix:
urls.txt: avoid auto converting to hyperlink

Merge branch 'tr/push-no-verify-doc'Junio C Hamano Wed, 5 Jun 2013 21:56:48 +0000 (14:56 -0700)

Merge branch 'tr/push-no-verify-doc'

"git push --[no-]verify" was not documented.

* tr/push-no-verify-doc:
Document push --no-verify

Merge branch 'tg/maint-zsh-svn-remote-prompt'Junio C Hamano Wed, 5 Jun 2013 21:56:41 +0000 (14:56 -0700)

Merge branch 'tg/maint-zsh-svn-remote-prompt'

zsh prompt script that borrowed from bash prompt script did not
work due to slight differences in array variable notation between
these two shells.

* tg/maint-zsh-svn-remote-prompt:
prompt: fix show upstream with svn and zsh

Merge branch 'th/bisect-skip-report-range-fix'Junio C Hamano Wed, 5 Jun 2013 21:56:38 +0000 (14:56 -0700)

Merge branch 'th/bisect-skip-report-range-fix'

Fix for an additional bisect log comments.

* th/bisect-skip-report-range-fix:
bisect: Fix log output for multi-parent skip ranges

Merge branch 'dm/unbash-subtree'Junio C Hamano Wed, 5 Jun 2013 21:56:24 +0000 (14:56 -0700)

Merge branch 'dm/unbash-subtree'

It turns out that git-subtree script does not have to be run with
bash.

* dm/unbash-subtree:
contrib/git-subtree: Use /bin/sh interpreter instead of /bin/bash

Merge branch 'rr/zsh-color-prompt'Junio C Hamano Wed, 5 Jun 2013 21:55:10 +0000 (14:55 -0700)

Merge branch 'rr/zsh-color-prompt'

Prompt support (in contrib/) for zsh is updated to use colors.

* rr/zsh-color-prompt:
prompt: colorize ZSH prompt
prompt: factor out gitstring coloring logic
prompt: introduce GIT_PS1_STATESEPARATOR

Merge branch 'jc/core-checkstat'Junio C Hamano Wed, 5 Jun 2013 21:53:07 +0000 (14:53 -0700)

Merge branch 'jc/core-checkstat'

The configuration variable core.checkstat was advertised in the
documentation but the code expected core.statinfo instead.

For now, we accept both core.checkstat and core.statinfo, but the
latter will be removed in the longer term.

* jc/core-checkstat:
deprecate core.statinfo at Git 2.0 boundary

Merge branch 'maint'Junio C Hamano Tue, 4 Jun 2013 22:25:34 +0000 (15:25 -0700)

Merge branch 'maint'

* maint:
t/README: test_must_fail is for testing Git

t/README: test_must_fail is for testing GitJunio C Hamano Tue, 4 Jun 2013 16:50:12 +0000 (09:50 -0700)

t/README: test_must_fail is for testing Git

When a test wants to make sure there is no <string> in an output
file, we should just say "! grep string output".

"test_must_fail" is there only to test Git command and catch unusual
deaths we know about (e.g. segv) as an error, not as an expected
failure. "test_must_fail grep string output" is unnecessary, as
we are not making sure the system binaries do not dump core or
anything like that.

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Set the default help format to html for msys builds.Pat Thoyts Thu, 21 Jun 2012 11:24:14 +0000 (12:24 +0100)

Set the default help format to html for msys builds.

This resolves issue #19 by setting the compiled default to html in msys
builds following the changes introduced by commit
1cc8af0 "help: use HTML as the default help format on Windows"

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>

Ensure the resource file is rebuilt when the version... Pat Thoyts Fri, 1 Jun 2012 22:29:33 +0000 (23:29 +0100)

Ensure the resource file is rebuilt when the version changes.

Acked-by: Erik Faye-Lund <kusmabite@gmail.com>
Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>

Windows resource: handle dashes in the Git version... Johannes Schindelin Thu, 31 May 2012 17:53:45 +0000 (12:53 -0500)

Windows resource: handle dashes in the Git version gracefully

Reported by postiffm as issue #14.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>

Provide a Windows version resource for the git executables.Pat Thoyts Wed, 23 May 2012 23:56:24 +0000 (00:56 +0100)

Provide a Windows version resource for the git executables.

Embeds the git version and description into the git executable thus
implementing the request in issue #5.

Acked-by: Heiko Voigt <hvoigt@hvoigt.net>
Acked-by: Sebastian Schuberth <sschuberth@gmail.com>
Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>

msysgit: Add the --large-address-aware linker directive... Pierre le Riche Mon, 28 May 2012 07:46:54 +0000 (09:46 +0200)

msysgit: Add the --large-address-aware linker directive to the makefile.

This has the effect of increasing the address space from 2GB to 4GB under
64-bit Windows, reducing the likelihood of an "out of memory" error when
e.g. repacking a large repository. The test suite passes with this
patch, with and without the MEM_TOP_DOWN flag added to all VirtualAlloc
calls. While this is no guarantee that there are no issues with large
memory support (it could break Git on other setups than mine, for
example), it at least increases the chance that nothing obvious goes wrong
(such as errors introduced by faulty sign extension, say, with ssize_t).

[PT: Resolves github issue #12]

Signed-off-by: Pierre le Riche <github@pleasedontspam.me>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>

Define NO_GETTEXT for Git for WindowsJohannes Schindelin Thu, 5 Jan 2012 22:41:41 +0000 (16:41 -0600)

Define NO_GETTEXT for Git for Windows

The dreaded "your vnsprintf is broken (returned -1)" error is back. At
least with the libintl version we have. So for the moment, just work
around the issue by _not_ using gettext.

Ah, I wish that my attempt at implementing a custom strbuf_vaddf() would
not have been brushed aside so rashly. Oh well. Time saved on maintaining
that thing, I guess (although more time went into working around coping
with existing implementations).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>

Makefile: Do not use OLD_ICONV on MINGW anymoreSebastian Schuberth Wed, 23 Nov 2011 09:41:01 +0000 (10:41 +0100)

Makefile: Do not use OLD_ICONV on MINGW anymore

We are building libiconv now the same way as upstream MinGW does, so we do
not need OLD_ICONV anymore when compiling Git either in msysGit or
mingwGitDevEnv.

Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>

Sync with maintJunio C Hamano Mon, 3 Jun 2013 20:00:03 +0000 (13:00 -0700)

Sync with maint

Merge branch 'kb/status-ignored-optim-2'Junio C Hamano Mon, 3 Jun 2013 19:58:56 +0000 (12:58 -0700)

Merge branch 'kb/status-ignored-optim-2'

Fix 1.8.3 regressions in the .gitignore path exclusion logic.

* kb/status-ignored-optim-2:
dir.c: fix ignore processing within not-ignored directories

sha1_file: silence sha1_loose_object_infoThomas Rast Thu, 30 May 2013 20:00:22 +0000 (22:00 +0200)

sha1_file: silence sha1_loose_object_info

sha1_object_info() returns -1 (OBJ_BAD) if it cannot find the object
for some reason, which suggests that it wants the _caller_ to report
this error. However, part of its work happens in
sha1_loose_object_info, which _does_ report errors itself. This is
doubly strange because:

* packed_object_info(), which is the other half of the duo, does _not_
report this.

* In the event that an object is packed and pruned while
sha1_object_info_extended() goes looking for it, we would
erroneously show the error -- even though the code of the latter
function purports to handle this case gracefully.

* A caller might invoke sha1_object_info() to find the type of an
object even if that object is not known to exist.

Silence this error. The others remain untouched as a corrupt object
is a much more grave error than it merely being absent.

Signed-off-by: Thomas Rast <trast@inf.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

diffcore-pickaxe doc: document -S and -G properlyRamkumar Ramachandra Fri, 31 May 2013 12:12:15 +0000 (17:42 +0530)

diffcore-pickaxe doc: document -S and -G properly

The documentation of -S and -G is very sketchy. Completely rewrite the
sections in Documentation/diff-options.txt and
Documentation/gitdiffcore.txt.

References:
52e9578 ([PATCH] Introducing software archaeologist's tool "pickaxe".)
f506b8e (git log/diff: add -G<regexp> that greps in the patch text)

Inputs-from: Phil Hord <phil.hord@gmail.com>
Co-authored-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

diffcore-pickaxe: make error messages more consistentRamkumar Ramachandra Fri, 31 May 2013 12:12:14 +0000 (17:42 +0530)

diffcore-pickaxe: make error messages more consistent

Currently, diffcore-pickaxe reports two distinct errors for the same
user error:

$ git log --pickaxe-regex -S'\1'
fatal: invalid pickaxe regex: Invalid back reference

$ git log -G'\1'
fatal: invalid log-grep regex: Invalid back reference

This "log-grep" was only an internal name for the -G feature during
development, and invite confusion with "git log --grep=<pattern>".

Change the error messages to say "invalid regex".

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git.txt: remove stale comment regarding GIT_WORK_TREEChris Rorvick Fri, 31 May 2013 01:11:41 +0000 (20:11 -0500)

git.txt: remove stale comment regarding GIT_WORK_TREE

Official support for specifying --work-tree/GIT_WORK_TREE without
--git-dir/GIT_DIR was added with v1.7.4-rc3~2^2~2. Update description
of GIT_WORK_TREE to reflect this.

Signed-off-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

sha1_file: trivial style cleanupFelipe Contreras Thu, 30 May 2013 13:56:21 +0000 (08:56 -0500)

sha1_file: trivial style cleanup

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

read-cache: trivial style cleanupsFelipe Contreras Thu, 30 May 2013 13:56:19 +0000 (08:56 -0500)

read-cache: trivial style cleanups

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

read-cache: fix wrong 'the_index' usageFelipe Contreras Thu, 30 May 2013 13:56:18 +0000 (08:56 -0500)

read-cache: fix wrong 'the_index' usage

We are dealing with the 'istate' index, not 'the_index'.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

test: fix post rewrite hook reportFelipe Contreras Thu, 30 May 2013 13:46:35 +0000 (08:46 -0500)

test: fix post rewrite hook report

First expected, then actual.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Acked-by: Thomas Rast <trast@inf.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

completion: avoid ls-remote in certain scenariosFelipe Contreras Wed, 29 May 2013 03:20:48 +0000 (22:20 -0500)

completion: avoid ls-remote in certain scenarios

It's _very_ slow in many cases, and there's really no point in fetching
*everything* from the remote just for completion. In many cases it might
be faster for the user to type the whole thing.

If the user manually specifies 'refs/*', then the full ls-remote
completion is triggered.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Update draft release notes to 1.8.4Junio C Hamano Sun, 2 Jun 2013 23:02:21 +0000 (16:02 -0700)

Update draft release notes to 1.8.4

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'tr/line-log'Junio C Hamano Sun, 2 Jun 2013 23:00:44 +0000 (16:00 -0700)

Merge branch 'tr/line-log'

* tr/line-log:
git-log(1): remove --full-line-diff description
line-log: fix documentation formatting
log -L: improve comments in process_all_files()
log -L: store the path instead of a diff_filespec
log -L: test merge of parallel modify/rename
t4211: pass -M to 'git log -M -L...' test
log -L: fix overlapping input ranges
log -L: check range set invariants when we look it up
Speed up log -L... -M
log -L: :pattern:file syntax to find by funcname
Implement line-history search (git log -L)
Export rewrite_parents() for 'log -L'
Refactor parse_loc

Merge branch 'mc/describe-first-parent'Junio C Hamano Sun, 2 Jun 2013 22:59:49 +0000 (15:59 -0700)

Merge branch 'mc/describe-first-parent'

* mc/describe-first-parent:
describe: Add --first-parent option

Merge branch 'rs/tar-tests'Junio C Hamano Sun, 2 Jun 2013 22:59:46 +0000 (15:59 -0700)

Merge branch 'rs/tar-tests'

* rs/tar-tests:
t5000: test long filenames
t5000: simplify tar-tree tests
t5000: use check_tar for prefix test
t5000: factor out check_tar
t5000, t5003: create directories for extracted files lazily
t5000: integrate export-subst tests into regular tests

Merge branch 'jc/strbuf-branchname-fix'Junio C Hamano Sun, 2 Jun 2013 22:58:53 +0000 (15:58 -0700)

Merge branch 'jc/strbuf-branchname-fix'

"git merge @{-1}~22" was rewritten to "git merge frotz@{1}~22"
incorrectly when your previous branch was "frotz" (it should be
rewritten to "git merge frotz~22" instead).

* jc/strbuf-branchname-fix:
strbuf_branchname(): do not double-expand @{-1}~22

Merge branch 'jk/fetch-always-update-tracking'Junio C Hamano Sun, 2 Jun 2013 22:57:26 +0000 (15:57 -0700)

Merge branch 'jk/fetch-always-update-tracking'

"git fetch origin master" unlike "git fetch origin" or "git fetch"
did not update "refs/remotes/origin/master"; this was an early
design decision to keep the update of remote tracking branches
predictable, but in practice it turns out that people find it more
convenient to opportunisticly update them whenever we have a chance,
and we have been updating them when we run "git push" which already
breaks the original "predictability" anyway.

Now such a fetch does update refs/remotes/origin/master.

* jk/fetch-always-update-tracking:
fetch: don't try to update unfetched tracking refs
fetch: opportunistically update tracking refs
refactor "ref->merge" flag
fetch/pull doc: untangle meaning of bare <ref>
t5510: start tracking-ref tests from a known state

Merge branch 'tr/coverage'Junio C Hamano Sun, 2 Jun 2013 22:57:18 +0000 (15:57 -0700)

Merge branch 'tr/coverage'

Update the test coverage support that was left to bitrot for some
time.

* tr/coverage:
coverage: build coverage-untested-functions by default
coverage: set DEFAULT_TEST_TARGET to avoid using prove
coverage: do not delete .gcno files before building
coverage: split build target into compile and test

Merge branch 'mk/combine-diff-context-horizon-fix'Junio C Hamano Sun, 2 Jun 2013 22:56:46 +0000 (15:56 -0700)

Merge branch 'mk/combine-diff-context-horizon-fix'

"git diff -c -p" was not showing a deleted line from a hunk when
another hunk immediately begins where the earlier one ends.

* mk/combine-diff-context-horizon-fix:
combine-diff.c: Fix output when changes are exactly 3 lines apart

Merge branch 'kb/ancestry-path-threedots'Junio C Hamano Sun, 2 Jun 2013 22:56:11 +0000 (15:56 -0700)

Merge branch 'kb/ancestry-path-threedots'

"git log --ancestry-path A...B" did not work as expected, as it did
not pay attention to the fact that the merge base between A and B
was the bottom of the range being specified.

* kb/ancestry-path-threedots:
revision.c: treat A...B merge bases as if manually specified
t6019: demonstrate --ancestry-path A...B breakage

Merge branch 'jc/t5551-posix-sed-bre'Junio C Hamano Sun, 2 Jun 2013 22:56:08 +0000 (15:56 -0700)

Merge branch 'jc/t5551-posix-sed-bre'

POSIX fix for a test script.

* jc/t5551-posix-sed-bre:
t5551: do not use unportable sed '\+'

Merge branch 'da/darwin'Junio C Hamano Sun, 2 Jun 2013 22:55:48 +0000 (15:55 -0700)

Merge branch 'da/darwin'

Newer MacOS X encourages the programs to compile and link with
their CommonCrypto, not with OpenSSL.

* da/darwin:
imap-send: eliminate HMAC deprecation warnings on Mac OS X
cache.h: eliminate SHA-1 deprecation warnings on Mac OS X
Makefile: add support for Apple CommonCrypto facility
Makefile: fix default regex settings on Darwin

Merge branch 'fc/macos-x-clipped-write'Junio C Hamano Sun, 2 Jun 2013 22:54:54 +0000 (15:54 -0700)

Merge branch 'fc/macos-x-clipped-write'

Mac OS X does not like to write(2) more than INT_MAX number of
bytes.

* fc/macos-x-clipped-write:
compate/clipped-write.c: large write(2) fails on Mac OS X/XNU

Merge branch 'vv/help-unknown-ref'Junio C Hamano Sun, 2 Jun 2013 22:54:06 +0000 (15:54 -0700)

Merge branch 'vv/help-unknown-ref'

Detect "git merge foo" that might have meant "git merge origin/foo"
and give an error message that is more specific than "foo is not
something we can merge".

* vv/help-unknown-ref:
merge: use help_unknown_ref()
help: add help_unknown_ref()

Merge branch 'nd/clone-local-with-colon'Junio C Hamano Sun, 2 Jun 2013 22:52:22 +0000 (15:52 -0700)

Merge branch 'nd/clone-local-with-colon'

"git clone foo/bar:baz" cannot be a request to clone from a remote
over git-over-ssh specified in the scp style. Detect this case and
clone from a local repository at "foo/bar:baz".

* nd/clone-local-with-colon:
clone: allow cloning local paths with colons in them

Merge branch 'fc/fast-export-persistent-marks'Junio C Hamano Sun, 2 Jun 2013 22:48:28 +0000 (15:48 -0700)

Merge branch 'fc/fast-export-persistent-marks'

Optimization for fast-export by avoiding unnecessarily resolving
arbitrary object name and parsing object when only presence and
type information is necessary, etc.

* fc/fast-export-persistent-marks:
fast-{import,export}: use get_sha1_hex() to read from marks file
fast-export: don't parse commits while reading marks file
fast-export: do not parse non-commit objects while reading marks file

Merge branch 'rs/empty-archive'Junio C Hamano Sun, 2 Jun 2013 22:48:24 +0000 (15:48 -0700)

Merge branch 'rs/empty-archive'

Fixes tests added in 1.8.2 era that are broken on BSDs.

* rs/empty-archive:
t5004: resurrect original empty tar archive test
t5004: avoid using tar for checking emptiness of archive

Merge branch 'rh/merge-options-doc-fix'Junio C Hamano Sun, 2 Jun 2013 22:48:22 +0000 (15:48 -0700)

Merge branch 'rh/merge-options-doc-fix'

* rh/merge-options-doc-fix:
Documentation/merge-options.txt: restore `-e` option

Merge branch 'an/diff-index-doc'Junio C Hamano Sun, 2 Jun 2013 22:48:17 +0000 (15:48 -0700)

Merge branch 'an/diff-index-doc'

* an/diff-index-doc:
Documentation/diff-index: mention two modes of operation

Merge branch 'fc/completion'Junio C Hamano Sun, 2 Jun 2013 22:48:12 +0000 (15:48 -0700)

Merge branch 'fc/completion'

* fc/completion:
completion: remove __git_index_file_list_filter()
completion: add space after completed filename
completion: add hack to enable file mode in bash < 4
completion: refactor __git_complete_index_file()
completion: refactor diff_index wrappers
completion: use __gitcompadd for __gitcomp_file
completion; remove unuseful comments
completion: document tilde expansion failure in tests
completion: add file completion tests