gitweb.git
Merge branch 'va/p4-branch-import'Junio C Hamano Mon, 29 Aug 2011 04:15:34 +0000 (21:15 -0700)

Merge branch 'va/p4-branch-import'

* va/p4-branch-import:
git-p4: Add simple test case for branch import
git-p4: Allow branch definition with git config
git-p4: Allow filtering Perforce branches by user
git-p4: Correct branch base depot path detection
git-p4: Process detectCopiesHarder with --bool
git-p4: Add test case for copy detection
git-p4: Add test case for rename detection
git-p4: Add description of rename/copy detection options
git-p4: Allow setting rename/copy detection threshold

Merge branch 'jc/combine-diff-callback'Junio C Hamano Mon, 29 Aug 2011 04:15:33 +0000 (21:15 -0700)

Merge branch 'jc/combine-diff-callback'

* jc/combine-diff-callback:
combine-diff: support format_callback

Merge branch 'nk/branch-v-abbrev'Junio C Hamano Mon, 29 Aug 2011 04:15:33 +0000 (21:15 -0700)

Merge branch 'nk/branch-v-abbrev'

* nk/branch-v-abbrev:
branch -v: honor core.abbrev

Git 1.7.7-rc0 v1.7.7-rc0Junio C Hamano Fri, 26 Aug 2011 04:00:46 +0000 (21:00 -0700)

Git 1.7.7-rc0

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

Merge branch 'jc/merge-reword'Junio C Hamano Thu, 25 Aug 2011 23:00:53 +0000 (16:00 -0700)

Merge branch 'jc/merge-reword'

* jc/merge-reword:
merge: reword the final message

Merge branch 'mg/branch-set-upstream-previous'Junio C Hamano Thu, 25 Aug 2011 23:00:49 +0000 (16:00 -0700)

Merge branch 'mg/branch-set-upstream-previous'

* mg/branch-set-upstream-previous:
branch.c: use the parsed branch name

Merge branch 'da/difftool-mergtool-refactor'Junio C Hamano Thu, 25 Aug 2011 23:00:43 +0000 (16:00 -0700)

Merge branch 'da/difftool-mergtool-refactor'

* da/difftool-mergtool-refactor:
mergetools/meld: Use '--output' when available
mergetool--lib: Refactor tools into separate files
mergetool--lib: Make style consistent with git
difftool--helper: Make style consistent with git

Merge branch 'jc/maint-autofix-tag-in-head'Junio C Hamano Thu, 25 Aug 2011 23:00:37 +0000 (16:00 -0700)

Merge branch 'jc/maint-autofix-tag-in-head'

* jc/maint-autofix-tag-in-head:
commit: reduce use of redundant global variables

Merge branch 'di/fast-import-doc'Junio C Hamano Thu, 25 Aug 2011 23:00:32 +0000 (16:00 -0700)

Merge branch 'di/fast-import-doc'

* di/fast-import-doc:
doc/fast-import: document feature import-marks-if-exists

Merge branch 'jn/plug-empty-tree-leak'Junio C Hamano Thu, 25 Aug 2011 23:00:29 +0000 (16:00 -0700)

Merge branch 'jn/plug-empty-tree-leak'

* jn/plug-empty-tree-leak:
merge-recursive: take advantage of hardcoded empty tree
revert: plug memory leak in "cherry-pick root commit" codepath

Merge branch 'ac/describe-dirty-refresh'Junio C Hamano Thu, 25 Aug 2011 23:00:24 +0000 (16:00 -0700)

Merge branch 'ac/describe-dirty-refresh'

* ac/describe-dirty-refresh:
describe: Refresh the index when run with --dirty

Merge branch 'di/parse-options-split'Junio C Hamano Thu, 25 Aug 2011 23:00:20 +0000 (16:00 -0700)

Merge branch 'di/parse-options-split'

* di/parse-options-split:
Reduce parse-options.o dependencies
parse-options: export opterr, optbug

Merge branch 'js/i18n-scripts'Junio C Hamano Thu, 25 Aug 2011 23:00:16 +0000 (16:00 -0700)

Merge branch 'js/i18n-scripts'

* js/i18n-scripts:
submodule: take advantage of gettextln and eval_gettextln.
stash: take advantage of eval_gettextln
pull: take advantage of eval_gettextln
git-am: take advantage of gettextln and eval_gettextln.
gettext: add gettextln, eval_gettextln to encode common idiom

Merge branch 'maint'Junio C Hamano Thu, 25 Aug 2011 23:00:07 +0000 (16:00 -0700)

Merge branch 'maint'

* maint:
whitespace: have SP on both sides of an assignment "="
update-ref: whitespace fix

whitespace: have SP on both sides of an assignment "="Junio C Hamano Thu, 25 Aug 2011 21:46:52 +0000 (14:46 -0700)

whitespace: have SP on both sides of an assignment "="

I've deliberately excluded the borrowed code in compat/nedmalloc
directory.

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

update-ref: whitespace fixPang Yan Han Thu, 25 Aug 2011 15:40:50 +0000 (23:40 +0800)

update-ref: whitespace fix

Signed-off-by: Pang Yan Han <pangyanhan@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Sync with 1.7.6.1Junio C Hamano Wed, 24 Aug 2011 19:18:02 +0000 (12:18 -0700)

Sync with 1.7.6.1

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

Git 1.7.6.1 v1.7.6.1Junio C Hamano Wed, 24 Aug 2011 19:16:58 +0000 (12:16 -0700)

Git 1.7.6.1

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

Merge branch 'jc/maint-smart-http-race-upload-pack... Junio C Hamano Wed, 24 Aug 2011 19:16:15 +0000 (12:16 -0700)

Merge branch 'jc/maint-smart-http-race-upload-pack' into maint

* jc/maint-smart-http-race-upload-pack:
get_indexed_object can return NULL if nothing is in that slot; check for it

get_indexed_object can return NULL if nothing is in... Brian Harring Wed, 24 Aug 2011 05:47:17 +0000 (22:47 -0700)

get_indexed_object can return NULL if nothing is in that slot; check for it

This fixes a segfault introduced by 051e400; via it, no longer able to
trigger the http/smartserv race.

Signed-off-by: Brian Harring <ferringb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Update draft release notes to 1.7.7Junio C Hamano Tue, 23 Aug 2011 22:43:38 +0000 (15:43 -0700)

Update draft release notes to 1.7.7

Merge branch 'rt/zlib-smaller-window'Junio C Hamano Tue, 23 Aug 2011 22:40:33 +0000 (15:40 -0700)

Merge branch 'rt/zlib-smaller-window'

* rt/zlib-smaller-window:
test: consolidate definition of $LF
Tolerate zlib deflation with window size < 32Kb

Merge branch 'jn/maint-test-return'Junio C Hamano Tue, 23 Aug 2011 22:35:26 +0000 (15:35 -0700)

Merge branch 'jn/maint-test-return'

* jn/maint-test-return:
t3900: do not reference numbered arguments from the test script
test: cope better with use of return for errors
test: simplify return value of test_run_

Merge branch 'cb/maint-ls-files-error-report'Junio C Hamano Tue, 23 Aug 2011 22:34:31 +0000 (15:34 -0700)

Merge branch 'cb/maint-ls-files-error-report'

* cb/maint-ls-files-error-report:
ls-files: fix pathspec display on error

Merge branch 'maint'Junio C Hamano Tue, 23 Aug 2011 22:29:08 +0000 (15:29 -0700)

Merge branch 'maint'

* maint:
Update draft release notes for 1.7.6.1

Update draft release notes for 1.7.6.1Junio C Hamano Tue, 23 Aug 2011 22:28:18 +0000 (15:28 -0700)

Update draft release notes for 1.7.6.1

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

Merge branch 'jc/maint-combined-diff-work-tree' into... Junio C Hamano Tue, 23 Aug 2011 22:27:30 +0000 (15:27 -0700)

Merge branch 'jc/maint-combined-diff-work-tree' into maint

* jc/maint-combined-diff-work-tree:
diff -c/--cc: do not mistake "resolved as deletion" as "use working tree"

Conflicts:
combine-diff.c

Merge branch 'cb/maint-exec-error-report' into maintJunio C Hamano Tue, 23 Aug 2011 22:20:06 +0000 (15:20 -0700)

Merge branch 'cb/maint-exec-error-report' into maint

* cb/maint-exec-error-report:
notice error exit from pager
error_routine: use parent's stderr if exec fails

Merge branch 'cb/maint-quiet-push' into maintJunio C Hamano Tue, 23 Aug 2011 22:19:45 +0000 (15:19 -0700)

Merge branch 'cb/maint-quiet-push' into maint

* cb/maint-quiet-push:
receive-pack: do not overstep command line argument array
propagate --quiet to send-pack/receive-pack

Conflicts:
Documentation/git-receive-pack.txt
Documentation/git-send-pack.txt

Merge branch 'jc/maint-smart-http-race-upload-pack... Junio C Hamano Tue, 23 Aug 2011 22:17:50 +0000 (15:17 -0700)

Merge branch 'jc/maint-smart-http-race-upload-pack' into maint

* jc/maint-smart-http-race-upload-pack:
helping smart-http/stateless-rpc fetch race

Merge branch 'jc/no-gitweb-test-without-cgi-etc' into... Junio C Hamano Tue, 23 Aug 2011 22:17:14 +0000 (15:17 -0700)

Merge branch 'jc/no-gitweb-test-without-cgi-etc' into maint

* jc/no-gitweb-test-without-cgi-etc:
t/gitweb-lib.sh: skip gitweb tests when perl dependencies are not met

git-p4: Add simple test case for branch importVitor Antunes Thu, 18 Aug 2011 23:44:06 +0000 (00:44 +0100)

git-p4: Add simple test case for branch import

Create a basic branch structure in P4 and clone it with git-p4.
Also, make an update on P4 side and check if git-p4 imports it correctly.
The branch structure is created in such a way that git-p4 will fail to import
updates if patch "git-p4: Correct branch base depot path detection" is not
applied.

Signed-off-by: Vitor Antunes <vitor.hda@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-p4: Allow branch definition with git configVitor Antunes Thu, 18 Aug 2011 23:44:05 +0000 (00:44 +0100)

git-p4: Allow branch definition with git config

Perforce does not strictly require the usage of branch specifications to create
branches. In these cases the branch detection code of git-p4 will not be able to
import them.
This patch adds support for git-p4.branchList configuration option, allowing
branches to be defined in git config.

Signed-off-by: Vitor Antunes <vitor.hda@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-p4: Allow filtering Perforce branches by userVitor Antunes Thu, 18 Aug 2011 23:44:04 +0000 (00:44 +0100)

git-p4: Allow filtering Perforce branches by user

All branches in the Perforce server are downloaded to allow branch detection. If
you have a centralized server on a remote location and there is a big number of
branches this operation can take some time.
This patch adds the configuration option git-p4.branchUser to allow filtering
the branch list by user. Although this limits the branch maintenance in Perforce
to be done by a single user, it might be an advantage when the number of
branches being used in a specific depot is very small when compared with the
branches available in the server.

Signed-off-by: Vitor Antunes <vitor.hda@gmail.com>
Acked-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-p4: Correct branch base depot path detectionVitor Antunes Thu, 18 Aug 2011 23:44:03 +0000 (00:44 +0100)

git-p4: Correct branch base depot path detection

When branch detection is enabled each branch is named in git after their
relative depot path in Perforce. To do this the depot paths are compared against
each other to find their common base path. The current algorithm makes this
comparison on a character by character basis.
Assuming we have the following branches:

//depot/branches/featureA
//depot/branches/featureB

Then the base depot path would be //depot/branches/feature, which is an invalid
depot path.

The current patch fixes this by splitting the path into a list and comparing the
list entries, making it choose correctly //depot/branches as the base path.

Signed-off-by: Vitor Antunes <vitor.hda@gmail.com>
Acked-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint'Junio C Hamano Tue, 23 Aug 2011 04:02:41 +0000 (21:02 -0700)

Merge branch 'maint'

* maint:
add technical documentation about ref iteration
Do not use C++-style comments

add technical documentation about ref iterationHeiko Voigt Mon, 22 Aug 2011 20:36:45 +0000 (22:36 +0200)

add technical documentation about ref iteration

Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-p4: Process detectCopiesHarder with --boolVitor Antunes Mon, 22 Aug 2011 08:33:09 +0000 (09:33 +0100)

git-p4: Process detectCopiesHarder with --bool

Signed-off-by: Vitor Antunes <vitor.hda@gmail.com>
Acked-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-p4: Add test case for copy detectionVitor Antunes Mon, 22 Aug 2011 08:33:08 +0000 (09:33 +0100)

git-p4: Add test case for copy detection

Signed-off-by: Vitor Antunes <vitor.hda@gmail.com>
Acked-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-p4: Add test case for rename detectionVitor Antunes Mon, 22 Aug 2011 08:33:07 +0000 (09:33 +0100)

git-p4: Add test case for rename detection

Signed-off-by: Vitor Antunes <vitor.hda@gmail.com>
Acked-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-p4: Add description of rename/copy detection optionsVitor Antunes Mon, 22 Aug 2011 08:33:06 +0000 (09:33 +0100)

git-p4: Add description of rename/copy detection options

Signed-off-by: Vitor Antunes <vitor.hda@gmail.com>
Acked-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-p4: Allow setting rename/copy detection thresholdVitor Antunes Mon, 22 Aug 2011 08:33:05 +0000 (09:33 +0100)

git-p4: Allow setting rename/copy detection threshold

Copy and rename detection arguments (-C and -M) allow setting a threshold value
for the similarity ratio. If the similarity is below this threshold the rename
or copy is ignored and the file is added as new.
This patch allows setting git-p4.detectRenames and git-p4.detectCopies options
to an integer value to set the respective threshold.

Signed-off-by: Vitor Antunes <vitor.hda@gmail.com>
Acked-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Do not use C++-style commentsMichael Haggerty Mon, 22 Aug 2011 10:33:52 +0000 (12:33 +0200)

Do not use C++-style comments

Detected by "gcc -std=iso9899:1990 ...". This patch applies against
"maint".

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

combine-diff: support format_callbackJunio C Hamano Sat, 20 Aug 2011 06:32:51 +0000 (23:32 -0700)

combine-diff: support format_callback

This teaches combine-diff machinery to feed a combined merge to a callback
function when DIFF_FORMAT_CALLBACK is specified.

So far, format callback functions are not used for anything but 2-way
diffs. A callback is given a diff_queue_struct, which is an array of
diff_filepair. As its name suggests, a diff_filepair is a _pair_ of
diff_filespec that represents a single preimage and a single postimage.

Since "diff -c" is to compare N parents with a single merge result and
filter out any paths whose result match one (or more) of the parent(s),
its output has to be able to represent N preimages and 1 postimage. For
this reason, a callback function that inspects a diff_filepair that
results from this new infrastructure can and is expected to view the
preimage side (i.e. pair->one) as an array of diff_filespec. Each element
in the array, except for the last one, is marked with "has_more_entries"
bit, so that the same callback function can be used for 2-way diffs and
combined diffs.

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

commit: reduce use of redundant global variablesJunio C Hamano Fri, 19 Aug 2011 18:58:18 +0000 (11:58 -0700)

commit: reduce use of redundant global variables

The file-scope global variable head_sha1[] was used to hold the object
name of the current HEAD commit (unless we are about to make an initial
commit). Also there is an independent "static int initial_commit".

Fix all the functions on the call-chain that use these two variables to
take a new "(const) struct commit *current_head" argument instead, and
replace their uses, e.g. "if (initial_commit)" becomes "if (!current_head)"
and a reference to "head_sha1" becomes "current_head->object.sha1".

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

branch.c: use the parsed branch nameMichael J Gruber Fri, 19 Aug 2011 11:45:43 +0000 (13:45 +0200)

branch.c: use the parsed branch name

When setting up tracking info, branch.c uses the given branch specifier
("name"). Use the parsed name ("ref.buf") instead so that

git branch --set-upstream @{-1} foo

sets up tracking info for the previous branch rather than for a branch
named "@{-1}".

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

mergetools/meld: Use '--output' when availableDavid Aguilar Fri, 19 Aug 2011 09:14:45 +0000 (02:14 -0700)

mergetools/meld: Use '--output' when available

meld 1.5.0 and newer allow the output file to be specified
when merging multiple files. Check whether the meld command
supports '--output' and use it when available.

Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

mergetool--lib: Refactor tools into separate filesDavid Aguilar Thu, 18 Aug 2011 07:23:46 +0000 (00:23 -0700)

mergetool--lib: Refactor tools into separate files

Individual merge tools are now defined in a mergetools/$tool
file which is sourced at runtime.

The individual files are installed into $(git --exec-path)/mergetools/.
New tools can be added by creating a new file instead of editing the
git-mergetool--lib.sh scriptlet.

http://thread.gmane.org/gmane.comp.version-control.git/134906/focus=135006

Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

mergetool--lib: Make style consistent with gitDavid Aguilar Thu, 18 Aug 2011 07:23:45 +0000 (00:23 -0700)

mergetool--lib: Make style consistent with git

Use the predominant conditional style where "then" appears
alone on the line after the test expression.
Remove spaces after ">" output redirections.
Remove unnecessary parentheses around the kdiff3 commands.

Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

difftool--helper: Make style consistent with gitDavid Aguilar Thu, 18 Aug 2011 07:23:44 +0000 (00:23 -0700)

difftool--helper: Make style consistent with git

Use the predominant conditional style where "then" appears
alone on the line after the test expression.

Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Update draft release notes to 1.7.7Junio C Hamano Fri, 19 Aug 2011 05:10:23 +0000 (22:10 -0700)

Update draft release notes to 1.7.7

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

Merge branch 'db/am-skip-blank-at-the-beginning'Junio C Hamano Fri, 19 Aug 2011 05:07:57 +0000 (22:07 -0700)

Merge branch 'db/am-skip-blank-at-the-beginning'

* db/am-skip-blank-at-the-beginning:
am: ignore leading whitespace before patch

Merge branch 'ma/am-exclude'Junio C Hamano Fri, 19 Aug 2011 05:07:54 +0000 (22:07 -0700)

Merge branch 'ma/am-exclude'

* ma/am-exclude:
am: Document new --exclude=<path> option
am: pass exclude down to apply

Merge branch 'maint'Junio C Hamano Fri, 19 Aug 2011 05:06:03 +0000 (22:06 -0700)

Merge branch 'maint'

* maint:
fetch-pack: check for valid commit from server

fetch-pack: check for valid commit from serverNguyễn Thái Ngọc Duy Thu, 18 Aug 2011 13:36:03 +0000 (20:36 +0700)

fetch-pack: check for valid commit from server

A malicious server can return ACK with non-existent SHA-1 or not a
commit. lookup_commit() in this case may return NULL. Do not let
fetch-pack crash by accessing NULL address in this case.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Update draft release notes to 1.7.7Junio C Hamano Thu, 18 Aug 2011 00:48:36 +0000 (17:48 -0700)

Update draft release notes to 1.7.7

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

Merge branch 'mh/check-attr-relative'Junio C Hamano Thu, 18 Aug 2011 00:36:22 +0000 (17:36 -0700)

Merge branch 'mh/check-attr-relative'

* mh/check-attr-relative: (29 commits)
test-path-utils: Add subcommand "prefix_path"
test-path-utils: Add subcommand "absolute_path"
git-check-attr: Normalize paths
git-check-attr: Demonstrate problems with relative paths
git-check-attr: Demonstrate problems with unnormalized paths
git-check-attr: test that no output is written to stderr
Rename git_checkattr() to git_check_attr()
git-check-attr: Fix command-line handling to match docs
git-check-attr: Drive two tests using the same raw data
git-check-attr: Add an --all option to show all attributes
git-check-attr: Error out if no pathnames are specified
git-check-attr: Process command-line args more systematically
git-check-attr: Handle each error separately
git-check-attr: Extract a function error_with_usage()
git-check-attr: Introduce a new variable
git-check-attr: Extract a function output_attr()
Allow querying all attributes on a file
Remove redundant check
Remove redundant call to bootstrap_attr_stack()
Extract a function collect_all_attrs()
...

Merge branch 'js/bisect-no-checkout'Junio C Hamano Thu, 18 Aug 2011 00:36:09 +0000 (17:36 -0700)

Merge branch 'js/bisect-no-checkout'

* js/bisect-no-checkout:
bisect: add support for bisecting bare repositories
bisect: further style nitpicks
bisect: replace "; then" with "\n<tab>*then"
bisect: cleanup whitespace errors in git-bisect.sh.
bisect: add documentation for --no-checkout option.
bisect: add tests for the --no-checkout option.
bisect: introduce --no-checkout support into porcelain.
bisect: introduce support for --no-checkout option.
bisect: add tests to document expected behaviour in presence of broken trees.
bisect: use && to connect statements that are deferred with eval.
bisect: move argument parsing before state modification.

Merge branch 'rc/histogram-diff'Junio C Hamano Thu, 18 Aug 2011 00:36:06 +0000 (17:36 -0700)

Merge branch 'rc/histogram-diff'

* rc/histogram-diff:
xdiff/xhistogram: drop need for additional variable
xdiff/xhistogram: rely on xdl_trim_ends()
xdiff/xhistogram: rework handling of recursed results
xdiff: do away with xdl_mmfile_next()
Make test number unique
xdiff/xprepare: use a smaller sample size for histogram diff
xdiff/xprepare: skip classification
teach --histogram to diff
t4033-diff-patience: factor out tests
xdiff/xpatience: factor out fall-back-diff function
xdiff/xprepare: refactor abort cleanups
xdiff/xprepare: use memset()

Merge branch 'jc/maint-smart-http-race-upload-pack'Junio C Hamano Thu, 18 Aug 2011 00:35:58 +0000 (17:35 -0700)

Merge branch 'jc/maint-smart-http-race-upload-pack'

* jc/maint-smart-http-race-upload-pack:
helping smart-http/stateless-rpc fetch race

Merge branch 'js/sh-style'Junio C Hamano Thu, 18 Aug 2011 00:35:50 +0000 (17:35 -0700)

Merge branch 'js/sh-style'

* js/sh-style:
filter-branch.sh: de-dent usage string
misc-sh: fix up whitespace in some other .sh files.

Merge branch 'js/ref-namespaces'Junio C Hamano Thu, 18 Aug 2011 00:35:38 +0000 (17:35 -0700)

Merge branch 'js/ref-namespaces'

* js/ref-namespaces:
ref namespaces: tests
ref namespaces: documentation
ref namespaces: Support remote repositories via upload-pack and receive-pack
ref namespaces: infrastructure
Fix prefix handling in ref iteration functions

Merge branch 'cb/maint-quiet-push'Junio C Hamano Thu, 18 Aug 2011 00:26:05 +0000 (17:26 -0700)

Merge branch 'cb/maint-quiet-push'

* cb/maint-quiet-push:
receive-pack: do not overstep command line argument array
propagate --quiet to send-pack/receive-pack

Conflicts:
Documentation/git-receive-pack.txt
Documentation/git-send-pack.txt

Merge branch 'jc/maint-combined-diff-work-tree'Junio C Hamano Thu, 18 Aug 2011 00:25:59 +0000 (17:25 -0700)

Merge branch 'jc/maint-combined-diff-work-tree'

* jc/maint-combined-diff-work-tree:
diff -c/--cc: do not mistake "resolved as deletion" as "use working tree"

Conflicts:
combine-diff.c

Merge branch 'cb/maint-exec-error-report'Junio C Hamano Thu, 18 Aug 2011 00:25:55 +0000 (17:25 -0700)

Merge branch 'cb/maint-exec-error-report'

* cb/maint-exec-error-report:
notice error exit from pager
error_routine: use parent's stderr if exec fails

Merge branch 'maint'Junio C Hamano Thu, 18 Aug 2011 00:25:37 +0000 (17:25 -0700)

Merge branch 'maint'

* maint:
checkout-index: remove obsolete comment

doc/fast-import: document feature import-marks-if-existsDmitry Ivankov Wed, 17 Aug 2011 10:42:58 +0000 (16:42 +0600)

doc/fast-import: document feature import-marks-if-exists

fast-import command-line option --import-marks-if-exists was introduced
in commit dded4f1 (fast-import: Introduce --import-marks-if-exists, 2011-01-15)

--import-marks option can be set via a "feature" command in a fast-import
stream and --import-marks-if-exists had support for such specification
from the very beginning too due to some shared codebase. Though the
documentation for this feature wasn't written in dded4f1.

Add the documentation for "feature import-marks-if-exists=<file>". Also add
a minimalistic test for it.

Signed-off-by: Dmitry Ivankov <divanorama@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

checkout-index: remove obsolete commentNguyễn Thái Ngọc Duy Wed, 17 Aug 2011 12:22:13 +0000 (19:22 +0700)

checkout-index: remove obsolete comment

The first paragraph about flag order is no longer true and is
mentioned in git-checkout-index.txt. The rest is also mentioned in
git-checkout-index.txt.

Remove it and keep uptodate document in one place.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Sync with "maint"Junio C Hamano Tue, 16 Aug 2011 21:23:43 +0000 (14:23 -0700)

Sync with "maint"

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

Merge branch 'maint'Junio C Hamano Tue, 16 Aug 2011 21:22:26 +0000 (14:22 -0700)

Merge branch 'maint'

* maint:
Prepare for 1.7.6.1
am: refresh the index at start and --resolved

Conflicts:
GIT-VERSION-GEN
RelNotes

merge-recursive: take advantage of hardcoded empty... Jonathan Nieder Tue, 16 Aug 2011 18:27:39 +0000 (13:27 -0500)

merge-recursive: take advantage of hardcoded empty tree

When this code was first written (v1.4.3-rc1~174^2~4, merge-recur: if
there is no common ancestor, fake empty one, 2006-08-09), everyone
needing a fake empty tree had to make her own, but ever since
v1.5.5-rc0~180^2~1 (2008-02-13), the object lookup machinery provides
a ready-made one. Use it.

This is just a simplification, though it also fixes a small leak
(since the tree in the virtual common ancestor commit is never freed).

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

Prepare for 1.7.6.1Junio C Hamano Tue, 16 Aug 2011 19:13:38 +0000 (12:13 -0700)

Prepare for 1.7.6.1

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

Merge branch 'jk/tag-list-multiple-patterns' into maintJunio C Hamano Tue, 16 Aug 2011 19:41:14 +0000 (12:41 -0700)

Merge branch 'jk/tag-list-multiple-patterns' into maint

* jk/tag-list-multiple-patterns:
tag: accept multiple patterns for --list

Merge branch 'jl/submodule-update-quiet' into maintJunio C Hamano Tue, 16 Aug 2011 19:41:14 +0000 (12:41 -0700)

Merge branch 'jl/submodule-update-quiet' into maint

* jl/submodule-update-quiet:
submodule: update and add must honor --quiet flag

Merge branch 'jl/submodule-add-relurl-wo-upstream'... Junio C Hamano Tue, 16 Aug 2011 19:41:13 +0000 (12:41 -0700)

Merge branch 'jl/submodule-add-relurl-wo-upstream' into maint

* jl/submodule-add-relurl-wo-upstream:
submodule add: clean up duplicated code
submodule add: allow relative repository path even when no url is set
submodule add: test failure when url is not configured in superproject

Conflicts:
git-submodule.sh

Merge branch 'oa/pull-reflog' into maintJunio C Hamano Tue, 16 Aug 2011 19:41:13 +0000 (12:41 -0700)

Merge branch 'oa/pull-reflog' into maint

* oa/pull-reflog:
pull: remove extra space from reflog message

Merge branch 'js/ls-tree-error' into maintJunio C Hamano Tue, 16 Aug 2011 19:41:12 +0000 (12:41 -0700)

Merge branch 'js/ls-tree-error' into maint

* js/ls-tree-error:
Ensure git ls-tree exits with a non-zero exit code if read_tree_recursive fails.
Add a test to check that git ls-tree sets non-zero exit code on error.

Merge branch 'jk/fast-export-quote-path' into maintJunio C Hamano Tue, 16 Aug 2011 19:41:12 +0000 (12:41 -0700)

Merge branch 'jk/fast-export-quote-path' into maint

* jk/fast-export-quote-path:
fast-export: quote paths in output

Merge branch 'jc/checkout-reflog-fix' into maintJunio C Hamano Tue, 16 Aug 2011 19:41:12 +0000 (12:41 -0700)

Merge branch 'jc/checkout-reflog-fix' into maint

* jc/checkout-reflog-fix:
checkout: do not write bogus reflog entry out

Merge branch 'jc/maint-reset-unmerged-path' into maintJunio C Hamano Tue, 16 Aug 2011 18:41:28 +0000 (11:41 -0700)

Merge branch 'jc/maint-reset-unmerged-path' into maint

* jc/maint-reset-unmerged-path:
reset [<commit>] paths...: do not mishandle unmerged paths

Merge branch 'mz/doc-rebase-abort' into maintJunio C Hamano Tue, 16 Aug 2011 18:41:28 +0000 (11:41 -0700)

Merge branch 'mz/doc-rebase-abort' into maint

* mz/doc-rebase-abort:
rebase: clarify "restore the original branch"

Merge branch 'bw/log-all-ref-updates-doc' into maintJunio C Hamano Tue, 16 Aug 2011 18:41:28 +0000 (11:41 -0700)

Merge branch 'bw/log-all-ref-updates-doc' into maint

* bw/log-all-ref-updates-doc:
Documentation: clearly specify what refs are honored by core.logAllRefUpdates

Merge branch 'js/maint-add-path-stat-pwd' into maintJunio C Hamano Tue, 16 Aug 2011 18:41:27 +0000 (11:41 -0700)

Merge branch 'js/maint-add-path-stat-pwd' into maint

* js/maint-add-path-stat-pwd:
get_pwd_cwd(): Do not trust st_dev/st_ino blindly

Merge branch 'ms/help-unknown' into maintJunio C Hamano Tue, 16 Aug 2011 18:41:27 +0000 (11:41 -0700)

Merge branch 'ms/help-unknown' into maint

* ms/help-unknown:
help_unknown_cmd: do not propose an "unknown" cmd

Merge branch 'mz/doc-synopsis-verse' into maintJunio C Hamano Tue, 16 Aug 2011 18:41:26 +0000 (11:41 -0700)

Merge branch 'mz/doc-synopsis-verse' into maint

* mz/doc-synopsis-verse:
Documentation: use [verse] for SYNOPSIS sections

Merge branch 'jn/mime-type-with-params' into maintJunio C Hamano Tue, 16 Aug 2011 18:41:26 +0000 (11:41 -0700)

Merge branch 'jn/mime-type-with-params' into maint

* jn/mime-type-with-params:
gitweb: Serve */*+xml 'blob_plain' as text/plain with $prevent_xss
gitweb: Serve text/* 'blob_plain' as text/plain with $prevent_xss

Merge branch 'jc/submodule-sync-no-auto-vivify' into... Junio C Hamano Tue, 16 Aug 2011 18:41:26 +0000 (11:41 -0700)

Merge branch 'jc/submodule-sync-no-auto-vivify' into maint

* jc/submodule-sync-no-auto-vivify:
submodule add: always initialize .git/config entry
submodule sync: do not auto-vivify uninteresting submodule

Merge branch 'jc/zlib-wrap' into maintJunio C Hamano Tue, 16 Aug 2011 18:23:26 +0000 (11:23 -0700)

Merge branch 'jc/zlib-wrap' into maint

* jc/zlib-wrap:
zlib: allow feeding more than 4GB in one go
zlib: zlib can only process 4GB at a time
zlib: wrap deflateBound() too
zlib: wrap deflate side of the API
zlib: wrap inflateInit2 used to accept only for gzip format
zlib: wrap remaining calls to direct inflate/inflateEnd
zlib wrapper: refactor error message formatter

Merge branch 'fk/relink-upon-ldflags-update' into maintJunio C Hamano Tue, 16 Aug 2011 18:23:26 +0000 (11:23 -0700)

Merge branch 'fk/relink-upon-ldflags-update' into maint

* fk/relink-upon-ldflags-update:
Makefile: Track changes to LDFLAGS and relink when necessary

Merge branch 'bc/submodule-foreach-stdin-fix-1.7.4... Junio C Hamano Tue, 16 Aug 2011 18:23:26 +0000 (11:23 -0700)

Merge branch 'bc/submodule-foreach-stdin-fix-1.7.4' into maint

* bc/submodule-foreach-stdin-fix-1.7.4:
git-submodule.sh: preserve stdin for the command spawned by foreach
t/t7407: demonstrate that the command called by 'submodule foreach' loses stdin

Merge branch 'aw/rebase-i-p' into maintJunio C Hamano Tue, 16 Aug 2011 18:23:25 +0000 (11:23 -0700)

Merge branch 'aw/rebase-i-p' into maint

* aw/rebase-i-p:
rebase -i -p: include non-first-parent commits in todo list

Merge branch 'jc/diff-index-quick-exit-early' into... Junio C Hamano Tue, 16 Aug 2011 18:23:25 +0000 (11:23 -0700)

Merge branch 'jc/diff-index-quick-exit-early' into maint

* jc/diff-index-quick-exit-early:
diff-index --quiet: learn the "stop feeding the backend early" logic

Conflicts:
unpack-trees.h

Merge branch 'jk/combine-diff-binary-etc' into maintJunio C Hamano Tue, 16 Aug 2011 18:23:24 +0000 (11:23 -0700)

Merge branch 'jk/combine-diff-binary-etc' into maint

* jk/combine-diff-binary-etc:
combine-diff: respect textconv attributes
refactor get_textconv to not require diff_filespec
combine-diff: handle binary files as binary
combine-diff: calculate mode_differs earlier
combine-diff: split header printing into its own function

am: refresh the index at start and --resolvedJeff King Tue, 16 Aug 2011 00:13:07 +0000 (17:13 -0700)

am: refresh the index at start and --resolved

If a file is unchanged but stat-dirty, we may erroneously
fail to apply patches, thinking that they conflict with a
dirty working tree.

This patch adds a call to "update-index --refresh". It comes
as late as possible, so that we don't bother with it for
thinks like "git rebase --abort", or when mbox-splitting
fails. However, it does come before we actually start
applying patches, meaning we will only call it once when we
start applying patches (or any time we return to "am" after
having resolved conflicts), and not once per patch.

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

revert: plug memory leak in "cherry-pick root commit... Jonathan Nieder Sun, 14 Aug 2011 15:22:04 +0000 (10:22 -0500)

revert: plug memory leak in "cherry-pick root commit" codepath

The empty tree passed as common ancestor to merge_trees() when
cherry-picking a parentless commit is allocated on the heap and never
freed. Leaking such a small one-time allocation is not a very big
problem, but now that "git cherry-pick" can cherry-pick multiple
commits it can start to add up.

Avoid the leak by storing the fake tree exactly once in the BSS
section (i.e., use a static). While at it, let's add a test to make
sure cherry-picking multiple parentless commits continues to work.

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

ls-files: fix pathspec display on errorClemens Buchacher Mon, 1 Aug 2011 21:19:58 +0000 (23:19 +0200)

ls-files: fix pathspec display on error

The following sequence of commands reveals an issue with error
reporting of relative paths:

$ mkdir sub
$ cd sub
$ git ls-files --error-unmatch ../bbbbb
error: pathspec 'b' did not match any file(s) known to git.
$ git commit --error-unmatch ../bbbbb
error: pathspec 'b' did not match any file(s) known to git.

This bug is visible only if the normalized path (i.e., the relative
path from the repository root) is longer than the prefix.
Otherwise, the code skips over the normalized path and reads from
an unused memory location which still contains a leftover of the
original command line argument.

So instead, use the existing facilities to deal with relative paths
correctly.

Also fix inconsistency between "checkout" and "commit", e.g.

$ cd Documentation
$ git checkout nosuch.txt
error: pathspec 'Documentation/nosuch.txt' did not match...
$ git commit nosuch.txt
error: pathspec 'nosuch.txt' did not match...

by propagating the prefix down the codepath that reports the error.

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

describe: Refresh the index when run with --dirtyAllan Caffee Mon, 1 Aug 2011 01:52:41 +0000 (21:52 -0400)

describe: Refresh the index when run with --dirty

When running git describe --dirty the index should be refreshed. Previously
the cached index would cause describe to think that the index was dirty when,
in reality, it was just stale.

The issue was exposed by python setuptools which hardlinks files into another
directory when building a distribution.

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

test: consolidate definition of $LFJunio C Hamano Mon, 8 Aug 2011 18:51:00 +0000 (11:51 -0700)

test: consolidate definition of $LF

As we seem to need this variable that holds a single LF character
in many places, define it in test-lib.sh and let the test scripts
use it.

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

Tolerate zlib deflation with window size < 32KbRoberto Tyley Sun, 7 Aug 2011 18:46:13 +0000 (19:46 +0100)

Tolerate zlib deflation with window size < 32Kb

Git currently reports loose objects as 'corrupt' if they've been
deflated using a window size less than 32Kb, because the
experimental_loose_object() function doesn't recognise the header
byte as a zlib header. This patch makes the function tolerant of
all valid window sizes (15-bit to 8-bit) - but doesn't sacrifice
it's accuracy in distingushing the standard loose-object format
from the experimental (now abandoned) format.

On memory constrained systems zlib may use a much smaller window
size - working on Agit, I found that Android uses a 4KB window;
giving a header byte of 0x48, not 0x78. Consequently all loose
objects generated appear 'corrupt', which is why Agit is a read-only
Git client at this time - I don't want my client to generate Git
repos that other clients treat as broken :(

This patch makes Git tolerant of different deflate settings - it
might appear that it changes experimental_loose_object() to the point
where it could incorrectly identify the experimental format as the
standard one, but the two criteria (bitmask & checksum) can only
give a false result for an experimental object where both of the
following are true:

1) object size is exactly 8 bytes when uncompressed (bitmask)
2) [single-byte in-pack git type&size header] * 256
+ [1st byte of the following zlib header] % 31 = 0 (checksum)

As it happens, for all possible combinations of valid object type
(1-4) and window bits (0-7), the only time when the checksum will be
divisible by 31 is for 0x1838 - ie object type *1*, a Commit - which,
due the fields all Commit objects must contain, could never be as
small as 8 bytes in size.

Given this, the combination of the two criteria (bitmask & checksum)
always correctly determines the buffer format, and is more tolerant
than the previous version.

The alternative to this patch is simply removing support for the
experimental format, which I am also totally cool with.

References:

Android uses a 4KB window for deflation:
http://android.git.kernel.org/?p=platform/libcore.git;a=blob;f=luni/src/main/native/java_util_zip_Deflater.cpp;h=c0b2feff196e63a7b85d97cf9ae5bb2583409c28;hb=refs/heads/gingerbread#l53

Code snippet searching for false positives with the zlib checksum:
https://gist.github.com/1118177

Signed-off-by: Roberto Tyley <roberto.tyley@guardian.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

am: ignore leading whitespace before patchDavid Barr Mon, 8 Aug 2011 02:49:04 +0000 (04:49 +0200)

am: ignore leading whitespace before patch

Some web-based email clients prepend whitespace to raw message
transcripts to workaround content-sniffing in some browsers. Adjust
the patch format detection logic to ignore leading whitespace.

So now you can apply patches from GMail with "git am" in three steps:

1. choose "show original"
2. tell the browser to "save as" (for example by pressing Ctrl+S)
3. run "git am" on the saved file

This fixes a regression introduced by v1.6.4-rc0~15^2~2 (git-am
foreign patch support: autodetect some patch formats, 2009-05-27).
GMail support was first introduced to "git am" by v1.5.4-rc0~274^2
(Make mailsplit and mailinfo strip whitespace from the start of the
input, 2007-11-01).

Signed-off-by: David Barr <davidbarr@google.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>