gitweb.git
Git 1.7.1.3 v1.7.1.3Junio C Hamano Thu, 2 Dec 2010 20:18:49 +0000 (12:18 -0800)

Git 1.7.1.3

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

Git 1.7.0.8 v1.7.0.8Junio C Hamano Thu, 2 Dec 2010 20:06:06 +0000 (12:06 -0800)

Git 1.7.0.8

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

Documentation: Fix mark-up of lines with more than... Junio C Hamano Thu, 2 Dec 2010 19:23:50 +0000 (11:23 -0800)

Documentation: Fix mark-up of lines with more than one tilde

The manual pages of cherry-pick and revert had examples with two revisions
on the same line in the examples section, that looked like this:

git cherry-pick master~4 master~2::

Unfortunately, this is taken as a mark-up to make the part between two
tildes, "4 master", subscript. Use {tilde} to make it explicit that we
do want ~ characters in these places (backslash does not help).

Reported-by: Sylvain Rabot <sylvain.rabot@f-secure.com>
Helped-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'cb/maint-orphan-merge-noclobber' into... Junio C Hamano Thu, 2 Dec 2010 19:27:13 +0000 (11:27 -0800)

Merge branch 'cb/maint-orphan-merge-noclobber' into maint

* cb/maint-orphan-merge-noclobber:
do not overwrite untracked during merge from unborn branch

Merge branch 'jk/add-e-doc' into maintJunio C Hamano Thu, 2 Dec 2010 19:27:08 +0000 (11:27 -0800)

Merge branch 'jk/add-e-doc' into maint

* jk/add-e-doc:
docs: give more hints about how "add -e" works
docs: give more hints about how "add -e" works

Merge branch 'bg/maint-gitweb-test-lib' into maintJunio C Hamano Thu, 2 Dec 2010 19:26:49 +0000 (11:26 -0800)

Merge branch 'bg/maint-gitweb-test-lib' into maint

* bg/maint-gitweb-test-lib:
t/gitweb-lib: Don't pass constant to decode_utf8

Merge branch 'tr/maint-merge-file-subdir' into maintJunio C Hamano Thu, 2 Dec 2010 19:26:40 +0000 (11:26 -0800)

Merge branch 'tr/maint-merge-file-subdir' into maint

* tr/maint-merge-file-subdir:
merge-file: correctly find files when called in subdir
prefix_filename(): safely handle the case where pfx_len=0

Merge branch 'ks/no-textconv-symlink' into maintJunio C Hamano Thu, 2 Dec 2010 19:26:24 +0000 (11:26 -0800)

Merge branch 'ks/no-textconv-symlink' into maint

* ks/no-textconv-symlink:
blame,cat-file --textconv: Don't assume mode is ``S_IFREF | 0664''
blame,cat-file: Demonstrate --textconv is wrongly running converter on symlinks
blame,cat-file: Prepare --textconv tests for correctly-failing conversion program

Merge branch 'bc/fortran-userdiff' into maintJunio C Hamano Thu, 2 Dec 2010 19:25:36 +0000 (11:25 -0800)

Merge branch 'bc/fortran-userdiff' into maint

* bc/fortran-userdiff:
userdiff.c: add builtin fortran regex patterns

Merge branch 'maint'Junio C Hamano Thu, 2 Dec 2010 00:41:13 +0000 (16:41 -0800)

Merge branch 'maint'

* maint:
add: introduce add.ignoreerrors synonym for add.ignore-errors
bash: Match lightweight tags in prompt
git-commit.txt: (synopsis): move -i and -o before "--"

Merge branch 'maint-1.7.2' into maintJunio C Hamano Thu, 2 Dec 2010 00:40:26 +0000 (16:40 -0800)

Merge branch 'maint-1.7.2' into maint

* maint-1.7.2:
add: introduce add.ignoreerrors synonym for add.ignore-errors
bash: Match lightweight tags in prompt
git-commit.txt: (synopsis): move -i and -o before "--"

Merge branch 'maint-1.7.1' into maint-1.7.2Junio C Hamano Thu, 2 Dec 2010 00:40:20 +0000 (16:40 -0800)

Merge branch 'maint-1.7.1' into maint-1.7.2

* maint-1.7.1:
add: introduce add.ignoreerrors synonym for add.ignore-errors

Merge branch 'maint-1.7.0' into maint-1.7.1Junio C Hamano Thu, 2 Dec 2010 00:37:34 +0000 (16:37 -0800)

Merge branch 'maint-1.7.0' into maint-1.7.1

* maint-1.7.0:
add: introduce add.ignoreerrors synonym for add.ignore-errors

Make the tab width used for whitespace checks configurableJohannes Sixt Tue, 30 Nov 2010 08:29:11 +0000 (09:29 +0100)

Make the tab width used for whitespace checks configurable

A new whitespace "rule" is added that sets the tab width to use for
whitespace checks and fix-ups and replaces the hard-coded constant 8.

Since the setting is part of the rules, it can be set per file using
.gitattributes.

The new configuration is backwards compatible because older git versions
simply ignore unknown whitespace rules.

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

Merge branch 'js/maint-apply-tab-in-indent-fix' into... Junio C Hamano Wed, 1 Dec 2010 22:42:00 +0000 (14:42 -0800)

Merge branch 'js/maint-apply-tab-in-indent-fix' into HEAD

* js/maint-apply-tab-in-indent-fix:
apply --whitespace=fix: fix tab-in-indent

apply --whitespace=fix: fix tab-in-indentJohannes Sixt Tue, 30 Nov 2010 08:22:04 +0000 (09:22 +0100)

apply --whitespace=fix: fix tab-in-indent

When the whitespace rule tab-in-indent is enabled, apply --whitespace=fix
replaces tabs by the appropriate amount of blanks. The code used
"dst->len % 8" as the criterion to stop adding blanks. But it forgot that
dst holds more than just the current line. Consequently, the modulus was
computed correctly only for the first added line, but not for the second
and subsequent lines. Fix it.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Acked-by: Chris Webb <chris@arachsys.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

add: introduce add.ignoreerrors synonym for add.ignore... Jonathan Nieder Wed, 1 Dec 2010 18:36:15 +0000 (12:36 -0600)

add: introduce add.ignoreerrors synonym for add.ignore-errors

The "[add] ignore-errors" tweakable introduced by v1.5.6-rc0~30^2 (Add
a config option to ignore errors for git-add, 2008-05-12) does not
follow the usual convention for naming values in the git configuration
file.

What convention? Glad you asked.

The section name indicates the affected subsystem.

The subsection name, if any, indicates which of
an unbound set of things to set the value for.

The variable name describes the effect of tweaking
this knob.

The section and variable names can be broken into
words using bumpyCaps in documentation as a hint to
the reader. These word breaks are not significant
at the level of code, since the section and variable
names are not case sensitive.

The name "add.ignore-errors" includes a dash, meaning a naive
configuration file like

[add]
ignoreErrors

does not have any effect. Avoid such confusion by renaming to the
more consistent add.ignoreErrors, but keep the old version for
backwards compatibility.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

fast-import: Allow cat-blob requests at arbitrary point... Jonathan Nieder Sun, 28 Nov 2010 19:45:58 +0000 (13:45 -0600)

fast-import: Allow cat-blob requests at arbitrary points in stream

The new rule: a "cat-blob" can be inserted wherever a comment is
allowed, which means at the start of any line except in the middle of
a "data" command.

This saves frontends from having to loop over everything they want to
commit in the next commit and cat-ing the necessary objects in
advance.

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

fast-import: let importers retrieve blobsDavid Barr Sun, 28 Nov 2010 19:45:01 +0000 (13:45 -0600)

fast-import: let importers retrieve blobs

New objects written by fast-import are not available immediately.
Until a checkpoint has been started and finishes writing the pack
index, any new blobs will not be accessible using standard git tools.

So introduce a new way to access them: a "cat-blob" command in the
command stream requests for fast-import to print a blob to stdout or a
file descriptor specified by the argument to --cat-blob-fd. The value
for cat-blob-fd cannot be specified in the stream because that would
be a layering violation: the decision of where to direct a stream has
to be made when fast-import is started anyway, so we might as well
make the stream format is independent of that detail.

Output uses the same format as "git cat-file --batch".

Thanks to Sverre Rabbelier and Sam Vilain for guidance in designing
the protocol.

Based-on-patch-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: David Barr <david.barr@cordelta.com>
Acked-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

fast-import: clarify documentation of "feature" commandJonathan Nieder Sun, 28 Nov 2010 19:43:57 +0000 (13:43 -0600)

fast-import: clarify documentation of "feature" command

The "feature" command allows streams to specify options for the import
that must not be ignored. Logically, they are part of the stream,
even though technically most supported features are synonyms to
command-line options.

Make this more obvious by being more explicit about how the analogy
between most "feature" commands and command-line options works. Treat
the feature (import-marks) that does not fit this analogy separately.

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

fast-import: stricter parsing of integer optionsJonathan Nieder Sun, 28 Nov 2010 19:42:46 +0000 (13:42 -0600)

fast-import: stricter parsing of integer options

Check the result from strtoul to avoid accepting arguments like
--depth=-1 and --active-branches=foo,bar,baz.

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

commit.c: Remove backward goto in read_craft_line()Ralf Thielow Wed, 1 Dec 2010 19:15:59 +0000 (20:15 +0100)

commit.c: Remove backward goto in read_craft_line()

Bad graft data is noticed in several places in read_graft_line(), and in
each case we go back to the first site of detection. It in general is a
better style to have an exception handling out of line from the main
codepath and make error codepath jump forward.

Signed-off-by: Ralf Thielow <ralf.thielow@googlemail.com>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

bash: Match lightweight tags in promptknittl Wed, 1 Dec 2010 13:17:00 +0000 (14:17 +0100)

bash: Match lightweight tags in prompt

The bash prompt would display a commit's object name when having checked
out a lightweight tag. Provide `--tags` to `git describe` in the completion
script, so it will display lightweight tag names, as it already does for
annotated tags.

Signed-off-by: Daniel Knittl-Frank <knittl89+git@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-commit.txt: (synopsis): move -i and -o before "--"Jari Aalto Wed, 1 Dec 2010 14:51:25 +0000 (16:51 +0200)

git-commit.txt: (synopsis): move -i and -o before "--"

All options, including -i and -o, must come before "--" which is the
end of options marker.

Reported-by: Joey Hess <joey@kitenet.net>
Signed-off-by: Jari Aalto <jari.aalto@cante.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Revert "excluded_1(): support exclude files in index"Nguyễn Thái Ngọc Duy Fri, 26 Nov 2010 18:17:47 +0000 (01:17 +0700)

Revert "excluded_1(): support exclude files in index"

This reverts commit c84de70781674a35b9bfd20aa5bc8c47582615df.
The commit provided a workaround for matching directories in
index. But it is no longer needed.

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

unpack-trees: fix sparse checkout's "unable to match... Nguyễn Thái Ngọc Duy Fri, 26 Nov 2010 18:17:46 +0000 (01:17 +0700)

unpack-trees: fix sparse checkout's "unable to match directories"

Matching index entries against an excludes file currently has two
problems.

First, there's no function to do it. Code paths (like sparse
checkout) that wanted to try it would iterate over index entries and
for each index entry pass that path to excluded_from_list(). But that
is not how excluded_from_list() works; one is supposed to feed in each
ancester of a path before a given path to find out if it was excluded
because of some parent or grandparent matching a

bigsubdirectory/

pattern despite the path not matching any .gitignore pattern directly.

Second, it's inefficient. The excludes mechanism is supposed to let
us block off vast swaths of the filesystem as uninteresting; separately
checking every index entry doesn't fit that model.

Introduce a new function to take care of both these problems. This
traverses the index in depth-first order (well, that's what order the
index is in) to mark un-excluded entries.

Maybe some day the in-core index format will be restructured to make
this sort of operation easier. Or maybe we will want to try some
binary search based thing. The interface is simple enough to allow
all those things. Example:

clear_ce_flags(the_index.cache, the_index.cache_nr,
CE_CANDIDATE, CE_CLEARME, exclude_list);

would clear the CE_CLEARME flag on all index entries with
CE_CANDIDATE flag and not matched by exclude_list.

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

Merge branch 'cb/leading-path-removal'Junio C Hamano Tue, 30 Nov 2010 01:52:36 +0000 (17:52 -0800)

Merge branch 'cb/leading-path-removal'

* cb/leading-path-removal:
use persistent memory for rejected paths
do not overwrite files in leading path
lstat_cache: optionally return match_len
add function check_ok_to_remove()
t7607: add leading-path tests
t7607: use test-lib functions and check MERGE_HEAD

Conflicts:
t/t7607-merge-overwrite.sh

Merge branch 'en/merge-recursive'Junio C Hamano Tue, 30 Nov 2010 01:52:35 +0000 (17:52 -0800)

Merge branch 'en/merge-recursive'

* en/merge-recursive: (41 commits)
t6022: Use -eq not = to test output of wc -l
merge-recursive:make_room_for_directories - work around dumb compilers
merge-recursive: Remove redundant path clearing for D/F conflicts
merge-recursive: Make room for directories in D/F conflicts
handle_delete_modify(): Check whether D/F conflicts are still present
merge_content(): Check whether D/F conflicts are still present
conflict_rename_rename_1to2(): Fix checks for presence of D/F conflicts
conflict_rename_delete(): Check whether D/F conflicts are still present
merge-recursive: Delay modify/delete conflicts if D/F conflict present
merge-recursive: Delay content merging for renames
merge-recursive: Delay handling of rename/delete conflicts
merge-recursive: Move handling of double rename of one file to other file
merge-recursive: Move handling of double rename of one file to two
merge-recursive: Avoid doubly merging rename/add conflict contents
merge-recursive: Update merge_content() call signature
merge-recursive: Update conflict_rename_rename_1to2() call signature
merge-recursive: Structure process_df_entry() to handle more cases
merge-recursive: Have process_entry() skip D/F or rename entries
merge-recursive: New function to assist resolving renames in-core only
merge-recursive: New data structures for deferring of D/F conflicts
...

Conflicts:
t/t6020-merge-df.sh
t/t6036-recursive-corner-cases.sh

Merge branch 'jl/clone-recurse-sm-synonym'Junio C Hamano Tue, 30 Nov 2010 01:52:34 +0000 (17:52 -0800)

Merge branch 'jl/clone-recurse-sm-synonym'

* jl/clone-recurse-sm-synonym:
clone: Add the --recurse-submodules option as alias for --recursive

Merge branch 'jn/cherry-pick-refresh-index'Junio C Hamano Tue, 30 Nov 2010 01:52:34 +0000 (17:52 -0800)

Merge branch 'jn/cherry-pick-refresh-index'

* jn/cherry-pick-refresh-index:
cherry-pick/revert: transparently refresh index

Merge branch 'jc/emfile'Junio C Hamano Tue, 30 Nov 2010 01:52:34 +0000 (17:52 -0800)

Merge branch 'jc/emfile'

* jc/emfile:
A loose object is not corrupt if it cannot be read due to EMFILE
read_sha1_file(): report correct name of packfile with a corrupt object

Merge branch 'md/interix'Junio C Hamano Tue, 30 Nov 2010 01:52:34 +0000 (17:52 -0800)

Merge branch 'md/interix'

* md/interix:
Interix: add configure checks
add support for the SUA layer (interix; windows)

Conflicts:
git-compat-util.h

Merge branch 'jl/add-p-reverse-message'Junio C Hamano Tue, 30 Nov 2010 01:52:34 +0000 (17:52 -0800)

Merge branch 'jl/add-p-reverse-message'

* jl/add-p-reverse-message:
Correct help blurb in checkout -p and friends

Merge branch 'np/pack-broken-boundary'Junio C Hamano Tue, 30 Nov 2010 01:52:33 +0000 (17:52 -0800)

Merge branch 'np/pack-broken-boundary'

* np/pack-broken-boundary:
make pack-objects a bit more resilient to repo corruption

Merge branch 'np/diff-in-corrupt-repository'Junio C Hamano Tue, 30 Nov 2010 01:52:33 +0000 (17:52 -0800)

Merge branch 'np/diff-in-corrupt-repository'

* np/diff-in-corrupt-repository:
diff: don't presume empty file when corresponding object is missing

Merge branch 'fc/apply-p2-get-header-name'Junio C Hamano Tue, 30 Nov 2010 01:52:33 +0000 (17:52 -0800)

Merge branch 'fc/apply-p2-get-header-name'

* fc/apply-p2-get-header-name:
test: git-apply -p2 rename/chmod only
Fix git-apply with -p greater than 1

Merge branch 'jn/fast-import-fix'Junio C Hamano Tue, 30 Nov 2010 01:52:32 +0000 (17:52 -0800)

Merge branch 'jn/fast-import-fix'

* jn/fast-import-fix:
fast-import: do not clear notes in do_change_note_fanout()
t9300 (fast-import): another test for the "replace root" feature
fast-import: tighten M 040000 syntax
fast-import: filemodify after M 040000 <tree> "" crashes

Merge branch 'rr/needs-clean-work-tree'Junio C Hamano Tue, 30 Nov 2010 01:52:32 +0000 (17:52 -0800)

Merge branch 'rr/needs-clean-work-tree'

* rr/needs-clean-work-tree:
Porcelain scripts: Rewrite cryptic "needs update" error message

Merge branch 'kb/blame-author-email'Junio C Hamano Tue, 30 Nov 2010 01:52:32 +0000 (17:52 -0800)

Merge branch 'kb/blame-author-email'

* kb/blame-author-email:
blame: Add option to show author email instead of name

Conflicts:
t/annotate-tests.sh

Merge branch 'cm/diff-check-at-eol'Junio C Hamano Tue, 30 Nov 2010 01:52:31 +0000 (17:52 -0800)

Merge branch 'cm/diff-check-at-eol'

* cm/diff-check-at-eol:
diff --check: correct line numbers of new blank lines at EOF

Merge branch 'ak/apply-non-git-epoch'Junio C Hamano Tue, 30 Nov 2010 01:52:31 +0000 (17:52 -0800)

Merge branch 'ak/apply-non-git-epoch'

* ak/apply-non-git-epoch:
apply: handle patches with funny filename and colon in timezone
apply: Recognize epoch timestamps with : in the timezone

Merge branch 'tc/smart-http-post-redirect'Junio C Hamano Tue, 30 Nov 2010 01:52:30 +0000 (17:52 -0800)

Merge branch 'tc/smart-http-post-redirect'

* tc/smart-http-post-redirect:
smart-http: Don't change POST to GET when following redirect

gitweb: document $per_request_config betterJonathan Nieder Mon, 29 Nov 2010 00:19:08 +0000 (18:19 -0600)

gitweb: document $per_request_config better

Global variables $my_url, $my_uri and $base_url have subtle interactions
that need to be desribed, and can be influenced most cleanly by
$per_request_config.

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

gitweb: selectable configurations that change with... Jakub Narebski Thu, 25 Nov 2010 18:43:59 +0000 (19:43 +0100)

gitweb: selectable configurations that change with each request

Allow selecting whether configuration file should be (re)parsed on each
request (the default, for backward compatibility with configurations that
change per session, see commit 7f425db (gitweb: allow configurations that
change with each request, 2010-07-30)), or whether should it be parsed only
once (for performance speedup for persistent environments, though currently
only FastCGI is able to make use of it, when flexibility is not important).

You can also have configuration file parsed only once, but have parts of
configuration (re)evaluated once per each request.

This is done by introducing $per_request_config variable: if set to code
reference, this code would be run once per request, while config file would
be parsed only once. For example gitolite's contrib/gitweb/gitweb.conf
fragment mentioned in 7f425db could be rewritten as

our $per_request_config = sub {
$ENV{GL_USER} = ($cgi && $cgi->remote_user) || "gitweb";
};

to make use of this feature.

If $per_request_config is not a code reference, it is taken to be boolean
variable, to choose between running config file for each request
(flexibility), and running config file only once (performance in
persistent environments).

The default value for $per_request_config is 1 (true), which means that
old configuration that require to change per session (like gitolite's)
will keep working.

While at it, make it so evaluate_git_version() is run only once.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

cvsimport: partial whitespace cleanupMichael J Gruber Sun, 28 Nov 2010 19:39:45 +0000 (20:39 +0100)

cvsimport: partial whitespace cleanup

in preparation of the config parse patch

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

diff: add --detect-copies-harder as a synonym for ... Kevin Ballard Mon, 29 Nov 2010 22:52:59 +0000 (14:52 -0800)

diff: add --detect-copies-harder as a synonym for --find-copies-harder

Signed-off-by: Kevin Ballard <kevin@sb.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

status: show branchname with a configurable colorAleksi Aalto Wed, 17 Nov 2010 23:40:05 +0000 (01:40 +0200)

status: show branchname with a configurable color

You can tell "git status" to paint the name of the current branch in its
output (the line that says "On branch ...") by setting the configuration
variable color.status.branch; it is by default turned off.

Signed-off-by: Aleksi Aalto <aga@iki.fi>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Use reflog in 'pull --rebase . foo'Martin von Zweigbergk Sat, 13 Nov 2010 22:58:22 +0000 (23:58 +0100)

Use reflog in 'pull --rebase . foo'

Since c85c792 (pull --rebase: be cleverer with rebased upstream
branches, 2008-01-26), "git pull --rebase" has used the reflog to try to
rebase from the old upstream onto the new upstream.

Make this work if the local repository is explicitly passed on the
command line as in 'git pull --rebase . foo'.

Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Acked-by: Santi Béjar <santi@agolina.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

rebase: only show stat if configured to trueMartin von Zweigbergk Tue, 9 Nov 2010 20:59:00 +0000 (21:59 +0100)

rebase: only show stat if configured to true

If rebase.stat is set to true, a diffstat should be displayed. If it is
not set, it should default to false. However, if it is explicitly set to
false (or other value), a diffstat is still displayed, which is probably
not what most users would expect. Show diffstat only if it is set
to true.

Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

entry.c: remove "checkout-index" from error messagesNguyễn Thái Ngọc Duy Sun, 28 Nov 2010 04:36:38 +0000 (11:36 +0700)

entry.c: remove "checkout-index" from error messages

Back then when entry.c was part of checkout-index (or checkout-cache
at that time [1]). It makes sense to print the command name in error
messages. Nowadays entry.c is in libgit and can be used by any
commands, printing "git checkout-index: blah" does no more than
confusion. The error messages without it still give enough information.

[1] 12dccc1 (Make fiel checkout function available to the git library - 2005-06-05)

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

commit: Add commit_list prefix in two function names.Thiago Farina Sat, 27 Nov 2010 01:58:14 +0000 (23:58 -0200)

commit: Add commit_list prefix in two function names.

Add commit_list prefix to insert_by_date function and to sort_by_date,
so it's clear that these functions refer to commit_list structure.

Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

unpack-trees: move all skip-worktree checks back to... Nguyễn Thái Ngọc Duy Sat, 27 Nov 2010 06:24:04 +0000 (13:24 +0700)

unpack-trees: move all skip-worktree checks back to unpack_trees()

Earlier, the will_have_skip_worktree() checks are done in various
places, which makes it hard to traverse the index tree-alike, required
by excluded_from_list(). This patch moves all the checks into two
loops in unpack_trees().

Entries in index in this operation can be classified into two
groups: ones already in index before unpack_trees() is called and ones
added to index after traverse_trees() is called.

In both groups, before checking file status on worktree, the future
skip-worktree bit must be checked, so that if an entry will be outside
worktree, worktree should not be checked.

For the first group, the future skip-worktree bit is precomputed and
stored as CE_NEW_SKIP_WORKTREE in the first loop before
traverse_trees() is called so that *way_merge() function does not need
to compute it again.

For the second group, because we don't know what entries will be in
this group until traverse_trees() finishes, operations that need
future skip-worktree check is delayed until CE_NEW_SKIP_WORKTREE is
computed in the second loop. CE_ADDED is used to mark entries in the
second group.

CE_ADDED and CE_NEW_SKIP_WORKTREE are temporary flags used in
unpack_trees(). CE_ADDED is only used by add_to_index(), which should
not be called while unpack_trees() is running.

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

dir.c: add free_excludes()Nguyễn Thái Ngọc Duy Fri, 26 Nov 2010 18:17:44 +0000 (01:17 +0700)

dir.c: add free_excludes()

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

cache.h: realign and use (1 << x) form for CE_* constantsNguyễn Thái Ngọc Duy Sat, 27 Nov 2010 06:22:16 +0000 (13:22 +0700)

cache.h: realign and use (1 << x) form for CE_* constants

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

git-rev-parse.txt: clarify --git-dirJonathan Nieder Fri, 26 Nov 2010 15:32:31 +0000 (22:32 +0700)

git-rev-parse.txt: clarify --git-dir

The current behavior is often to print an absolute path rather than
a ../../etc string, but callers must be ready to accept a relative
path, too. The most common output is ".git" (from the toplevel of
an ordinary work tree).

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

t1510: setup case #31Nguyễn Thái Ngọc Duy Fri, 26 Nov 2010 15:32:30 +0000 (22:32 +0700)

t1510: setup case #31

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

t1510: setup case #30Nguyễn Thái Ngọc Duy Fri, 26 Nov 2010 15:32:29 +0000 (22:32 +0700)

t1510: setup case #30

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

t1510: setup case #29Nguyễn Thái Ngọc Duy Fri, 26 Nov 2010 15:32:28 +0000 (22:32 +0700)

t1510: setup case #29

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

t1510: setup case #28Nguyễn Thái Ngọc Duy Fri, 26 Nov 2010 15:32:27 +0000 (22:32 +0700)

t1510: setup case #28

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

t1510: setup case #27Nguyễn Thái Ngọc Duy Fri, 26 Nov 2010 15:32:26 +0000 (22:32 +0700)

t1510: setup case #27

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

t1510: setup case #26Nguyễn Thái Ngọc Duy Fri, 26 Nov 2010 15:32:25 +0000 (22:32 +0700)

t1510: setup case #26

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

t1510: setup case #25Nguyễn Thái Ngọc Duy Fri, 26 Nov 2010 15:32:24 +0000 (22:32 +0700)

t1510: setup case #25

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

t1510: setup case #24Nguyễn Thái Ngọc Duy Fri, 26 Nov 2010 15:32:23 +0000 (22:32 +0700)

t1510: setup case #24

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

t1510: setup case #23Nguyễn Thái Ngọc Duy Fri, 26 Nov 2010 15:32:22 +0000 (22:32 +0700)

t1510: setup case #23

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

t1510: setup case #22Nguyễn Thái Ngọc Duy Fri, 26 Nov 2010 15:32:21 +0000 (22:32 +0700)

t1510: setup case #22

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

t1510: setup case #21Nguyễn Thái Ngọc Duy Fri, 26 Nov 2010 15:32:20 +0000 (22:32 +0700)

t1510: setup case #21

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

t1510: setup case #20Nguyễn Thái Ngọc Duy Fri, 26 Nov 2010 15:32:19 +0000 (22:32 +0700)

t1510: setup case #20

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

t1510: setup case #19Nguyễn Thái Ngọc Duy Fri, 26 Nov 2010 15:32:18 +0000 (22:32 +0700)

t1510: setup case #19

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

t1510: setup case #18Nguyễn Thái Ngọc Duy Fri, 26 Nov 2010 15:32:17 +0000 (22:32 +0700)

t1510: setup case #18

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

t1510: setup case #17Nguyễn Thái Ngọc Duy Fri, 26 Nov 2010 15:32:16 +0000 (22:32 +0700)

t1510: setup case #17

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

t1510: setup case #16Nguyễn Thái Ngọc Duy Fri, 26 Nov 2010 15:32:15 +0000 (22:32 +0700)

t1510: setup case #16

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

t1510: setup case #15Nguyễn Thái Ngọc Duy Fri, 26 Nov 2010 15:32:14 +0000 (22:32 +0700)

t1510: setup case #15

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

t1510: setup case #14Nguyễn Thái Ngọc Duy Fri, 26 Nov 2010 15:32:13 +0000 (22:32 +0700)

t1510: setup case #14

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

t1510: setup case #13Nguyễn Thái Ngọc Duy Fri, 26 Nov 2010 15:32:12 +0000 (22:32 +0700)

t1510: setup case #13

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

t1510: setup case #12Nguyễn Thái Ngọc Duy Fri, 26 Nov 2010 15:32:11 +0000 (22:32 +0700)

t1510: setup case #12

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

t1510: setup case #11Nguyễn Thái Ngọc Duy Fri, 26 Nov 2010 15:32:10 +0000 (22:32 +0700)

t1510: setup case #11

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

t1510: setup case #10Nguyễn Thái Ngọc Duy Fri, 26 Nov 2010 15:32:09 +0000 (22:32 +0700)

t1510: setup case #10

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

t1510: setup case #9Nguyễn Thái Ngọc Duy Fri, 26 Nov 2010 15:32:08 +0000 (22:32 +0700)

t1510: setup case #9

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

t1510: setup case #8Nguyễn Thái Ngọc Duy Fri, 26 Nov 2010 15:32:07 +0000 (22:32 +0700)

t1510: setup case #8

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

t1510: setup case #7Nguyễn Thái Ngọc Duy Fri, 26 Nov 2010 15:32:06 +0000 (22:32 +0700)

t1510: setup case #7

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

t1510: setup case #6Nguyễn Thái Ngọc Duy Fri, 26 Nov 2010 15:32:05 +0000 (22:32 +0700)

t1510: setup case #6

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

t1510: setup case #5Nguyễn Thái Ngọc Duy Fri, 26 Nov 2010 15:32:04 +0000 (22:32 +0700)

t1510: setup case #5

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

t1510: setup case #4Nguyễn Thái Ngọc Duy Fri, 26 Nov 2010 15:32:03 +0000 (22:32 +0700)

t1510: setup case #4

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

t1510: setup case #3Nguyễn Thái Ngọc Duy Fri, 26 Nov 2010 15:32:02 +0000 (22:32 +0700)

t1510: setup case #3

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

t1510: setup case #2Nguyễn Thái Ngọc Duy Fri, 26 Nov 2010 15:32:01 +0000 (22:32 +0700)

t1510: setup case #2

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

t1510: setup case #1Nguyễn Thái Ngọc Duy Fri, 26 Nov 2010 15:32:00 +0000 (22:32 +0700)

t1510: setup case #1

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

t1510: setup case #0Nguyễn Thái Ngọc Duy Fri, 26 Nov 2010 15:31:59 +0000 (22:31 +0700)

t1510: setup case #0

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

Add t1510 and basic rules that run repo setupNguyễn Thái Ngọc Duy Fri, 26 Nov 2010 15:31:58 +0000 (22:31 +0700)

Add t1510 and basic rules that run repo setup

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

builtins: print setup info if repo is foundNguyễn Thái Ngọc Duy Fri, 26 Nov 2010 15:31:57 +0000 (22:31 +0700)

builtins: print setup info if repo is found

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

http-fetch: rework url handlingTay Ray Chuan Thu, 25 Nov 2010 08:21:10 +0000 (16:21 +0800)

http-fetch: rework url handling

Do away with a second url variable, rewritten_url, and make url
non-const. This is safe because the functions called with url (ie.
get_http_walker() and walker_fetch()) do not modify it (ie. marked with
const char *).

Also, replace code that adds a trailing slash with a call to
str_end_url_with_slash().

Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

http-push: add trailing slash at arg-parse time, instea... Tay Ray Chuan Thu, 25 Nov 2010 08:21:09 +0000 (16:21 +0800)

http-push: add trailing slash at arg-parse time, instead of later on

That way, we don't have to update repo->path and repo->path_len again
after adding the trailing slash.

Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

http-push: check path length before using itTay Ray Chuan Thu, 25 Nov 2010 08:21:08 +0000 (16:21 +0800)

http-push: check path length before using it

We use path_len to skip the base url/path, but we do not know for sure
if path does indeed contain the base url/path. Check if this is so.

Helped-by: Johnathan Nieder <jrnieder@gmail.com>
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

http-push: Normalise directory names when pushing to... Tay Ray Chuan Thu, 25 Nov 2010 08:21:07 +0000 (16:21 +0800)

http-push: Normalise directory names when pushing to some WebDAV servers

Fix a bug when pushing to WebDAV servers which do not use a trailing
slash for collection names. The previous implementation fails to see
that the requested resource "refs/" is the same resource as "refs"
and loads every reference twice (once for refs/ and once for refs).

This implementation normalises every collection name by appending a
trailing slash if necessary.

This can be tested with old versions of Apache (such as the WebDAV
server of GMX, Apache 2.0.63).

Based-on-patch-by: Gabriel Corona <gabriel.corona@enst-bretagne.fr>
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

http-backend: use end_url_with_slash()Tay Ray Chuan Thu, 25 Nov 2010 08:21:06 +0000 (16:21 +0800)

http-backend: use end_url_with_slash()

Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

url: add str wrapper for end_url_with_slash()Tay Ray Chuan Thu, 25 Nov 2010 08:21:05 +0000 (16:21 +0800)

url: add str wrapper for end_url_with_slash()

Helped-by: Johnathan Nieder <jrnieder@gmail.com>
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

shift end_url_with_slash() from http.[ch] to url.[ch]Tay Ray Chuan Thu, 25 Nov 2010 08:21:04 +0000 (16:21 +0800)

shift end_url_with_slash() from http.[ch] to url.[ch]

This allows non-http/curl users to access it too (eg. http-backend.c).

Update include headers in end_url_with_slash() users too.

Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t5550-http-fetch: add test for http-fetchTay Ray Chuan Thu, 25 Nov 2010 08:21:03 +0000 (16:21 +0800)

t5550-http-fetch: add test for http-fetch

Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t5550-http-fetch: add missing '&&'Tay Ray Chuan Thu, 25 Nov 2010 08:21:02 +0000 (16:21 +0800)

t5550-http-fetch: add missing '&&'

Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'en/and-cascade-tests'Junio C Hamano Fri, 26 Nov 2010 22:45:37 +0000 (14:45 -0800)

Merge branch 'en/and-cascade-tests'

* en/and-cascade-tests:
t7300: add a missing SYMLINKS prerequisite

t7300: add a missing SYMLINKS prerequisiteJohannes Sixt Thu, 25 Nov 2010 08:03:39 +0000 (09:03 +0100)

t7300: add a missing SYMLINKS prerequisite

The test fails on Windows since 2dec68c (tests: add missing &&, batch 2).

Even though this test allocates and leaves behind files, subsequent tests
do not depend on this, so it is safe to just skip it.

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