Junio C Hamano [Fri, 27 Apr 2012 20:59:20 +0000 (13:59 -0700)]
Merge branch 'jc/merge-reduce-parents-early'
Octopus merge strategy did not reduce heads that are recorded in the
final commit correctly.
By Junio C Hamano (4) and Michał Kiedrowicz (1)
* jc/merge-reduce-parents-early:
fmt-merge-msg: discard needless merge parents
builtin/merge.c: reduce parents early
builtin/merge.c: collect other parents early
builtin/merge.c: remove "remoteheads" global variable
merge tests: octopus with redundant parents
Junio C Hamano [Fri, 27 Apr 2012 20:59:04 +0000 (13:59 -0700)]
Merge branch 'js/fast-import-test-9300'
By Johannes Sixt
* js/fast-import-test-9300:
t9300-fast-import: avoid 'exit' in test_expect_success snippets
Junio C Hamano [Fri, 27 Apr 2012 20:58:53 +0000 (13:58 -0700)]
Merge branch 'rt/cherry-revert-conflict-summary'
In the older days, the header "Conflicts:" in "cherry-pick" and
"merge" was separated by a blank line from the list of paths that
follow for readability, but when "merge" was rewritten in C, we lost
it by mistake. Remove the newline from "cherry-pick" to make them
match again.
By Ralf Thielow
* rt/cherry-revert-conflict-summary:
sequencer: remove additional blank line
Junio C Hamano [Fri, 27 Apr 2012 20:58:43 +0000 (13:58 -0700)]
Merge branch 'cb/maint-report-mount-point-correctly-in-setup'
The filesystem boundary was not correctly reported when .git directory
discovery stopped at a mount point.
By Clemens Buchacher
* cb/maint-report-mount-point-correctly-in-setup:
properly keep track of current working directory
Junio C Hamano [Fri, 27 Apr 2012 20:58:02 +0000 (13:58 -0700)]
Merge branch 'cb/cherry-pick-rev-path-confusion'
The command line parser choked "git cherry-pick $name" when $name can be
both revision name and a pathname, even though $name can never be a path
in the context of the command.
The issue the patch addresses is real, but the way it is implemented felt
unnecessarily invasive a bit. It may be cleaner for this caller to add
the "--" to the end of the argv_array it passes to setup_revisions().
By Clemens Buchacher
* cb/cherry-pick-rev-path-confusion:
cherry-pick: do not expect file arguments
Junio C Hamano [Fri, 27 Apr 2012 20:57:49 +0000 (13:57 -0700)]
Merge branch 'cb/http-multi-curl-auth'
Fixes http authentication breakage when we keep multiple HTTP requests in
flight using curl-multi.
By Jeff King (3) and Clemens Buchacher (1)
* cb/http-multi-curl-auth:
http: use newer curl options for setting credentials
http: clean up leak in init_curl_http_auth
fix http auth with multiple curl handles
http auth fails with multiple curl handles
Junio C Hamano [Thu, 26 Apr 2012 18:02:36 +0000 (11:02 -0700)]
Update draft release notes to 1.7.11
A handful of topics have been merged to maintenance releases, and
the first half of 6th batch graduates to 'master'.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Thu, 26 Apr 2012 17:59:08 +0000 (10:59 -0700)]
Merge branch 'rl/maint-stash-i18n-save-error'
The i18n of error message "git stash save" was not properly done.
By Ross Lagerwall
* rl/maint-stash-i18n-save-error:
stash: use eval_gettextln correctly
Junio C Hamano [Thu, 26 Apr 2012 17:57:43 +0000 (10:57 -0700)]
Merge branch 'mb/fetch-call-a-non-branch-a-ref'
The report from "git fetch" said "new branch" even for a non branch
ref.
By Marc Branchaud
* mb/fetch-call-a-non-branch-a-ref:
fetch: describe new refs based on where it came from
fetch: Give remote_ref to update_local_ref() as well
Junio C Hamano [Thu, 26 Apr 2012 17:56:19 +0000 (10:56 -0700)]
Merge branch 'jm/maint-strncpy-diff-no-index'
The "diff --no-index" codepath used limited-length buffers,
risking pathnames getting truncated. Update it to use the
strbuf API.
By Jim Meyering (1) and Junio C Hamano (1)
* jm/maint-strncpy-diff-no-index:
diff --no-index: use strbuf for temporary pathnames
diff: avoid stack-buffer-read-overrun for very long name
Junio C Hamano [Thu, 26 Apr 2012 17:54:58 +0000 (10:54 -0700)]
Merge bundle error message fix in
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Thu, 26 Apr 2012 17:40:08 +0000 (10:40 -0700)]
Start preparing for 1.7.10.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Thu, 26 Apr 2012 17:51:40 +0000 (10:51 -0700)]
Merge branch 'jk/run-command-eacces' into maint
When PATH contains an unreadable directory, alias expansion code did
not kick in, and failed with an error that said "git-subcmd" was not
found.
By Jeff King (1) and Ramsay Jones (1)
* jk/run-command-eacces:
run-command: treat inaccessible directories as ENOENT
compat/mingw.[ch]: Change return type of exec functions to int
Junio C Hamano [Thu, 26 Apr 2012 17:51:18 +0000 (10:51 -0700)]
Merge branch 'jc/push-upstream-sanity' into maint
The 'push to upstream' implementation was broken in some corner
cases. "git push $there" without refspec, when the current branch is
set to push to a remote different from $there, used to push to $there
using the upstream information to a remote unreleated to $there.
* jc/push-upstream-sanity:
push: error out when the "upstream" semantics does not make sense
Junio C Hamano [Thu, 26 Apr 2012 17:35:42 +0000 (10:35 -0700)]
Merge branch 'jc/maint-clean-nested-worktree-in-subdir' into maint
"git clean -d -f" (not "-d -f -f") is supposed to protect nested
working trees of independent git repositories that exist in the
current project working tree from getting removed, but the protection
applied only to such working trees that are at the top-level of the
current project by mistake.
* jc/maint-clean-nested-worktree-in-subdir:
clean: preserve nested git worktree in subdirectories
Junio C Hamano [Thu, 26 Apr 2012 17:35:33 +0000 (10:35 -0700)]
Merge branch 'jk/diff-no-rename-empty' into maint
Rename detection logic used to match two empty files as renames during
merge-recursive, leading unnatural mismerges.
By Jeff King
* jk/diff-no-rename-empty:
merge-recursive: don't detect renames of empty files
teach diffcore-rename to optionally ignore empty content
make is_empty_blob_sha1 available everywhere
drop casts from users EMPTY_TREE_SHA1_BIN
Junio C Hamano [Thu, 26 Apr 2012 17:35:25 +0000 (10:35 -0700)]
Merge branch 'rs/combine-diff-zero-context-at-the-beginning' into maint
An age-old corner case bug in combine diff (only triggered with -U0
and the hunk at the beginning of the file needs to be shown) has been
fixed.
By René Scharfe
* rs/combine-diff-zero-context-at-the-beginning:
combine-diff: fix loop index underflow
Junio C Hamano [Thu, 26 Apr 2012 17:35:15 +0000 (10:35 -0700)]
Merge branch 'jc/commit-unedited-template' into maint
When "git commit --template F" errors out because the user did not
touch the message, it claimed that it aborts due to "empty message",
which was utterly wrong.
By Junio C Hamano (4) and Adam Monsen (1)
* jc/commit-unedited-template:
Documentation/git-commit: rephrase the "initial-ness" of templates
git-commit.txt: clarify -t requires editing message
commit: rephrase the error when user did not touch templated log message
commit: do not trigger bogus "has templated message edited" check
t7501: test the right kind of breakage
Junio C Hamano [Thu, 26 Apr 2012 17:35:07 +0000 (10:35 -0700)]
Merge branch 'jk/add-p-skip-conflicts' into maint
"git add -p" is not designed to deal with unmerged paths but did
not exclude them and tried to apply funny patches only to fail.
By Jeff King
* jk/add-p-skip-conflicts:
add--interactive: ignore unmerged entries in patch mode
Junio C Hamano [Thu, 26 Apr 2012 17:34:53 +0000 (10:34 -0700)]
Merge branch 'jc/commit-hook-authorship' into maint
"git commit --author=$name" did not tell the name that was being
recorded in the resulting commit to hooks, even though it does do so
when the end user overrode the authorship via the "GIT_AUTHOR_NAME"
environment variable.
* jc/commit-hook-authorship:
commit: pass author/committer info to hooks
t7503: does pre-commit-hook learn authorship?
ident.c: add split_ident_line() to parse formatted ident line
Junio C Hamano [Thu, 26 Apr 2012 17:34:43 +0000 (10:34 -0700)]
Merge branch 'tr/maint-word-diff-regex-sticky' into maint
The regexp configured with diff.wordregex was incorrectly reused
across files.
By Thomas Rast (2) and Johannes Sixt (1)
* tr/maint-word-diff-regex-sticky:
diff: tweak a _copy_ of diff_options with word-diff
diff: refactor the word-diff setup from builtin_diff_cmd
t4034: diff.*.wordregex should not be "sticky" in --word-diff
Junio C Hamano [Thu, 26 Apr 2012 17:32:55 +0000 (10:32 -0700)]
Merge branch 'jh/notes-merge-in-git-dir-worktree' into maint
Running "notes merge --commit" failed to perform correctly when run
from any directory inside $GIT_DIR/. When "notes merge" stops with
conflicts, $GIT_DIR/NOTES_MERGE_WORKTREE is the place a user edits
to resolve it.
By Johan Herland (3) and Junio C Hamano (1)
* jh/notes-merge-in-git-dir-worktree:
notes-merge: Don't remove .git/NOTES_MERGE_WORKTREE; it may be the user's cwd
notes-merge: use opendir/readdir instead of using read_directory()
t3310: illustrate failure to "notes merge --commit" inside $GIT_DIR/
remove_dir_recursively(): Add flag for skipping removal of toplevel dir
Junio C Hamano [Thu, 26 Apr 2012 17:31:43 +0000 (10:31 -0700)]
Sync with 1.7.9.7
Junio C Hamano [Thu, 26 Apr 2012 17:23:15 +0000 (10:23 -0700)]
Git 1.7.9.7
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Thu, 26 Apr 2012 17:22:20 +0000 (10:22 -0700)]
Sync with 1.7.8.6
Junio C Hamano [Thu, 26 Apr 2012 16:59:22 +0000 (09:59 -0700)]
Git 1.7.8.6
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Thu, 26 Apr 2012 16:52:33 +0000 (09:52 -0700)]
Sync with 1.7.7.7
Junio C Hamano [Thu, 26 Apr 2012 16:41:52 +0000 (09:41 -0700)]
Git 1.7.7.7
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Wed, 25 Apr 2012 19:37:38 +0000 (12:37 -0700)]
diff --no-index: use strbuf for temporary pathnames
Instead of using limited-length buffers and risking of pathname
truncation, we should be taking advantage of strbuf API nowadays.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jonathan Nieder [Thu, 26 Apr 2012 05:53:59 +0000 (00:53 -0500)]
bundle: remove stray single-quote from error message
After running rev-list --boundary to retrieve the list of boundary
commits, "git bundle create" runs its own revision walk. If in this
stage git encounters an unfamiliar option, it writes a message with an
unbalanced quotation mark:
error: unrecognized argument: --foo'
Drop the stray quote to match the "unrecognized argument: %s" message
used elsewhere and save translators some work.
This is mostly a futureproofing measure: for now, the "rev-list
--boundary" command catches most strange arguments on its own and the
above message is not seen unless you try something esoteric like "git
bundle create test.bundle --header HEAD".
Reported-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Tue, 24 Apr 2012 21:50:06 +0000 (14:50 -0700)]
The fifth batch of topics graduated to 'master'
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Tue, 24 Apr 2012 21:41:22 +0000 (14:41 -0700)]
Merge branch 'fc/completion-tests'
By Felipe Contreras (4) and others
* fc/completion-tests:
completion: fix completion after 'git --option <TAB>'
completion: avoid trailing space for --exec-path
completion: add missing general options
completion: simplify by using $prev
completion: simplify __gitcomp_1
tests: add tests for the __gitcomp() completion helper function
tests: add initial bash completion tests
Junio C Hamano [Tue, 24 Apr 2012 21:41:16 +0000 (14:41 -0700)]
Merge branch 'cc/fix-missing-va-end-in-revert'
By Christian Couder
* cc/fix-missing-va-end-in-revert:
revert: add missing va_end
Junio C Hamano [Tue, 24 Apr 2012 21:41:08 +0000 (14:41 -0700)]
Merge branch 'zj/upstream-error-message'
Error message given when @{u} is used for a branch without its
upstream configured have been clatified.
By Zbigniew Jędrzejewski-Szmek
* zj/upstream-error-message:
i18n: mark @{upstream} error messages for translation
Be more specific if upstream branch is not tracked
Provide better message for barnhc_wiht_tpyo@{u}
Provide branch name in error message when using @{u}
t1507: add tests to document @{upstream} behaviour
Junio C Hamano [Tue, 24 Apr 2012 21:41:01 +0000 (14:41 -0700)]
Merge branch 'mk/gitweb-diff-hl'
"gitweb" learns to highlight the patch it outputs even more.
By Michał Kiedrowicz (7) and Jakub Narębski (1)
* mk/gitweb-diff-hl:
gitweb: Refinement highlightning in combined diffs
gitweb: Highlight interesting parts of diff
gitweb: Push formatting diff lines to print_diff_chunk()
gitweb: Use print_diff_chunk() for both side-by-side and inline diffs
gitweb: Extract print_sidebyside_diff_lines()
gitweb: Pass esc_html_hl_regions() options to esc_html()
gitweb: esc_html_hl_regions(): Don't create empty <span> elements
gitweb: Use descriptive names in esc_html_hl_regions()
Junio C Hamano [Tue, 24 Apr 2012 21:40:51 +0000 (14:40 -0700)]
Merge branch 'it/fetch-pack-many-refs'
When "git fetch" encounters repositories with too many references, the
command line of "fetch-pack" that is run by a helper e.g. remote-curl,
may fail to hold all of them. Now such an internal invocation can feed
the references through the standard input of "fetch-pack".
By Ivan Todoroski
* it/fetch-pack-many-refs:
remote-curl: main test case for the OS command line overflow
fetch-pack: test cases for the new --stdin option
remote-curl: send the refs to fetch-pack on stdin
fetch-pack: new --stdin option to read refs from stdin
Junio C Hamano [Tue, 24 Apr 2012 21:40:45 +0000 (14:40 -0700)]
Merge branch 'pw/fast-import-dataref-parsing'
The parser in "fast-import" did not diagnose ":9" style references
that is not followed by required SP/LF as an error.
By Pete Wyckoff
* pw/fast-import-dataref-parsing:
fast-import: tighten parsing of datarefs
Junio C Hamano [Tue, 24 Apr 2012 21:40:28 +0000 (14:40 -0700)]
Merge branch 'mh/ref-api'
Allows walking only a sub-hierarchy in refs/*.
By Michael Haggerty
* mh/ref-api:
do_for_each_ref(): only iterate over the subtree that was requested
refs: store references hierarchically
sort_ref_dir(): simplify logic
refs.c: rename ref_array -> ref_dir
struct ref_entry: nest the value part in a union
check_refname_component(): return 0 for zero-length components
free_ref_entry(): new function
names_conflict(): simplify implementation
repack_without_ref(): reimplement using do_for_each_ref_in_array()
do_for_each_ref_in_arrays(): new function
do_for_each_ref_in_array(): new function
refs: manage current_ref within do_one_ref()
refs.c: reorder definitions more logically
Junio C Hamano [Tue, 24 Apr 2012 21:40:20 +0000 (14:40 -0700)]
Merge branch 'hv/submodule-recurse-push'
"git push --recurse-submodules" learns to optionally look into the
histories of submodules bound to the superproject and push them out.
By Heiko Voigt
* hv/submodule-recurse-push:
push: teach --recurse-submodules the on-demand option
Refactor submodule push check to use string list instead of integer
Teach revision walking machinery to walk multiple times sequencially
Roman Kagan [Mon, 23 Apr 2012 16:26:56 +0000 (20:26 +0400)]
git-svn: drop redundant blocking of SIGPIPE
Now that SIGPIPE is ignored there's no point blocking it.
Signed-off-by: Roman Kagan <rkagan@mail.ru>
Acked-by: Eric Wong <normalperson@yhbt.net>
Roman Kagan [Mon, 2 Apr 2012 13:52:34 +0000 (17:52 +0400)]
git-svn: ignore SIGPIPE
In HTTP with keep-alive it's not uncommon for the client to notice that
the server decided to stop maintaining the current connection only when
sending a new request. This naturally results in -EPIPE and possibly
SIGPIPE.
The subversion library itself makes no provision for SIGPIPE. Some
combinations of the underlying libraries do (typically SIG_IGN-ing it),
some don't.
Presumably for that reason all subversion commands set SIGPIPE to
SIG_IGN early in their main()-s.
So should we.
This, together with the previous patch, fixes the notorious "git-svn
died of signal 13" problem (see e.g.
http://thread.gmane.org/gmane.comp.version-control.git/134936).
Signed-off-by: Roman Kagan <rkagan@mail.ru>
Acked-by: Eric Wong <normalperson@yhbt.net>
Roman Kagan [Mon, 2 Apr 2012 13:29:32 +0000 (17:29 +0400)]
git-svn: use POSIX::sigprocmask to block signals
In order to maintain consistency of the database mapping svn revision
numbers to git commit ids, rev_map_set() defers signal processing until
it's finished with an append transaction.[*]
The conventional way to achieve this is through sigprocmask(), which is
available in perl in the standard POSIX module.
This is implemented by this patch. One important consequence of it is
that the signal handlers won't be unconditionally set to SIG_DFL anymore
upon the first invocation of rev_map_set() as they used to. As a
result, the signals ignored by git-svn parent will remain ignored;
otherwise the behavior remains the same.
This patch paves the way to ignoring SIGPIPE throughout git-svn which
will be done in the followup patch.
[*] Deferring signals is not enough to ensure the database consistency:
the program may die on SIGKILL or power loss, run out of disk space,
etc. However that's a separate issue that this patch doesn't address.
Signed-off-by: Roman Kagan <rkagan@mail.ru>
Acked-by: Eric Wong <normalperson@yhbt.net>
Junio C Hamano [Mon, 23 Apr 2012 20:30:22 +0000 (13:30 -0700)]
RelNotes: the fourth batch of topics graduated to 'master'
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 23 Apr 2012 20:02:15 +0000 (13:02 -0700)]
Merge branch 'bw/test-fix-grep-gnuism'
Fix two places that were the only place in the test suite that gave "a\+"
to platform grep and expected it to mean one or more "a", which is a
blatant GNUism.
* bw/test-fix-grep-gnuism:
t9400: fix gnuism in grep
Junio C Hamano [Mon, 23 Apr 2012 20:01:49 +0000 (13:01 -0700)]
Merge branch 'rj/submodule-mswin-path'
By Ramsay Jones
* rj/submodule-mswin-path:
git-submodule.sh: Don't use $path variable in eval_gettext string
Junio C Hamano [Mon, 23 Apr 2012 20:01:46 +0000 (13:01 -0700)]
Merge branch 'rj/sh-setup-mswin-pwd'
By Ramsay Jones
* rj/sh-setup-mswin-pwd:
git-sh-setup.sh: Add an pwd() function for MinGW
Junio C Hamano [Mon, 23 Apr 2012 20:01:42 +0000 (13:01 -0700)]
Merge branch 'rj/mingw-isguid'
By Ramsay Jones
* rj/mingw-isguid:
compat/mingw.h: Set S_ISUID to prevent a fast-import test failure
Junio C Hamano [Mon, 23 Apr 2012 20:01:32 +0000 (13:01 -0700)]
Merge branch 'jn/fast-import-doc'
By Jonathan Nieder
* jn/fast-import-doc:
fast-import doc: cat-blob and ls responses need to be consumed quickly
Junio C Hamano [Mon, 23 Apr 2012 20:01:28 +0000 (13:01 -0700)]
Merge branch 'jn/more-i18ncmp'
By Jonathan Nieder
* jn/more-i18ncmp:
test: am of empty patch should not succeed
test: use test_i18ncmp for "Patch format detection failed" message
test: do not rely on US English tracking-info messages
Junio C Hamano [Mon, 23 Apr 2012 19:58:28 +0000 (12:58 -0700)]
Merge branch 'jl/maint-submodule-recurse-fetch'
"git fetch" that recurses into submodules on demand did not check if
it needs to go into submodules when non branches (most notably, tags)
are fetched.
By Jens Lehmann
* jl/maint-submodule-recurse-fetch:
submodules: recursive fetch also checks new tags for submodule commits
Junio C Hamano [Mon, 23 Apr 2012 19:58:22 +0000 (12:58 -0700)]
Merge branch 'jc/maint-blame-minimal'
"git blame" started missing quite a few changes from the origin since we
stopped using the diff minimalization by default in v1.7.2 era.
* jc/maint-blame-minimal:
blame: accept --need-minimal
Junio C Hamano [Mon, 23 Apr 2012 19:57:20 +0000 (12:57 -0700)]
Merge branch 'lp/maint-diff-three-dash-with-graph'
"log -p --graph" used with "--stat" had a few formatting error.
By Lucian Poston
* lp/maint-diff-three-dash-with-graph:
t4202: add test for "log --graph --stat -p" separator lines
log --graph: fix break in graph lines
log --graph --stat: three-dash separator should come after graph lines
Junio C Hamano [Mon, 23 Apr 2012 19:52:54 +0000 (12:52 -0700)]
Merge branch 'rs/commit-list-sort-in-batch'
Setting up a revision traversal with many starting points was inefficient
as these were placed in a date-order priority queue one-by-one.
By René Scharfe (3) and Junio C Hamano (1)
* rs/commit-list-sort-in-batch:
mergesort: rename it to llist_mergesort()
revision: insert unsorted, then sort in prepare_revision_walk()
commit: use mergesort() in commit_list_sort_by_date()
add mergesort() for linked lists
Junio C Hamano [Mon, 23 Apr 2012 19:52:18 +0000 (12:52 -0700)]
Merge branch 'jh/apply-free-patch'
Valgrind reports quite a lot of discarded memory inside apply.
Fix them, audit and document the buffer ownership rules.
By Junio C Hamano (8) and Jared Hance (1)
* jh/apply-free-patch:
apply: document buffer ownership rules across functions
apply: tighten constness of line buffer
apply: drop unused macro
apply: free unused fragments for submodule patch
apply: free patch->result
apply: release memory for fn_table
apply: free patch->{def,old,new}_name fields
apply: rename free_patch() to free_patch_list()
apply: do not leak patches and fragments
Junio C Hamano [Mon, 23 Apr 2012 19:43:10 +0000 (12:43 -0700)]
Merge branch 'sl/test-wc-l-line-count'
By Stefano Lattarini
* sl/test-wc-l-line-count:
tests: modernise style: more uses of test_line_count
Junio C Hamano [Mon, 23 Apr 2012 19:41:15 +0000 (12:41 -0700)]
Merge branch 'jn/debian-customizes-default-editor'
Make it easier for distros to document custom pager and editor they
used when building their binary releases in "git var" documentation.
By Jonathan Nieder
* jn/debian-customizes-default-editor:
var doc: advertise current DEFAULT_PAGER and DEFAULT_EDITOR settings
var doc: default editor and pager are configurable at build time
Junio C Hamano [Mon, 23 Apr 2012 19:40:08 +0000 (12:40 -0700)]
Merge branch 'rl/show-empty-prefix'
"git rev-parse --show-prefix" emitted nothing when run at the
top-level of the working tree, while "git rev-parse --show-cdup" gave
an empty line. Make them consistent.
By Ross Lagerwall
* rl/show-empty-prefix:
rev-parse --show-prefix: add in trailing newline
Junio C Hamano [Mon, 23 Apr 2012 19:40:02 +0000 (12:40 -0700)]
Merge branch 'pw/git-p4'
By Pete Wyckoff
* pw/git-p4:
git p4: use "git p4" directly in tests
git p4: update name in script
git-p4: move to toplevel
Junio C Hamano [Mon, 23 Apr 2012 19:39:17 +0000 (12:39 -0700)]
Merge branch 'ms/remote-usage-string'
Adds some subcommands that were not listed in "git remote --help"
usage strings.
As an independent follow-up, we may want to rethink how the overall
usage string and subcommand usage strings are maintained.
By Michael Schubert
* ms/remote-usage-string:
remote: update builtin usage
Junio C Hamano [Mon, 23 Apr 2012 19:39:04 +0000 (12:39 -0700)]
Merge branch 'jk/rebase-i-submodule-conflict-only'
Giving "--continue" to a conflicted "rebase -i" session skipped a commit
that only results in changes to submodules.
By John Keeping
* jk/rebase-i-submodule-conflict-only:
rebase -i continue: don't skip commits that only change submodules
SZEDER Gábor [Sun, 15 Apr 2012 19:44:20 +0000 (22:44 +0300)]
completion: fix completion after 'git --option <TAB>'
The bash completion doesn't work when certain options to git itself are
specified, e.g. 'git --no-pager <TAB>' errors out with
error: invalid key: alias.--no-pager
The main _git() completion function finds out the git command name by
looping through all the words on the command line and searching for
the first word that is not a known option for the git command.
Unfortunately the list of known git options was not updated in a long
time, and newer options are not skipped but mistaken for a git command.
Such a misrecognized "command" is then passed to __git_aliased_command(),
which in turn passes it to a 'git config' query, hence the error.
Currently the following options are misrecognized for a git command:
-c --no-pager --exec-path --html-path --man-path --info-path
--no-replace-objects --work-tree= --namespace=
To fix this we could just update the list of options to be skipped,
but the same issue will likely arise, if the git command learns a new
option in the future. Therefore, to make it more future proof against
new options, this patch changes that loop to skip all option-looking
words, i.e. words starting with a dash.
We also have to handle the '-c' option specially, because it takes a
configutation parameter in a separate word, which must be skipped,
too.
[fc: added tests]
Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jonathan Nieder [Sun, 15 Apr 2012 19:44:19 +0000 (22:44 +0300)]
completion: avoid trailing space for --exec-path
"--exec-path" looks to the completion script like an unambiguous
successful completion, but it is wrong to emit a SP after it as if
declaring that we are done with completion; the user could be trying
to do
git --exec-path; # print name of helper directory
or
git --exec-path=/path/to/alternative/helper/dir <subcommand>
so the most helpful thing to do is to leave out the trailing space and
leave it to the operator to type an equal sign or carriage return
according to the situation.
[fc: added tests]
Cc: Andreas Schwab <schwab@linux-m68k.org>
Reported-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Felipe Contreras [Sun, 15 Apr 2012 19:44:18 +0000 (22:44 +0300)]
completion: add missing general options
And add relevant tests.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Felipe Contreras [Sun, 15 Apr 2012 19:44:17 +0000 (22:44 +0300)]
completion: simplify by using $prev
cword-1 is the previous word ($prev).
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Felipe Contreras [Sun, 15 Apr 2012 19:44:16 +0000 (22:44 +0300)]
completion: simplify __gitcomp_1
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
SZEDER Gábor [Tue, 17 Apr 2012 10:27:15 +0000 (12:27 +0200)]
tests: add tests for the __gitcomp() completion helper function
These tests check that trailing space, prefix, and suffix are added
correctly.
Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Christian Couder [Sat, 21 Apr 2012 21:15:19 +0000 (23:15 +0200)]
revert: add missing va_end
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Fri, 20 Apr 2012 22:58:40 +0000 (15:58 -0700)]
RelNotes: the third batch
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Fri, 20 Apr 2012 22:51:18 +0000 (15:51 -0700)]
Merge branch 'js/spawn-via-shell-path-fix'
Mops up an unfortunate fallout from bw/spawn-via-shell-path topic.
By Johannes Sixt
* js/spawn-via-shell-path-fix:
Do not use SHELL_PATH from build system in prepare_shell_cmd on Windows
Junio C Hamano [Fri, 20 Apr 2012 22:50:37 +0000 (15:50 -0700)]
Merge branch 'ct/advise-push-default'
Break down the cases in which "git push" fails due to non-ff into
three categories, and give separate advise messages for each case.
By Christopher Tiwald (2) and Jeff King (1)
* ct/advise-push-default:
Fix httpd tests that broke when non-ff push advice changed
clean up struct ref's nonfastforward field
push: Provide situational hints for non-fast-forward errors
Junio C Hamano [Fri, 20 Apr 2012 22:50:13 +0000 (15:50 -0700)]
Merge branch 'bw/submodule-sed-solaris'
By Ben Walton
* bw/submodule-sed-solaris:
Avoid bug in Solaris xpg4/sed as used in submodule
Junio C Hamano [Fri, 20 Apr 2012 22:50:03 +0000 (15:50 -0700)]
Merge branch 'jk/run-command-eacces'
When PATH contains an unreadable directory, alias expansion code did not
kick in, and failed with an error that said "git-subcmd" was not found.
By Jeff King (1) and Ramsay Jones (1)
* jk/run-command-eacces:
run-command: treat inaccessible directories as ENOENT
compat/mingw.[ch]: Change return type of exec functions to int
Junio C Hamano [Fri, 20 Apr 2012 22:49:51 +0000 (15:49 -0700)]
Merge branch 'jc/push-upstream-sanity'
Fix broken 'push to upstream' implementation. "git push $there" without
refspec, when the current branch is set to push to a remote different from
$there, used to push to $there using the upstream information to a remote
unreleated to $there.
* jc/push-upstream-sanity:
push: error out when the "upstream" semantics does not make sense
Junio C Hamano [Fri, 20 Apr 2012 22:49:37 +0000 (15:49 -0700)]
Merge branch 'jc/am-report-3way'
When "git am -3" needs to fall back to an application to a synthesized
preimage followed by a 3-way merge, the paths that needed such treatment
are now reported to the end user, so that the result in them can be
eyeballed with extra care.
* jc/am-report-3way:
am -3: list the paths that needed 3-way fallback
Junio C Hamano [Fri, 20 Apr 2012 22:49:15 +0000 (15:49 -0700)]
Merge branch 'jb/am-include'
"git am" learned the "--include" option, which is an opposite of existing
the "--exclude" option.
By Johannes Berg
* jb/am-include:
am: support --include option
Junio C Hamano [Fri, 20 Apr 2012 22:48:33 +0000 (15:48 -0700)]
Merge branch 'jc/fmt-merge-msg-people'
The "fmt-merge-msg" command learns to list the primary contributors
involved in the side topic you are merging.
* jc/fmt-merge-msg-people:
fmt-merge-msg: show those involved in a merged series
Johannes Sixt [Fri, 20 Apr 2012 06:25:09 +0000 (08:25 +0200)]
t9300-fast-import: avoid 'exit' in test_expect_success snippets
Exiting from a for-loop early using '|| break' does not propagate the
failure code, and for this reason, the tests used just 'exit'. But this
ends the test script with 'FATAL: Unexpected exit code 1' in the case of
a failed test.
Fix this by moving the loop into a shell function, from which we can
simply return early.
While at it, modernize the style of the affected test cases.
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Ralf Thielow [Wed, 18 Apr 2012 21:07:25 +0000 (23:07 +0200)]
sequencer: remove additional blank line
Remove an additional blank line between the
headline and the list of conflicted files after
doing a recursive merge.
Signed-off-by: Ralf Thielow <ralf.thielow@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Thu, 19 Apr 2012 20:05:26 +0000 (13:05 -0700)]
t9400: fix gnuism in grep
Using "\+" in "grep" and expecting that it means one or more
is a GNUism. Spell it in a dumb and portable way.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Thu, 19 Apr 2012 02:49:08 +0000 (19:49 -0700)]
fmt-merge-msg: discard needless merge parents
This is used by "git pull" to construct a merge message from list of
remote refs. When pulling redundant set of refs, however, it did not
filter them even though the merge itself discards them as unnecessary.
Teach the command to do the same for consistency.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Ramsay Jones [Tue, 17 Apr 2012 18:48:39 +0000 (19:48 +0100)]
git-sh-setup.sh: Add an pwd() function for MinGW
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Acked-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Ramsay Jones [Tue, 17 Apr 2012 18:00:58 +0000 (19:00 +0100)]
git-submodule.sh: Don't use $path variable in eval_gettext string
The eval_gettext (and eval_gettextln) i18n shell functions call
git-sh-i18n--envsubst to process the variable references in the
string parameter. Unfortunately, environment variables are case
insensitive on windows, which leads to failure on cygwin when
eval_gettext exports $path.
Commit
df599e9 (Windows: teach getenv to do a case-sensitive search,
06-06-2011) attempts to solve this problem on MinGW by overriding
the system getenv() function to allow git-sh-i18n--envsubst to read
$path rather than $PATH from the environment. However, this commit
does not address cygwin at all and, furthermore, does not fix all
problems on MinGW.
In particular, when executing test #38 in t7400-submodule-basic.sh,
an 'git-sh-i18n-envsubst.exe - Unable To Locate Component' dialog
pops up saying that the application "failed to start because
libiconv2.dll was not found." After studying the voluminous trace
output from the process monitor, it is clear that the system is
attempting to use $path, rather than $PATH, to search for the DLL
file. (Note that, after dismissing the dialog, the test passes
anyway!)
As an alternative, we finesse the problem by renaming the $path
variable to $sm_path (submodule path). This fixes the problem on
MinGW along with all test failures on cygwin (t7400.{7,32,34},
t7406.3 and t7407.{2,6}). We note that the foreach subcommand
provides $path to user scripts (ie it is part of the API), so we
can't simply rename it to $sm_path.
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Acked-by: Jens Lehmann <Jens.Lehmann@web.de>
Tested-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Ramsay Jones [Tue, 17 Apr 2012 18:00:04 +0000 (19:00 +0100)]
compat/mingw.h: Set S_ISUID to prevent a fast-import test failure
The current t9300-fast-import.sh test number 62 ("L: nested tree
copy does not corrupt deltas") was introduced in commit
9a0edb79
("fast-import: add a test for tree delta base corruption",
15-08-2011). A fix for the demonstrated problem was introduced
by commit
8fb3ad76 ("fast-import: prevent producing bad delta",
15-08-2011). However, this fix didn't work on MinGW and so this
test has always failed on MinGW.
Part of the solution in commit
8fb3ad76 was to add an NO_DELTA
preprocessor constant which was defined as follows:
+/*
+ * We abuse the setuid bit on directories to mean "do not delta".
+ */
+#define NO_DELTA S_ISUID
+
Unfortunately, the S_ISUID constant on MinGW is defined as zero.
In order to fix the problem, we simply alter the definition of
S_ISUID in the mingw header file to a more appropriate value.
Also, we take the opportunity to similarly define S_ISGID and
S_ISVTX.
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Tue, 17 Apr 2012 19:22:26 +0000 (12:22 -0700)]
builtin/merge.c: reduce parents early
Instead of waiting until we record the parents of resulting merge, reduce
redundant parents (including our HEAD) immediately after reading them.
The change to t7602 illustrates the essence of the effect of this change.
The octopus merge strategy used to be fed with redundant commits only to
discard them as "up-to-date", but we no longer feed such redundant commits
to it and the affected test degenerates to a regular two-head merge.
And obviously the known-to-be-broken test in t6028 is now fixed.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Tue, 17 Apr 2012 18:31:10 +0000 (11:31 -0700)]
builtin/merge.c: collect other parents early
Move the code around to populate remoteheads list early in the process
before any decision regarding twohead vs octopus and fast-forwardness is
made.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 16 Apr 2012 23:15:13 +0000 (16:15 -0700)]
builtin/merge.c: remove "remoteheads" global variable
Instead pass it around starting from the toplevel cmd_merge()
as an explicit parameter.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Michał Kiedrowicz [Mon, 13 Feb 2012 11:48:56 +0000 (12:48 +0100)]
merge tests: octopus with redundant parents
This happens when git merge is run to merge multiple commits that are
descendants of current HEAD (or are HEAD). We've hit this while updating
master to origin/master but accidentaly we called (while being on master):
$ git merge master origin/master
Here is a minimal testcase:
$ git init a && cd a
$ echo a >a && git add a
$ git commit -minitial
$ echo b >a && git add a
$ git commit -msecond
$ git checkout master^
$ git merge master master
Fast-forwarding to: master
Already up-to-date with master
Merge made by the 'octopus' strategy.
a | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
$ git cat-file commit HEAD
tree
eebfed94e75e7760540d1485c740902590a00332
parent
bd679e85202280b263e20a57639a142fa14c2c64
author Michał Kiedrowicz <michal.kiedrowicz@gmail.com>
1329132996 +0100
committer Michał Kiedrowicz <michal.kiedrowicz@gmail.com>
1329132996 +0100
Merge branches 'master' and 'master' into HEAD
Signed-off-by: Michał Kiedrowicz <michal.kiedrowicz@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Tue, 17 Apr 2012 18:07:01 +0000 (11:07 -0700)]
mergesort: rename it to llist_mergesort()
Even though the function is generic enough, <anything>sort() inherits
connotations from the standard function qsort() that sorts an array.
Rename it to llist_mergesort() and describe the external interface in
its header file.
This incidentally avoids name clashes with mergesort() some platforms
declare in, and contaminate user namespace with, their <stdlib.h>.
Reported-by: Brian Gernhardt
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Johannes Sixt [Tue, 17 Apr 2012 07:03:21 +0000 (09:03 +0200)]
Do not use SHELL_PATH from build system in prepare_shell_cmd on Windows
The recent change to use SHELL_PATH instead of "sh" to spawn shell commands
is not suited for Windows:
- The default setting, "/bin/sh", does not work when git has to run the
shell because it is a POSIX style path, but not a proper Windows style
path.
- If it worked, it would hard-code a position in the files system where
the shell is expected, making git (more precisely, the POSIX toolset that
is needed alongside git) non-relocatable. But we cannot sacrifice
relocatability on Windows.
- Apart from that, even though the Makefile leaves SHELL_PATH set to
"/bin/sh" for the Windows builds, the build system passes a mangled path
to the compiler, and something like "D:/Src/msysgit/bin/sh" is used,
which is doubly bad because it points to where /bin/sh resolves to on
the system where git was built.
- Finally, the system's CreateProcess() function that is used under
mingw.c's hood does not work with forward slashes and cannot find the
shell.
Undo the earlier change on Windows.
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Marc Branchaud [Mon, 16 Apr 2012 22:08:50 +0000 (18:08 -0400)]
fetch: describe new refs based on where it came from
update_local_ref() used to say "[new branch]" when we stored a new ref
outside refs/tags/ hierarchy, but the message is more about what we
fetched, so use the refname at the origin to make that decision.
Also, only call a new ref a "branch" if it's under refs/heads/.
Signed-off-by: Marc Branchaud <marcnarc@xiplink.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Marc Branchaud [Mon, 16 Apr 2012 22:08:49 +0000 (18:08 -0400)]
fetch: Give remote_ref to update_local_ref() as well
This way, the function can look at the remote side to adjust the
informational message it gives.
Signed-off-by: Marc Branchaud <marcnarc@xiplink.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 16 Apr 2012 19:55:11 +0000 (12:55 -0700)]
RelNotes: the second batch of topics graduated to 'master'
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 16 Apr 2012 19:43:36 +0000 (12:43 -0700)]
Merge branch 'jk/add-p-skip-conflicts'
Excludes conflicted paths from "add -p" processing, as it is not prepared
to handle them.
By Jeff King
* jk/add-p-skip-conflicts:
add--interactive: ignore unmerged entries in patch mode
Junio C Hamano [Mon, 16 Apr 2012 19:43:07 +0000 (12:43 -0700)]
Merge branch 'jc/commit-unedited-template'
When "git commit --template F" errors out because the user did not touch
the message, it claimed that it aborts due to "empty message", which was
utterly wrong.
By Junio C Hamano (4) and Adam Monsen (1)
* jc/commit-unedited-template:
Documentation/git-commit: rephrase the "initial-ness" of templates
git-commit.txt: clarify -t requires editing message
commit: rephrase the error when user did not touch templated log message
commit: do not trigger bogus "has templated message edited" check
t7501: test the right kind of breakage
Junio C Hamano [Mon, 16 Apr 2012 19:42:54 +0000 (12:42 -0700)]
Merge branch 'bw/spawn-via-shell-path'
"sh" on the user's PATH may be utterly broken on some systems;
consistently use SHELL_PATH even from inside run-command API.
By Ben Walton
* bw/spawn-via-shell-path:
Use SHELL_PATH from build system in run_command.c:prepare_shell_cmd
Junio C Hamano [Mon, 16 Apr 2012 19:42:48 +0000 (12:42 -0700)]
Merge branch 'wk/gitweb-snapshot-use-if-modified-since'
Makes 'snapshot' request to "gitweb" honor If-Modified-Since: header,
based on the commit date.
By W. Trevor King
* wk/gitweb-snapshot-use-if-modified-since:
gitweb: add If-Modified-Since handling to git_snapshot().
gitweb: refactor If-Modified-Since handling
gitweb: add `status` headers to git_feed() responses.
Junio C Hamano [Mon, 16 Apr 2012 19:42:40 +0000 (12:42 -0700)]
Merge branch 'jk/http-backend-keep-committer-ident-env'
The smart-http backend used to always override GIT_COMMITTER_* variables
with REMOTE_USER and REMOTE_ADDR.
By Jeff King
* jk/http-backend-keep-committer-ident-env:
http-backend: respect existing GIT_COMMITTER_* variables
Junio C Hamano [Mon, 16 Apr 2012 19:42:29 +0000 (12:42 -0700)]
Merge branch 'sl/autoconf'
Updates our configure.ac to follow a better "autoconf" style.
By Stefano Lattarini
* sl/autoconf:
configure: be more idiomatic
configure: avoid some code repetitions thanks to m4_{push,pop}def
configure: move definitions of private m4 macros before AC_INIT invocation
Junio C Hamano [Mon, 16 Apr 2012 19:42:22 +0000 (12:42 -0700)]
Merge branch 'jk/branch-quiet'
Even with "-q"uiet option, "checkout" used to report setting up tracking.
Also "branch" learns "-q"uiet option to squelch informational message.
By Jeff King
* jk/branch-quiet:
teach "git branch" a --quiet option
checkout: suppress tracking message with "-q"
Junio C Hamano [Mon, 16 Apr 2012 19:41:59 +0000 (12:41 -0700)]
Merge branch 'rs/combine-diff-zero-context-at-the-beginning'
Fixes an age old corner case bug in combine diff (only triggered with -U0
and the hunk at the beginning of the file needs to be shown).
By René Scharfe
* rs/combine-diff-zero-context-at-the-beginning:
combine-diff: fix loop index underflow