gitweb.git
Merge branch 'sl/test-wc-l-line-count'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

Merge branch 'jn/debian-customizes-default-editor'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

Merge branch 'rl/show-empty-prefix'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

Merge branch 'pw/git-p4'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

Merge branch 'ms/remote-usage-string'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

Merge branch 'jk/rebase-i-submodule-conflict-only'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

RelNotes: the third batchJunio 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>

Merge branch 'js/spawn-via-shell-path-fix'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

Merge branch 'ct/advise-push-default'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

Merge branch 'bw/submodule-sed-solaris'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

Merge branch 'jk/run-command-eacces'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

Merge branch 'jc/push-upstream-sanity'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

Merge branch 'jc/am-report-3way'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

Merge branch 'jb/am-include'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

Merge branch 'jc/fmt-merge-msg-people'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

Do not use SHELL_PATH from build system in prepare_shel... 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>

RelNotes: the second batch of topics graduated to ... 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>

Merge branch 'jk/add-p-skip-conflicts'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

Merge branch 'jc/commit-unedited-template'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

Merge branch 'bw/spawn-via-shell-path'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

Merge branch 'wk/gitweb-snapshot-use-if-modified-since'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.

Merge branch 'jk/http-backend-keep-committer-ident... 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

Merge branch 'sl/autoconf'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

Merge branch 'jk/branch-quiet'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"

Merge branch 'rs/combine-diff-zero-context-at-the-begin... 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

Merge branch 'jk/diff-no-rename-empty'Junio C Hamano Mon, 16 Apr 2012 19:41:49 +0000 (12:41 -0700)

Merge branch 'jk/diff-no-rename-empty'

Forbids rename detection logic from matching two empty files as renames
during merge-recursive to prevent 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

Merge branch 'jc/maint-clean-nested-worktree-in-subdir'Junio C Hamano Mon, 16 Apr 2012 19:40:22 +0000 (12:40 -0700)

Merge branch 'jc/maint-clean-nested-worktree-in-subdir'

"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

Merge branch 'rs/unpack-trees-leakfix'Junio C Hamano Mon, 16 Apr 2012 19:39:58 +0000 (12:39 -0700)

Merge branch 'rs/unpack-trees-leakfix'

By René Scharfe
* rs/unpack-trees-leakfix:
unpack-trees: plug minor memory leak
unpack-trees: don't perform any index operation if we're not merging

Merge branch 'nl/rebase-i-cheat-sheet'Junio C Hamano Mon, 16 Apr 2012 19:39:41 +0000 (12:39 -0700)

Merge branch 'nl/rebase-i-cheat-sheet'

* nl/rebase-i-cheat-sheet:
rebase -i: remind that the lines are top-to-bottom

RelNotes: the first batch of topics graduated to 'master'Junio C Hamano Mon, 16 Apr 2012 05:59:31 +0000 (22:59 -0700)

RelNotes: the first batch of topics graduated to 'master'

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

Merge branch 'da/difftool-test'Junio C Hamano Mon, 16 Apr 2012 05:52:04 +0000 (22:52 -0700)

Merge branch 'da/difftool-test'

Makes sure "difftool" options can be given in any order.

By David Aguilar
* da/difftool-test:
t7800: Test difftool passing arguments to diff

Merge branch 'zj/test-cred-helper-nicer-prove'Junio C Hamano Mon, 16 Apr 2012 05:51:56 +0000 (22:51 -0700)

Merge branch 'zj/test-cred-helper-nicer-prove'

Minor improvement to t0303.

By Zbigniew Jędrzejewski-Szmek
* zj/test-cred-helper-nicer-prove:
t0303: resurrect commit message as test documentation
t0303: immediately bail out w/o GIT_TEST_CREDENTIAL_HELPER

Merge branch 'jh/notes-merge-in-git-dir-worktree'Junio C Hamano Mon, 16 Apr 2012 05:51:44 +0000 (22:51 -0700)

Merge branch 'jh/notes-merge-in-git-dir-worktree'

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

Merge branch 'tr/maint-word-diff-regex-sticky'Junio C Hamano Mon, 16 Apr 2012 05:51:34 +0000 (22:51 -0700)

Merge branch 'tr/maint-word-diff-regex-sticky'

The regexp configured with 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

Merge branch 'jn/diffstat-tests'Junio C Hamano Mon, 16 Apr 2012 05:51:24 +0000 (22:51 -0700)

Merge branch 'jn/diffstat-tests'

Some tests checked the "diff --stat" output when they do not have to,
which unnecessarily made things harder to verify under GETTEXT_POISON.

By Jonathan Nieder
* jn/diffstat-tests:
diffstat summary line varies by locale: miscellany
test: use numstat instead of diffstat in binary-diff test
test: use --numstat instead of --stat in "git stash show" tests
test: test cherry-pick functionality and output separately
test: modernize funny-names test style
test: use numstat instead of diffstat in funny-names test
test: use test_i18ncmp when checking --stat output

Merge branch 'jc/diff-algo-cleanup'Junio C Hamano Mon, 16 Apr 2012 05:51:14 +0000 (22:51 -0700)

Merge branch 'jc/diff-algo-cleanup'

Resurrects the preparatory clean-up patches from another topic that was
discarded, as this would give a saner foundation to build on diff.algo
configuration option series.

* jc/diff-algo-cleanup:
xdiff: PATIENCE/HISTOGRAM are not independent option bits
xdiff: remove XDL_PATCH_* macros

Merge branch 'jc/commit-hook-authorship'Junio C Hamano Mon, 16 Apr 2012 05:51:01 +0000 (22:51 -0700)

Merge branch 'jc/commit-hook-authorship'

"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

Merge branch 'nd/stream-more'Junio C Hamano Mon, 16 Apr 2012 05:50:38 +0000 (22:50 -0700)

Merge branch 'nd/stream-more'

Use API to read blob data in smaller chunks in more places to reduce the
memory footprint.

By Nguyễn Thái Ngọc Duy (6) and Junio C Hamano (1)
* nd/stream-more:
update-server-info: respect core.bigfilethreshold
fsck: use streaming API for writing lost-found blobs
show: use streaming API for showing blobs
parse_object: avoid putting whole blob in core
cat-file: use streaming API to print blobs
Add more large blob test cases
streaming: make streaming-write-entry to be more reusable

merge overwrites unstaged changes in renamed fileClemens Buchacher Sat, 14 Apr 2012 23:15:17 +0000 (01:15 +0200)

merge overwrites unstaged changes in renamed file

Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Fix httpd tests that broke when non-ff push advice... Christopher Tiwald Thu, 12 Apr 2012 17:56:28 +0000 (13:56 -0400)

Fix httpd tests that broke when non-ff push advice changed

Signed-off-by: Christopher Tiwald <christiwald@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Kick off post 1.7.10 cycleJunio C Hamano Wed, 11 Apr 2012 19:17:17 +0000 (12:17 -0700)

Kick off post 1.7.10 cycle

I tentatively named the release notes "1.7.11" but this may have to
be renamed to "1.8" or some other name later. Let's see how well
we would do during this cycle.

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

gitweb: Fix unintended "--no-merges" for regular Atom... Sebastian Pipping Wed, 4 Apr 2012 12:25:44 +0000 (14:25 +0200)

gitweb: Fix unintended "--no-merges" for regular Atom feed

The print_feed_meta() subroutine generates links for feeds with and
without merges, in RSS and Atom formats. However because %href_params
was not properly reset, it generated links with "--no-merges" for all
except the very first link.

Before:
<link rel="alternate" title="[..] - Atom feed" href="/?p=.git;a=atom;opt=--no-merges" type="application/atom+xml" />
<link rel="alternate" title="[..] - Atom feed (no merges)" href="/?p=.git;a=atom;opt=--no-merges" type="application/atom+xml" />

After:
<link rel="alternate" title="[..] - Atom feed" href="/?p=.git;a=atom" type="application/atom+xml" />
<link rel="alternate" title="[..] - Atom feed (no merges)" href="/?p=.git;a=atom;opt=--no-merges" type="application/atom+xml" />

Signed-off-by: Sebastian Pipping <sebastian@pipping.org>
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

tests: modernise style: more uses of test_line_countStefano Lattarini Wed, 11 Apr 2012 11:24:01 +0000 (13:24 +0200)

tests: modernise style: more uses of test_line_count

Prefer:

test_line_count <OP> COUNT FILE

over:

test $(wc -l <FILE) <OP> COUNT

(or similar usages) in several tests.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

unpack-trees: plug minor memory leakRené Scharfe Tue, 6 Mar 2012 19:37:23 +0000 (20:37 +0100)

unpack-trees: plug minor memory leak

The allocations made by unpack_nondirectories() using create_ce_entry()
are never freed.

In the non-merge case, we duplicate them using add_entry() and later
only look at the first allocated element (src[0]), perhaps even only
by mistake. Split out the actual addition from add_entry() into the
new helper do_add_entry() and call this non-duplicating function
instead of add_entry() to avoid the leak.

Valgrind reports this for the command "git archive v1.7.9" without
the patch:

==13372== LEAK SUMMARY:
==13372== definitely lost: 230,986 bytes in 2,325 blocks
==13372== indirectly lost: 0 bytes in 0 blocks
==13372== possibly lost: 98 bytes in 1 blocks
==13372== still reachable: 2,259,198 bytes in 3,243 blocks
==13372== suppressed: 0 bytes in 0 blocks

And with the patch applied:

==13375== LEAK SUMMARY:
==13375== definitely lost: 65 bytes in 1 blocks
==13375== indirectly lost: 0 bytes in 0 blocks
==13375== possibly lost: 0 bytes in 0 blocks
==13375== still reachable: 2,364,417 bytes in 3,245 blocks
==13375== suppressed: 0 bytes in 0 blocks

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

unpack-trees: don't perform any index operation if... René Scharfe Tue, 10 Apr 2012 18:55:58 +0000 (20:55 +0200)

unpack-trees: don't perform any index operation if we're not merging

src[0] points to the index entry in the merge case and to the first
tree to unpack in the non-merge case. We only want to mark the index
entry, so check first if we're merging.

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

var doc: advertise current DEFAULT_PAGER and DEFAULT_ED... Jonathan Nieder Sat, 31 Mar 2012 08:44:53 +0000 (03:44 -0500)

var doc: advertise current DEFAULT_PAGER and DEFAULT_EDITOR settings

Document the default pager and editor chosen at compile time in the
git-var(1) manpage so users curious about what command _this_ copy of
git will fall back to when EDITOR, VISUAL, and PAGER are unset can
find the answer quickly.

In builds leaving those settings uncustomized, this patch makes the
manpage continue to say "usually vi" and "usually less" so the
formatted documentation is usable for a wide audience including users
of custom builds that change those settings. If you would like your
copy of the docs to be less noncommittal, you will need to set
DEFAULT_PAGER=less and DEFAULT_EDITOR=vi explicitly.

Suggested-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint'Junio C Hamano Tue, 10 Apr 2012 19:45:35 +0000 (12:45 -0700)

Merge branch 'maint'

* maint:
test-subprocess: fix segfault without arguments
submodule: fix prototype of gitmodules_config

Merge branch 'maint-1.7.9' into maintJunio C Hamano Tue, 10 Apr 2012 19:44:58 +0000 (12:44 -0700)

Merge branch 'maint-1.7.9' into maint

* maint-1.7.9:

Merge branch 'maint-1.7.8' into maint-1.7.9Junio C Hamano Tue, 10 Apr 2012 19:44:45 +0000 (12:44 -0700)

Merge branch 'maint-1.7.8' into maint-1.7.9

* maint-1.7.8:
Documentation/gitweb: trivial English fixes
fetch/receive: remove over-pessimistic connectivity check

test-subprocess: fix segfault without argumentsRené Scharfe Tue, 10 Apr 2012 19:07:34 +0000 (21:07 +0200)

test-subprocess: fix segfault without arguments

Check if we even have a parameter before checking its value. Running
this command without any arguments may not make a lot of sense, but
reacting with a segmentation fault is unduly harsh.

While we're at it, avoid casting argv by declaring it const right away.

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

submodule: fix prototype of gitmodules_configRené Scharfe Tue, 10 Apr 2012 19:10:26 +0000 (21:10 +0200)

submodule: fix prototype of gitmodules_config

Add void to make it match its definition in submodule.c.

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

rev-parse --show-prefix: add in trailing newlineRoss Lagerwall Mon, 9 Apr 2012 13:27:56 +0000 (15:27 +0200)

rev-parse --show-prefix: add in trailing newline

Print out a trailing newline when --show-prefix is run with cwd
at the top level of the tree which results in an empty prefix.
Behavior is now like --show-cdup.

Fixes an expected failure in t1501.

Signed-off-by: Ross Lagerwall <rosslagerwall@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Fix git-subtree install instructionsDavid A. Greene Tue, 10 Apr 2012 03:19:01 +0000 (22:19 -0500)

Fix git-subtree install instructions

Update the install instructions to reflect the changes for an
integrated git-subtree.

Signed-off-by: David A. Greene <greened@obbligato.org>

Use git-subtree test MakefileDavid A. Greene Tue, 10 Apr 2012 03:07:02 +0000 (22:07 -0500)

Use git-subtree test Makefile

Use the Makefile in contrib/subtree/t to run git-subtree tests.

Signed-off-by: David A. Greene <greened@obbligato.org>

Add subtree test MakefileDavid A. Greene Sun, 5 Feb 2012 22:29:06 +0000 (16:29 -0600)

Add subtree test Makefile

Add a Makefile to run subtree tests. This is largely copied
from the standard test suite with irrelevant targets removed
and some paths altered to account for where subtree tests live.

Signed-off-by: David A. Greene <greened@obbligato.org>

Install git-subtree from contribDavid A. Greene Tue, 10 Apr 2012 02:13:03 +0000 (21:13 -0500)

Install git-subtree from contrib

Build git-subtree in its contrib directory and install from there.
The main Makefile no longer discovers subcommands build in the main
build area so we cannot count on it to install git-subtree. The user
should make && make install in contrib/subtree to install git-subtree.

Change the rule to install the git-subtree manpage. The main
Documentation area doesn't directly support installing documentation
from other directories so the user will have to do that from within
contrib/subtree for now.

Signed-off-by: David A. Greene <greened@obbligato.org>

Use configure settings for git-subtreeDavid A. Greene Tue, 10 Apr 2012 02:39:08 +0000 (21:39 -0500)

Use configure settings for git-subtree

Include config.make.autogen in the git-subtree contrib area to pick up
settings for prefix and other such things.

Signed-off-by: David A. Greene <greened@obbligato.org>

Use project config filesDavid A. Greene Sun, 29 Jan 2012 22:17:43 +0000 (16:17 -0600)

Use project config files

Use project-wide files to process documentation for git-subtree.

Signed-off-by: David A. Greene <greened@obbligato.org>

Remove unnecessary git-subtree filesDavid A. Greene Tue, 10 Apr 2012 03:11:25 +0000 (22:11 -0500)

Remove unnecessary git-subtree files

Remove various files that simply duplicate functionality already
provided by the main project files.

Signed-off-by: David A. Greene <greened@obbligato.org>

Set TEST_DIRECTORYDavid A. Greene Tue, 20 Mar 2012 23:11:49 +0000 (18:11 -0500)

Set TEST_DIRECTORY

Set TEST_DIRECTORY to the main git test area. This allows the
git-subtree out-of-tree tests to run correctly.

Signed-off-by: David A. Greene <greened@obbligato.org>

Add 'contrib/subtree/' from commit 'd3a04e06c77d57978bb... David A. Greene Tue, 10 Apr 2012 01:22:55 +0000 (20:22 -0500)

Add 'contrib/subtree/' from commit 'd3a04e06c77d57978bb5230361c64946232cc346'

git-subtree-dir: contrib/subtree
git-subtree-mainline: e8dde3e5f9ddb7cf95a6ff3cea6cf07c3a2db80d
git-subtree-split: d3a04e06c77d57978bb5230361c64946232cc346

rebase -i continue: don't skip commits that only change... John Keeping Sat, 7 Apr 2012 10:20:53 +0000 (11:20 +0100)

rebase -i continue: don't skip commits that only change submodules

When git-rebase--interactive stops due to a conflict and the only change
to be committed is in a submodule, the test for whether there is
anything to be committed ignores the staged submodule change. This
leads rebase to skip creating the commit for the change.

While unstaged submodule changes should be ignored to avoid needing to
update submodules during a rebase, it is safe to remove the
--ignore-submodules option to diff-index because --cached ensures that
it is only checking the index. This was discussed in [1] and a test is
included to ensure that unstaged changes are still ignored correctly.

[1] http://thread.gmane.org/gmane.comp.version-control.git/188713

Signed-off-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote: update builtin usageMichael Schubert Sat, 7 Apr 2012 14:25:52 +0000 (16:25 +0200)

remote: update builtin usage

Add missing options "--tags|--no-tags" and "--push".

Signed-off-by: Michael Schubert <mschub@elegosoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git p4: use "git p4" directly in testsPete Wyckoff Mon, 9 Apr 2012 00:18:02 +0000 (20:18 -0400)

git p4: use "git p4" directly in tests

Drop the $GITP4 variable that was used to specify the script in
contrib/fast-import/. The command is called "git p4" now, not
"git-p4".

Note that configuration variables will remain in a section called
"git-p4".

Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git p4: update name in scriptPete Wyckoff Mon, 9 Apr 2012 00:18:01 +0000 (20:18 -0400)

git p4: update name in script

In messages to the user and comments, change "git-p4" to "git p4".

Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-p4: move to toplevelPete Wyckoff Mon, 9 Apr 2012 00:18:00 +0000 (20:18 -0400)

git-p4: move to toplevel

Move git-p4 out of contrib/fast-import into the main code base,
aside other foreign SCM tools.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Avoid bug in Solaris xpg4/sed as used in submoduleBen Walton Mon, 9 Apr 2012 20:08:02 +0000 (16:08 -0400)

Avoid bug in Solaris xpg4/sed as used in submodule

The sed provided by Solaris in /usr/xpg4/bin has a bug whereby an
unanchored regex using * for zero or more repetitions sees two
separate matches fed to the substitution engine in some cases.

This is evidenced by:

$ for sed in /usr/xpg4/bin/sed /usr/bin/sed /opt/csw/gnu/sed; do \
echo 'ab' | $sed -e 's|[a]*|X|g'; \
done
XXbX
XbX
XbX

This bug was triggered during a git submodule clone operation as
exercised in the setup stage of t5526-fetch-submodules when using the
default SANE_TOOL_PATH for Solaris. It led to paths such as
..../.. being used in the submodule .git gitdir reference.

Using the expression 's|\([^/]*\(/*\)\)|..\2|g' provides the desired
result with all three three tested sed implementations but is harder
to read. As we do not need to handle fully qualified paths though,
the expression could actually be [^/]+ which isn't properly handled
either. Instead, use [^/][^/]*, as suggested by Andreas Schwab, which
works on all three tested sed implementations.

The new expression is semantically different than the original one.
It will not place a leading '..' on a fully qualified path as the
original expression did. All of the paths being passed through this
regex are relative and did not rely on this behaviour so it's a safe
change.

Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'jc/maint-verify-objects-remove-pessimism... Junio C Hamano Mon, 9 Apr 2012 20:43:16 +0000 (13:43 -0700)

Merge branch 'jc/maint-verify-objects-remove-pessimism' into maint-1.7.8

* jc/maint-verify-objects-remove-pessimism:
fetch/receive: remove over-pessimistic connectivity check

Merge branch 'dw/gitweb-doc-grammo' into maint-1.7.8Junio C Hamano Mon, 9 Apr 2012 20:42:56 +0000 (13:42 -0700)

Merge branch 'dw/gitweb-doc-grammo' into maint-1.7.8

* dw/gitweb-doc-grammo:
Documentation/gitweb: trivial English fixes

Merge branch 'tr/cache-tree' into maint-1.7.8Junio C Hamano Mon, 9 Apr 2012 20:40:32 +0000 (13:40 -0700)

Merge branch 'tr/cache-tree' into maint-1.7.8

* tr/cache-tree:
t0090: be prepared that 'wc -l' writes leading blanks
reset: update cache-tree data when appropriate
commit: write cache-tree data when writing index anyway
Refactor cache_tree_update idiom from commit
Test the current state of the cache-tree optimization
Add test-scrap-cache-tree

Merge branch 'cb/maint-t5541-make-server-port-portable... Junio C Hamano Mon, 9 Apr 2012 20:38:41 +0000 (13:38 -0700)

Merge branch 'cb/maint-t5541-make-server-port-portable' into maint-1.7.8

* cb/maint-t5541-make-server-port-portable:
t5541: check error message against the real port number used
remote-curl: Fix push status report when all branches fail

Merge branch 'cn/maint-rev-list-doc' into maint-1.7.8Junio C Hamano Mon, 9 Apr 2012 20:36:44 +0000 (13:36 -0700)

Merge branch 'cn/maint-rev-list-doc' into maint-1.7.8

* cn/maint-rev-list-doc:
Documentation: use {asterisk} in rev-list-options.txt when needed

Merge branch 'tr/maint-bundle-boundary' into maint... Junio C Hamano Mon, 9 Apr 2012 20:36:26 +0000 (13:36 -0700)

Merge branch 'tr/maint-bundle-boundary' into maint-1.7.8

* tr/maint-bundle-boundary:
bundle: keep around names passed to add_pending_object()
t5510: ensure we stay in the toplevel test dir
t5510: refactor bundle->pack conversion

Merge branch 'tr/maint-bundle-long-subject' into maint... Junio C Hamano Mon, 9 Apr 2012 20:36:20 +0000 (13:36 -0700)

Merge branch 'tr/maint-bundle-long-subject' into maint-1.7.8

* tr/maint-bundle-long-subject:
t5704: match tests to modern style
strbuf: improve strbuf_get*line documentation
bundle: use a strbuf to scan the log for boundary commits
bundle: put strbuf_readline_fd in strbuf.c with adjustments

Merge branch 'ph/rerere-doc' into maint-1.7.8Junio C Hamano Mon, 9 Apr 2012 20:34:09 +0000 (13:34 -0700)

Merge branch 'ph/rerere-doc' into maint-1.7.8

* ph/rerere-doc:
rerere: Document 'rerere remaining'

Git 1.7.10 v1.7.10Junio C Hamano Fri, 6 Apr 2012 17:47:58 +0000 (10:47 -0700)

Git 1.7.10

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

spec: add missing build dependencyFelipe Contreras Fri, 6 Apr 2012 12:22:30 +0000 (15:22 +0300)

spec: add missing build dependency

Otherwise:

/usr/bin/perl Makefile.PL PREFIX='/opt/git' INSTALL_BASE=''
Can't locate ExtUtils/MakeMaker.pm in @INC (@INC contains: ...) at Makefile.PL line 1.
BEGIN failed--compilation aborted at Makefile.PL line 1.
make[1]: *** [perl.mak] Error 2
make: *** [perl/perl.mak] Error 2

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

run-command: treat inaccessible directories as ENOENTJeff King Fri, 30 Mar 2012 07:52:18 +0000 (03:52 -0400)

run-command: treat inaccessible directories as ENOENT

When execvp reports EACCES, it can be one of two things:

1. We found a file to execute, but did not have
permissions to do so.

2. We did not have permissions to look in some directory
in the $PATH.

In the former case, we want to consider this a
permissions problem and report it to the user as such (since
getting this for something like "git foo" is likely a
configuration error).

In the latter case, there is a good chance that the
inaccessible directory does not contain anything of
interest. Reporting "permission denied" is confusing to the
user (and prevents our usual "did you mean...?" lookup). It
also prevents git from trying alias lookup, since we do so
only when an external command does not exist (not when it
exists but has an error).

This patch detects EACCES from execvp, checks whether we are
in case (2), and if so converts errno to ENOENT. This
behavior matches that of "bash" (but not of simpler shells
that use execvp more directly, like "dash").

Test stolen from Junio.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

compat/mingw.[ch]: Change return type of exec functions... Ramsay Jones Thu, 5 Apr 2012 17:48:46 +0000 (18:48 +0100)

compat/mingw.[ch]: Change return type of exec functions to int

The POSIX standard specifies a return type of int for all six exec
functions. In addition, all exec functions return -1 on error, and
simply do not return on success. However, the current emulation of
the exec functions on mingw are declared with a void return type.

This would cause a problem should any code attempt to call the
exec function in a non-void context. In particular, if an exec
function were used in a conditional it would fail to compile.

In order to improve the fidelity of the emulation, we change the
return type of the mingw_execv[p] functions to int and return -1
on error.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

push: error out when the "upstream" semantics does... Junio C Hamano Fri, 30 Mar 2012 23:07:12 +0000 (16:07 -0700)

push: error out when the "upstream" semantics does not make sense

The user can say "git push" without specifying any refspec. When using
the "upstream" semantics via the push.default configuration, the user
wants to update the "upstream" branch of the current branch, which is the
branch at a remote repository the current branch is set to integrate with,
with this command.

However, there are cases that such a "git push" that uses the "upstream"
semantics does not make sense:

- The current branch does not have branch.$name.remote configured. By
definition, "git push" that does not name where to push to will not
know where to push to. The user may explicitly say "git push $there",
but again, by definition, no branch at repository $there is set to
integrate with the current branch in this case and we wouldn't know
which remote branch to update.

- The current branch does have branch.$name.remote configured, but it
does not specify branch.$name.merge that names what branch at the
remote this branch integrates with. "git push" knows where to push in
this case (or the user may explicitly say "git push $remote" to tell us
where to push), but we do not know which remote branch to update.

- The current branch does have its remote and upstream branch configured,
but the user said "git push $there", where $there is not the remote
named by "branch.$name.remote". By definition, no branch at repository
$there is set to integrate with the current branch in this case, and
this push is not meant to update any branch at the remote repository
$there.

The first two cases were already checked correctly, but the third case was
not checked and we ended up updating the branch named branch.$name.merge
at repository $there, which was totally bogus.

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

add--interactive: ignore unmerged entries in patch... Jeff King Thu, 5 Apr 2012 12:30:08 +0000 (08:30 -0400)

add--interactive: ignore unmerged entries in patch mode

When "add -p" sees an unmerged entry, it shows the combined
diff and then immediately skips the hunk. This can be
confusing in a variety of ways, depending on whether there
are other changes to stage (in which case you get the
superfluous combined diff output in between other hunks) or
not (in which case you get the combined diff and the program
exits immediately, rather than seeing "No changes").

The current behavior was not planned, and is just what the
implementation happens to do. Instead, let's explicitly
remove unmerged entries from our list of modified files, and
print a warning that we are ignoring them.

We can cheaply find which entries are unmerged by adding
"--raw" output to the "diff-files --numstat" we already run.
There is one non-obvious thing we must change when parsing
this combined output. Before this patch, when we saw a
numstat line for a file that did not have index changes, we
would create a new record with 'unchanged' in the 'INDEX'
field. Because "--raw" comes before "--numstat", we must
move this special-case down to the raw-line case (and it is
sufficient to move it rather than handle it in both places,
since any file which has a --numstat will also have a --raw
entry).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Use SHELL_PATH from build system in run_command.c:prepa... Ben Walton Sat, 31 Mar 2012 01:33:21 +0000 (21:33 -0400)

Use SHELL_PATH from build system in run_command.c:prepare_shell_cmd

During the testing of the 1.7.10 rc series on Solaris for OpenCSW, it
was discovered that t7006-pager was failing due to finding a bad "sh"
in PATH after a call to execvp("sh", ...). This call was setup by
run_command.c:prepare_shell_cmd.

The PATH in use at the time saw /opt/csw/bin given precedence to
traditional Solaris paths such as /usr/bin and /usr/xpg4/bin. A
package named schilyutils (Joerg Schilling's utilities) was installed
on the build system and it delivered a modified version of the
traditional Solaris /usr/bin/sh as /opt/csw/bin/sh. This version of
sh suffers from many of the same problems as /usr/bin/sh.

The command-specific pager test failed due to the broken "sh" handling
^ as a pipe character. It tried to fork two processes when it
encountered "sed s/^/foo:/" as the pager command. This problem was
entirely dependent on the PATH of the user at runtime.

Possible fixes for this issue are:

1. Use the standard system() or popen() which both launch a POSIX
shell on Solaris as long as _POSIX_SOURCE is defined.

2. The git wrapper could prepend SANE_TOOL_PATH to PATH thus forcing
all unqualified commands run to use the known good tools on the
system.

3. The run_command.c:prepare_shell_command() could use the same
SHELL_PATH that is in the #! line of all all scripts and not rely
on PATH to find the sh to run.

Option 1 would preclude opening a bidirectional pipe to a filter
script and would also break git for Windows as cmd.exe is spawned from
system() (cf. v1.7.5-rc0~144^2, "alias: use run_command api to execute
aliases, 2011-01-07).

Option 2 is not friendly to users as it would negate their ability to
use tools of their choice in many cases. Alternately, injecting
SANE_TOOL_PATH such that it takes precedence over /bin and /usr/bin
(and anything with lower precedence than those paths) as
git-sh-setup.sh does would not solve the problem either as the user
environment could still allow a bad sh to be found. (Many OpenCSW
users will have /opt/csw/bin leading their PATH and some subset would
have schilyutils installed.)

Option 3 allows us to use a known good shell while still honouring the
users' PATH for the utilities being run. Thus, it solves the problem
while not negatively impacting either users or git's ability to run
external commands in convenient ways. Essentially, the shell is a
special case of tool that should not rely on SANE_TOOL_PATH and must
be called explicitly.

With this patch applied, any code path leading to
run_command.c:prepare_shell_cmd can count on using the same sane shell
that all shell scripts in the git suite use. Both the build system
and run_command.c will default this shell to /bin/sh unless
overridden.

Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation/git-commit: rephrase the "initial-ness... Junio C Hamano Tue, 3 Apr 2012 23:41:21 +0000 (16:41 -0700)

Documentation/git-commit: rephrase the "initial-ness" of templates

The description of "commit -t <file>" said the file is used "as the
initial version" of the commit message, but in the context of an SCM,
"version" is a loaded word that can needlesslyl confuse readers.

Explain the purpose of the mechanism without using "version".

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

Git 1.7.10-rc4 v1.7.10-rc4Junio C Hamano Tue, 3 Apr 2012 16:25:49 +0000 (09:25 -0700)

Git 1.7.10-rc4

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

Merge branch 'pt/gitk'Junio C Hamano Mon, 2 Apr 2012 22:06:25 +0000 (15:06 -0700)

Merge branch 'pt/gitk'

* pt/gitk:
gitk: fix setting font display with new tabbed dialog layout.
gitk: fix tabbed preferences construction when using tcl 8.4

Sync with 1.7.9.6Junio C Hamano Mon, 2 Apr 2012 20:09:21 +0000 (13:09 -0700)

Sync with 1.7.9.6

Git 1.7.9.6 v1.7.9.6Junio C Hamano Mon, 2 Apr 2012 20:07:58 +0000 (13:07 -0700)

Git 1.7.9.6

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

Merge branch 'jc/maint-merge-autoedit' into maintJunio C Hamano Mon, 2 Apr 2012 19:56:35 +0000 (12:56 -0700)

Merge branch 'jc/maint-merge-autoedit' into maint

* jc/maint-merge-autoedit:
merge: backport GIT_MERGE_AUTOEDIT support

gitk: fix setting font display with new tabbed dialog... Pat Thoyts Sun, 1 Apr 2012 22:00:52 +0000 (23:00 +0100)

gitk: fix setting font display with new tabbed dialog layout.

The changes to the dialog window tree broke the preview of the selected
font on the button. This corrects that issue.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

gitk: fix tabbed preferences construction when using... Pat Thoyts Sun, 1 Apr 2012 22:00:51 +0000 (23:00 +0100)

gitk: fix tabbed preferences construction when using tcl 8.4

In 8.5 the incr command creates the target variable if it does not exist
but in 8.4 using incr on a non-existing variable raises an error. Ensure
we have created our counter variable when creating the tabbed dialog for
non-themed preferences.

Reported-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge git://github.com/git-l10n/git-poJunio C Hamano Mon, 2 Apr 2012 16:19:47 +0000 (09:19 -0700)

Merge git://github.com/git-l10n/git-po

Portuguese Portuguese translations from Marco Sousa via Jiang Xin

* 'master' of git://github.com/git-l10n/git-po:
l10n: Add the Dutch translation team and initialize nl.po
l10n: Inital Portuguese Portugal language (pt_PT)
l10n: Improve zh_CN translation for Git 1.7.10-rc3

l10n: Add the Dutch translation team and initialize... Vincent van Ravesteijn Mon, 2 Apr 2012 12:14:08 +0000 (14:14 +0200)

l10n: Add the Dutch translation team and initialize nl.po

Signed-off-by: Vincent van Ravesteijn <vfr@lyx.org>

l10n: Inital Portuguese Portugal language (pt_PT)Marco Sousa Sat, 31 Mar 2012 15:51:45 +0000 (17:51 +0200)

l10n: Inital Portuguese Portugal language (pt_PT)

Signed-off-by: Marco Sousa <marcomsousa@gmail.com>

git-commit.txt: clarify -t requires editing messageAdam Monsen Sat, 31 Mar 2012 19:28:15 +0000 (12:28 -0700)

git-commit.txt: clarify -t requires editing message

Make it clear that, when using commit --template, the message *must* be
changed or the commit will be aborted.

Helped-by: Junio C Hamano <gitster@pobox.com>
Helped-by: Ivan Heffner <iheffner@gmail.com>
Signed-off-by: Adam Monsen <haircut@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

var doc: default editor and pager are configurable... Jonathan Nieder Sat, 31 Mar 2012 08:42:34 +0000 (03:42 -0500)

var doc: default editor and pager are configurable at build time

Some distributors customize the fallback pager and editor used by git
commands when the user has not indicated a preference via the
core.editor/core.pager configuration or GIT_EDITOR, GIT_PAGER, VISUAL,
EDITOR, and PAGER environment variables, and git's build system
provides DEFAULT_PAGER and DEFAULT_EDITOR makefile settings to help
them with that (see v1.6.6-rc0~24, 2009-11-20).

Unfortunately those compile-time settings do not affect the
documentation, so the uninitiated user who tries to understand git by
reading the git-var(1) manpage can easily be confused when git falls
back to 'nano' and 'more' instead of 'vi' and 'less'. Even if the
distributor patches the distributed docs to reflect the new default,
the user may read the official documentation from the git-htmldocs
repository online and be confused in the same way.

Add a few words stating that the defaults are customizable at
compile time to make the behavior crystal clear.

Reported-by: Rodrigo Silva (MestreLion) <linux@rodrigosilva.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint'Junio C Hamano Sat, 31 Mar 2012 03:25:55 +0000 (20:25 -0700)

Merge branch 'maint'

* maint:
string-list: document that string_list_insert() inserts unique strings

commit: rephrase the error when user did not touch... Junio C Hamano Fri, 30 Mar 2012 19:14:33 +0000 (12:14 -0700)

commit: rephrase the error when user did not touch templated log message

When the user exited editor without editing the commit log template given
by "git commit -t <template>", the commit was aborted (correct) with an
error message that said "due to empty commit message" (incorrect).

This was because the original template support was done by piggybacking on
the check to detect an empty log message. Split the codepaths into two
independent checks to clarify the error.

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

commit: do not trigger bogus "has templated message... Junio C Hamano Fri, 30 Mar 2012 18:30:59 +0000 (11:30 -0700)

commit: do not trigger bogus "has templated message edited" check

When "-t template" and "-F msg" options are both given (or worse yet,
there is "commit.template" configuration but a message is given in some
other way), the documentation says that template is ignored. However,
the "has the user edited the message?" check still used the contents of
the template file as the basis of the emptyness check.

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

t7501: test the right kind of breakageJunio C Hamano Fri, 30 Mar 2012 18:04:08 +0000 (11:04 -0700)

t7501: test the right kind of breakage

These tests try to run "git commit" with various "forbidden" combinations
of options and expect the command to fail, but they do so without having
any change added to the index. We wouldn't be able to catch breakages
that would allow these combinations by mistake with them because the
command will fail with "nothing to commit" anyway.

Make sure we have something added to the index before running the command.

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

http-backend: respect existing GIT_COMMITTER_* variablesJeff King Fri, 30 Mar 2012 07:01:30 +0000 (03:01 -0400)

http-backend: respect existing GIT_COMMITTER_* variables

The http-backend program sets default GIT_COMMITTER_NAME and
GIT_COMMITTER_EMAIL variables based on the REMOTE_USER and
REMOTE_ADDR variables provided by the webserver. However, it
unconditionally overwrites any existing GIT_COMMITTER
variables, which may have been customized by site-specific
code in the webserver (or in a script wrapping http-backend).

Let's leave those variables intact if they already exist,
assuming that any such configuration was intentional. There
is a slight chance of a regression if somebody has set
GIT_COMMITTER_* for the entire webserver, not intending it
to leak through http-backend. We could protect against this
by passing the information in alternate variables. However,
it seems unlikely that anyone will care about that
regression, and there is value in the simplicity of using
the common variable names that are used elsewhere in git.

While we're tweaking the environment-handling in
http-backend, let's switch it to use argv_array to handle
the list of variables. That makes the memory management much
simpler.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>