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
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
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
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
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
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
...
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
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
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'
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
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}
Wieland 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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
Junio 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 <redacted>
Junio 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 <redacted>
Erik 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 <redacted>
Signed-off-by: Johannes Sixt <redacted>
Signed-off-by: Junio C Hamano <redacted>
Matthieu Moy [Mon, 10 Jun 2013 14:26:09 +0000 (16:26 +0200)]
make color.ui default to 'auto'
Most users seem to like having colors enabled, and colors can help
beginners to understand the output of some commands (e.g. notice
immediately the boundary between commits in the output of "git log").
Many tutorials tell the users to set color.ui=auto as a very first step,
which tend to indicate that color.ui=none is not the recommanded value,
hence should not be the default.
These tutorials would benefit from skipping this step and starting the
real Git manipulations earlier. Other beginners do not know about
color.ui=auto, and may not discover it by themselves, hence live with
black&white outputs while they may have preferred colors.
A few people (e.g. color-blind) prefer having no colors, but they can
easily set color.ui=never for this (and googling "disable colors in git"
already tells them how to do so), but this needs not occupy space in
beginner-oriented documentations.
A transition period with Git emitting a warning when color.ui is unset
would be possible, but the discomfort of having the warning seems
superior to the benefit: users may be surprised by the change, but not
harmed by it.
The default value is changed, and the documentation is reworded to
mention "color.ui=false" first, since the primary use of color.ui after
this change is to disable colors, not to enable it.
Signed-off-by: Matthieu Moy <redacted>
Signed-off-by: Junio C Hamano <redacted>
Junio 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
Junio 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
René Scharfe [Sun, 9 Jun 2013 17:39:18 +0000 (19:39 +0200)]
read-cache: free cache in discard_index
discard_cache doesn't have to free the array of cache entries, because
the next call of read_cache can simply reuse it, as they all operate on
the global variable the_index.
discard_index on the other hand does have to free it, because it can be
used e.g. with index_state variables on the stack, in which case a
missing free would cause an unrecoverable leak. This patch releases the
memory and removes a comment that was relevant for discard_cache but has
become outdated.
Since discard_cache is just a wrapper around discard_index nowadays, we
lose the optimization that avoids reallocation of that array within
loops of read_cache and discard_cache. That doesn't cause a performance
regression for me, however (HEAD = this patch, HEAD^ = master + p0002):
Test // HEAD^ HEAD
---------------\\-----------------------------------------------------
0002.1: read_ca// 1000 times 0.62(0.58+0.04) 0.61(0.58+0.02) -1.6%
Suggested-by: Felipe Contreras <redacted>
Signed-off-by: René Scharfe <redacted>
Signed-off-by: Junio C Hamano <redacted>
René Scharfe [Sun, 9 Jun 2013 17:39:17 +0000 (19:39 +0200)]
read-cache: add simple performance test
Add the helper test-read-cache, which can be used to call read_cache and
discard_cache in a loop as well as a performance check based on it.
Signed-off-by: René Scharfe <redacted>
Signed-off-by: Junio C Hamano <redacted>
Junio C Hamano [Sun, 9 Jun 2013 18:29:20 +0000 (11:29 -0700)]
test: test_must_be_empty helper
There are quite a lot places where an output file is expected to be
empty, and we fail the test when it is not. The output from running
the test script with -i -v can be helped if we showed the unexpected
contents at that point.
We could of course do
>expected.empty && test_cmp expected.empty actual
but this is commmon enough to be done with a dedicated helper.
Signed-off-by: Junio C Hamano <redacted>
Nguyễn Thái Ngọc Duy [Sun, 9 Jun 2013 05:22:49 +0000 (12:22 +0700)]
git.txt: document GIT_TRACE_PACKET
"This can help with debugging object negotiation or other protocol
issues."
Signed-off-by: Nguyễn Thái Ngọc Duy <redacted>
Signed-off-by: Junio C Hamano <redacted>
Nguyễn Thái Ngọc Duy [Sun, 9 Jun 2013 05:22:48 +0000 (12:22 +0700)]
core: use env variable instead of config var to turn on logging pack access
5f44324 (core: log offset pack data accesses happened - 2011-07-06)
provides a way to observe pack access patterns via a config
switch. Setting an environment variable looks more obvious than a
config var, especially when you just need to _observe_, and more
inline with other tracing knobs we have.
Document it as it may be useful for remote troubleshooting.
Signed-off-by: Nguyễn Thái Ngọc Duy <redacted>
Signed-off-by: Junio C Hamano <redacted>
Ramkumar Ramachandra [Sun, 2 Jun 2013 14:03:42 +0000 (19:33 +0530)]
completion: show can take both revlist and paths
The 'git show' completion uses __git_complete_file (aliased to
__git_complete_revlist_file), because accepts <tree-ish>:<path> as
well as <commit-ish>. But the command also accepts range of commits
in A..B notation, so using __git_complete_revlist_file is more
appropriate.
There still remain two users of __git_complete_file, completions for
"archive" and "ls-tree". As these commands do not take range
notation, and "git show" no longer uses __git_complete_file, the
implementation of it can be updated not to complete ranges, but that
is a separate topic.
Signed-off-by: Ramkumar Ramachandra <redacted>
Signed-off-by: Junio C Hamano <redacted>
Felipe Contreras [Sat, 8 Jun 2013 22:38:58 +0000 (17:38 -0500)]
Makefile: use $^ to avoid listing prerequisites on the command line
There's no need to list again the prerequisites.
Signed-off-by: Felipe Contreras <redacted>
Signed-off-by: Junio C Hamano <redacted>
René 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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
Fredrik 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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
Felipe Contreras [Fri, 7 Jun 2013 22:03:07 +0000 (17:03 -0500)]
build: do not install git-remote-testgit
Signed-off-by: Felipe Contreras <redacted>
Signed-off-by: Junio C Hamano <redacted>
Felipe Contreras [Fri, 7 Jun 2013 22:03:06 +0000 (17:03 -0500)]
build: generate and clean test scripts
Commit
416fda6 (build: do not install git-remote-testpy) made it so
git-remote-testpy is not only not installed, but also not generated
by default. From a fresh checkout, "make --test=5800 test" would
have failed.
This was not found primarily because "make clean" failed to remove
git-remote-testpy, which is another bug in the same commit.
Fix the former by having 'all' target depend on $(NO_INSTALL) and
the latter by removing $(NO_INSTALL) in the 'clean' target.
Signed-off-by: Felipe Contreras <redacted>
Signed-off-by: Junio C Hamano <redacted>
Junio C Hamano [Fri, 7 Jun 2013 23:15:32 +0000 (16:15 -0700)]
Merge branch 'js/transport-helper-error-reporting-fix' into fc/makefile
* js/transport-helper-error-reporting-fix:
git-remote-testgit: build it to run under $SHELL_PATH
git-remote-testgit: further remove some bashisms
git-remote-testgit: avoid process substitution
t5801: "VAR=VAL shell_func args" is forbidden
transport-helper: update remote helper namespace
transport-helper: trivial code shuffle
transport-helper: warn when refspec is not used
transport-helper: clarify pushing without refspecs
transport-helper: update refspec documentation
transport-helper: clarify *:* refspec
transport-helper: improve push messages
transport-helper: mention helper name when it dies
transport-helper: report errors properly
Conflicts:
t/t5801-remote-helpers.sh
John Keeping [Sat, 27 Apr 2013 13:24:16 +0000 (14:24 +0100)]
git-gui: fix file name handling with non-empty prefix
Commit
e3d06ca (git-gui: Detect full path when parsing arguments -
2012-10-02) fixed the handling of absolute paths passed to the browser
and blame subcommands by checking whether the file exists without the
prefix before prepending the prefix and checking again. Since we have
chdir'd to the top level of the working tree before doing this, this
does not work if a file with the same name exists in a subdirectory and
at the top level (for example Makefile in git.git's t/ directory).
Instead of doing this, revert that patch and fix absolute path issue by
using "file join" to prepend the prefix to the supplied path. This will
correctly handle absolute paths by skipping the prefix in that case.
Acked-by: Andrew Wong <redacted>
Signed-off-by: John Keeping <redacted>
Signed-off-by: Pat Thoyts <redacted>
Johannes Sixt [Fri, 7 Jun 2013 20:53:34 +0000 (22:53 +0200)]
t4011: remove SYMLINKS prerequisite
The part of the test that is about symbolic links in the index does not
require that the corresponding file system entry is actually a symbolic
link. Use test_ln_s_add to insert a symbolic link in the index. When
the file system does not support symbolic links, we actually have a
regular file in the worktree, which we can update as if it were a
symbolic link. diff-index picks up the symbolic link property from the
index.
Signed-off-by: Johannes Sixt <redacted>
Signed-off-by: Junio C Hamano <redacted>
Johannes Sixt [Fri, 7 Jun 2013 20:53:33 +0000 (22:53 +0200)]
t6035: use test_ln_s_add to remove SYMLINKS prerequisite
All tests in t6035 are protected by SYMLINKS. But that is not necessary,
because a lot of the functionality can be tested provided symbolic link
entries enter the index and object data base. Use test_ln_s_add for this
purpose.
Some test cases do test the presence of symbolic links on the file system.
Move these tests into separate test cases that remain protected by
SYMLINKS.
There is one instance of expect_failure. There is a possibility that this
test case fails differently depending on whether SYMLINKS is present or
not; but this is not the case.
Signed-off-by: Johannes Sixt <redacted>
Signed-off-by: Junio C Hamano <redacted>
Johannes Sixt [Fri, 7 Jun 2013 20:53:32 +0000 (22:53 +0200)]
t3509, t4023, t4114: use test_ln_s_add to remove SYMLINKS prerequisite
In t4023 and t4114, we have to remove the entries using 'git rm' because
otherwise the entries that must turn from symbolic links to regular files
would stay symbolic links in the index. For the same reason, we have to
use 'git mv' instead of plain 'mv' in t3509.
Signed-off-by: Johannes Sixt <redacted>
Signed-off-by: Junio C Hamano <redacted>
Johannes Sixt [Fri, 7 Jun 2013 20:53:31 +0000 (22:53 +0200)]
t3100: use test_ln_s_add to remove SYMLINKS prerequisite
This undoes the special casing introduced in this test by
704a3143
(Use prerequisite tags to skip tests that depend on symbolic links,
2009-03-04).
Signed-off-by: Johannes Sixt <redacted>
Signed-off-by: Junio C Hamano <redacted>
Johannes Sixt [Fri, 7 Jun 2013 20:53:30 +0000 (22:53 +0200)]
t3030: use test_ln_s_add to remove SYMLINKS prerequisite
The test cases include many corner-cases of merge-recursive's behavior,
some of them involve type changes and symbolic links. All cases, including
those that are protected by SYMLINKS check only whether the result of
merge-recursive is correctly stored in the database and the index; the
file system is not investigated. Use test_ln_s_add to enter a symbolic
link in the index in the test setup and run the tests without the
SYMLINKS prerequisite.
Notice that one test that has the SYMLINKS protection removed is an
expect_failure. There is a possibility that the test fails differently
depending on whether SYMLINKS is present or not; but this is not the case
presently.
Signed-off-by: Johannes Sixt <redacted>
Signed-off-by: Junio C Hamano <redacted>
Johannes Sixt [Fri, 7 Jun 2013 20:53:29 +0000 (22:53 +0200)]
t0000: use test_ln_s_add to remove SYMLINKS prerequisite
t0000-basic hard-codes many object IDs. To cater to file systems that do
not support symbolic links, different IDs are used depending on the
SYMLINKS prerequisite. But we can observe the symbolic links are only
needed to generate index entries. Use test_ln_s_add to generate the
index entries and get rid of explicit SYMLINKS checks.
This undoes the special casing introduced in this test by
704a3143
(Use prerequisite tags to skip tests that depend on symbolic links,
2009-03-04).
Signed-off-by: Johannes Sixt <redacted>
Signed-off-by: Junio C Hamano <redacted>
Johannes Sixt [Fri, 7 Jun 2013 20:53:28 +0000 (22:53 +0200)]
tests: use test_ln_s_add to remove SYMLINKS prerequisite (trivial cases)
There are many instances where the treatment of symbolic links in the
object model and the algorithms are tested, but where it is not
necessary to actually have a symbolic link in the worktree. Make
adjustments to the tests and remove the SYMLINKS prerequisite when
appropriate in trivial cases, where "trivial" means:
- merely a replacement of 'ln -s a b && git add b' by test_ln_s_add
is needed;
- a test for symbolic link on the file system can be split off (and
remains protected by SYMLINKS);
- existing code is equivalent to test_ln_s_add.
Signed-off-by: Johannes Sixt <redacted>
Signed-off-by: Junio C Hamano <redacted>
Johannes Sixt [Fri, 7 Jun 2013 20:53:27 +0000 (22:53 +0200)]
tests: introduce test_ln_s_add
Add a new function that creates a symbolic link and adds it to the index
to be used in cases where a symbolic link is not required on the file
system. We will use it to remove many SYMLINKS prerequisites from test
cases.
Signed-off-by: Johannes Sixt <redacted>
Signed-off-by: Junio C Hamano <redacted>
Johannes Sixt [Fri, 7 Jun 2013 20:53:26 +0000 (22:53 +0200)]
t3010: modernize style
In particular:
- move test preparations inside test_expect_success
- place test description on the test_expect_success line
- indent with a tab
Signed-off-by: Johannes Sixt <redacted>
Signed-off-by: Junio C Hamano <redacted>
Junio C Hamano [Sat, 13 Apr 2013 18:56:41 +0000 (11:56 -0700)]
commit-slab: introduce a macro to define a slab for new type
Introduce a header file to define a macro that can define the struct
type, initializer, accessor and cleanup functions to manage a commit
slab. Update the "indegree" topological sort facility using it.
To associate 32 flag bits with each commit, you can write:
define_commit_slab(flag32, uint32);
to declare "struct flag32" type, define an instance of it with
struct flag32 flags;
and initialize it by calling
init_flag32(&flags);
After that, a call to flag32_at() function
uint32 *fp = flag32_at(&flags, commit);
will return a pointer pointing at a uint32 for that commit. Once
you are done with these flags, clean them up with
clear_flag32(&flags);
Callers that cannot hard-code how wide the data to be associated
with the commit be at compile time can use the "_with_stride"
variant to initialize the slab.
Suppose you want to give one bit per existing ref, and paint commits
down to find which refs are descendants of each commit. Saying
typedef uint32 bits320[5];
define_commit_slab(flagbits, bits320);
at compile time will still limit your code with hard-coded limit,
because you may find that you have more than 320 refs at runtime.
The code can declare a commit slab "struct flagbits" like this
instead:
define_commit_slab(flagbits, unsigned char);
struct flagbits flags;
and initialize it by:
nrefs = ... count number of refs ...
init_flagbits_with_stride(&flags, (nrefs + 7) / 8);
so that
unsigned char *fp = flagbits_at(&flags, commit);
will return a pointer pointing at an array of 40 "unsigned char"s
associated with the commit, once you figure out nrefs is 320 at
runtime.
Signed-off-by: Junio C Hamano <redacted>
Martin von Zweigbergk [Fri, 7 Jun 2013 06:11:43 +0000 (23:11 -0700)]
tests: move test for rebase messages from t3400 to t3406
t3406 is supposed to test "messages from rebase operation", so let's
move tests in t3400 that fit that description into 3406. Most of the
functionality they tested, except for the messages, has now been
subsumed by t3420.
Signed-off-by: Martin von Zweigbergk <redacted>
Signed-off-by: Junio C Hamano <redacted>
Martin von Zweigbergk [Fri, 7 Jun 2013 06:11:42 +0000 (23:11 -0700)]
t3406: modernize style
Update the following:
- Quote 'setup'
- Remove blank lines within test case body
- Use test_commit instead of custom quick_one
- Create branch "topic" from tag created by test_commit
Signed-off-by: Martin von Zweigbergk <redacted>
Signed-off-by: Junio C Hamano <redacted>
Martin von Zweigbergk [Fri, 7 Jun 2013 06:11:41 +0000 (23:11 -0700)]
add tests for rebasing merged history
Signed-off-by: Martin von Zweigbergk <redacted>
Signed-off-by: Junio C Hamano <redacted>
Martin von Zweigbergk [Fri, 7 Jun 2013 06:11:40 +0000 (23:11 -0700)]
add tests for rebasing root
Signed-off-by: Martin von Zweigbergk <redacted>
Signed-off-by: Junio C Hamano <redacted>
Martin von Zweigbergk [Fri, 7 Jun 2013 06:11:39 +0000 (23:11 -0700)]
add tests for rebasing of empty commits
Signed-off-by: Martin von Zweigbergk <redacted>
Signed-off-by: Junio C Hamano <redacted>
Martin von Zweigbergk [Fri, 7 Jun 2013 06:11:38 +0000 (23:11 -0700)]
add tests for rebasing with patch-equivalence present
Signed-off-by: Martin von Zweigbergk <redacted>
Signed-off-by: Junio C Hamano <redacted>
Martin von Zweigbergk [Fri, 7 Jun 2013 06:11:37 +0000 (23:11 -0700)]
add simple tests of consistency across rebase types
Helped-by: Johannes Sixt <redacted>
Signed-off-by: Martin von Zweigbergk <redacted>
Signed-off-by: Junio C Hamano <redacted>
Charles 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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
Junio 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
Stefan Haller [Thu, 6 Jun 2013 08:17:47 +0000 (10:17 +0200)]
git-gui: bring wish process to front on Mac
On Mac OS X, any application that is started from the Terminal will open
behind all running applications; as a work-around, manually bring ourselves
to the front. (Stolen from gitk, commit
76bf6ff93e.)
We do this as the very first thing, so that any message boxes that might pop
up during the rest of the startup sequence are actually seen by the user.
[PT: added catch and moved down to ensure Tk has been loaded]
Signed-off-by: Stefan Haller <redacted>
Signed-off-by: Pat Thoyts <redacted>
Junio 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 <redacted>
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
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.
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
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
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
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
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()
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
Felipe Contreras [Thu, 6 Jun 2013 08:58:57 +0000 (03:58 -0500)]
sequencer: avoid leaking message buffer when refusing to create an empty commit
We should free objects before leaving.
Signed-off-by: Felipe Contreras <redacted>
Signed-off-by: Junio C Hamano <redacted>
Jeff King [Wed, 5 Jun 2013 22:37:39 +0000 (18:37 -0400)]
clear parsed flag when we free tree buffers
Many code paths will free a tree object's buffer and set it
to NULL after finishing with it in order to keep memory
usage down during a traversal. However, out of 8 sites that
do this, only one actually unsets the "parsed" flag back.
Those sites that don't are setting a trap for later users of
the tree object; even after calling parse_tree, the buffer
will remain NULL, causing potential segfaults.
It is not known whether this is triggerable in the current
code. Most commands do not do an in-memory traversal
followed by actually using the objects again. However, it
does not hurt to be safe for future callers.
In most cases, we can abstract this out to a
"free_tree_buffer" helper. However, there are two
exceptions:
1. The fsck code relies on the parsed flag to know that we
were able to parse the object at one point. We can
switch this to using a flag in the "flags" field.
2. The index-pack code sets the buffer to NULL but does
not free it (it is freed by a caller). We should still
unset the parsed flag here, but we cannot use our
helper, as we do not want to free the buffer.
Signed-off-by: Jeff King <redacted>
Signed-off-by: Junio C Hamano <redacted>
Johannes 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 <redacted>
Acked-by: Jeff King <redacted>
Signed-off-by: Junio C Hamano <redacted>
Junio 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 <redacted>
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
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
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
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
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
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
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
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
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
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
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
Michael S. Tsirkin [Wed, 5 Jun 2013 18:11:08 +0000 (21:11 +0300)]
test-send-email: test for pre-sanitized self name
Users can sanitize from address manually.
Verify that these are suppressed properly.
Signed-off-by: Michael S. Tsirkin <redacted>
Signed-off-by: Junio C Hamano <redacted>
Michael S. Tsirkin [Wed, 5 Jun 2013 18:11:04 +0000 (21:11 +0300)]
t/send-email: test suppress-cc=self with non-ascii
test suppress-cc=self when sender is non-acsii
Signed-off-by: Michael S. Tsirkin <redacted>
Signed-off-by: Junio C Hamano <redacted>
Michael S. Tsirkin [Wed, 5 Jun 2013 18:11:02 +0000 (21:11 +0300)]
t/send-email: add test with quoted sender
add test where sender address needs to be quoted.
Make sure --suppress-cc=self works well in this case.
Signed-off-by: Michael S. Tsirkin <redacted>
Signed-off-by: Junio C Hamano <redacted>
Michael S. Tsirkin [Wed, 5 Jun 2013 18:11:00 +0000 (21:11 +0300)]
send-email: make --suppress-cc=self sanitize input
--suppress-cc=self fails to filter sender address in many cases where it
needs to be sanitized in some way, for example quoted:
"A U. Thor" <redacted>
To fix, make send-email sanitize both sender and the address it is
compared against.
Signed-off-by: Michael S. Tsirkin <redacted>
Signed-off-by: Junio C Hamano <redacted>
Michael S. Tsirkin [Wed, 5 Jun 2013 18:10:57 +0000 (21:10 +0300)]
t/send-email: test suppress-cc=self on cccmd
Check that suppress-cc=self works when applied
to output of cccmd.
Signed-off-by: Michael S. Tsirkin <redacted>
Signed-off-by: Junio C Hamano <redacted>
Michael S. Tsirkin [Wed, 5 Jun 2013 18:10:55 +0000 (21:10 +0300)]
send-email: fix suppress-cc=self on cccmd
When cccmd is used, old-style suppress-from filter
is applied by the newer suppress-cc=self isn't.
Fix this up.
Signed-off-by: Michael S. Tsirkin <redacted>
Signed-off-by: Junio C Hamano <redacted>
Benoit Person [Wed, 5 Jun 2013 10:58:00 +0000 (12:58 +0200)]
git-remote-mediawiki: use Git.pm functions for credentials
In
52dce6d, a new credential function was added to Git.pm, based on
git-remote-mediawiki's functions. The logical follow-up is to use
those functions in git-remote-mediawiki.
Signed-off-by: Benoit Person <redacted>
Signed-off-by: Matthieu Moy <redacted>
Signed-off-by: Junio C Hamano <redacted>
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
Junio 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 <redacted>
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 <redacted>
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 <redacted>
Acked-by: Johannes Schindelin <redacted>
Signed-off-by: Pat Thoyts <redacted>
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 <redacted>
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 <redacted>
Acked-by: Sebastian Schuberth <redacted>
Acked-by: Johannes Schindelin <redacted>
Signed-off-by: Pat Thoyts <redacted>
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 <redacted>
Signed-off-by: Pat Thoyts <redacted>
Johannes 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 <redacted>
Sebastian 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 <redacted>
Junio C Hamano [Mon, 3 Jun 2013 20:00:03 +0000 (13:00 -0700)]
Sync with maint
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
Thomas 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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
Felipe Contreras [Wed, 29 May 2013 03:56:21 +0000 (22:56 -0500)]
sequencer: remove useless indentation
By using good ol' goto.
Signed-off-by: Felipe Contreras <redacted>
Signed-off-by: Junio C Hamano <redacted>
Ramkumar 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 <redacted>
Co-authored-by: Junio C Hamano <redacted>
Signed-off-by: Ramkumar Ramachandra <redacted>
Signed-off-by: Junio C Hamano <redacted>
Ramkumar 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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
Ramkumar Ramachandra [Sun, 2 Jun 2013 14:03:41 +0000 (19:33 +0530)]
completion: difftool takes both revs and files
'git difftool' is clearly a frontend to 'git diff' and is used in
exactly the same way, but it uses a misleadingly named completion
function __git_complete_file. It happens to work only because it
calls __git_complete_revlist_file that completes both revs and
paths.
Change it to use __git_complete_revlist_file, just like 'git diff'.
Signed-off-by: Ramkumar Ramachandra <redacted>
Signed-off-by: Junio C Hamano <redacted>
Chris 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 <redacted>
Signed-off-by: Junio C Hamano <redacted>