gitweb.git
Git 1.7.1-rc0 v1.7.1-rc0Junio C Hamano Tue, 6 Apr 2010 22:00:01 +0000 (15:00 -0700)

Git 1.7.1-rc0

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

Merge branch 'da/maint-python-startup'Junio C Hamano Tue, 6 Apr 2010 21:50:47 +0000 (14:50 -0700)

Merge branch 'da/maint-python-startup'

* da/maint-python-startup:
Makefile: Remove usage of deprecated Python "has_key" method

Merge branch 'ic/bash-completion-rpm'Junio C Hamano Tue, 6 Apr 2010 21:50:47 +0000 (14:50 -0700)

Merge branch 'ic/bash-completion-rpm'

* ic/bash-completion-rpm:
RPM spec: include bash completion support

Merge branch 'sb/fmt-merge-msg'Junio C Hamano Tue, 6 Apr 2010 21:50:46 +0000 (14:50 -0700)

Merge branch 'sb/fmt-merge-msg'

* sb/fmt-merge-msg:
fmt-merge-msg: hide summary option
fmt-merge-msg: remove custom string_list implementation
string-list: add unsorted_string_list_lookup()
fmt-merge-msg: use pretty.c routines
t6200: test fmt-merge-msg more
t6200: modernize with test_tick
fmt-merge-msg: be quiet if nothing to merge

Merge branch 'jc/conflict-marker-size'Junio C Hamano Tue, 6 Apr 2010 21:50:46 +0000 (14:50 -0700)

Merge branch 'jc/conflict-marker-size'

* jc/conflict-marker-size:
diff --check: honor conflict-marker-size attribute

Merge branch 'ef/maint-empty-commit-log'Junio C Hamano Tue, 6 Apr 2010 21:50:46 +0000 (14:50 -0700)

Merge branch 'ef/maint-empty-commit-log'

* ef/maint-empty-commit-log:
rev-list: fix --pretty=oneline with empty message

Merge branch 'sg/bash-completion'Junio C Hamano Tue, 6 Apr 2010 21:50:45 +0000 (14:50 -0700)

Merge branch 'sg/bash-completion'

* sg/bash-completion:
bash: completion for gitk aliases
bash: support user-supplied completion scripts for aliases
bash: support user-supplied completion scripts for user's git commands
bash: improve aliased command recognition

Revert "Link against libiconv on IRIX"Junio C Hamano Mon, 5 Apr 2010 17:16:11 +0000 (10:16 -0700)

Revert "Link against libiconv on IRIX"

Brandon Casey reports:

Subject: Re: [PATCH] Link against libiconv on IRIX
Date: Mon, 05 Apr 2010 11:45:32 -0500
Message-Id: <1UypQMCHLT57SnjSQIM66RTkLalsvavG8xXoQJv4rEQ@cipher.nrlssc.navy.mil>

This breaks compilation on IRIX 6.5.29m for me since there
is no separate libiconv.so.

What version of IRIX are you using?

On my system, even the iconv utility doesn't link against
a libiconv shared object. It seems the iconv functionality is in libc.

# ldd /usr/bin/iconv
libc.so.1 => /usr/lib32/libc.so.1

Could it be that you are using a third party iconv library?
I've experienced this on another system and the problem was related
to curl. In that case, curl was linked against an external iconv and
not the native library, so if I tried to build with curl support, I had
to also build against the external iconv library.

While we wait for an improved solution, revert the regression caused by
21704227904b51197976c61c595b52d807677533.

Merge branch 'maint'Junio C Hamano Sun, 4 Apr 2010 17:23:21 +0000 (10:23 -0700)

Merge branch 'maint'

* maint:
pack-protocol.txt: fix pkt-line lengths
pack-protocol.txt: fix spelling

pack-protocol.txt: fix pkt-line lengthsTay Ray Chuan Sun, 4 Apr 2010 13:12:17 +0000 (21:12 +0800)

pack-protocol.txt: fix pkt-line lengths

Previously, the lengths were 4-bytes short. Fix it such that the lengths
reflect the total length of the pkt-line, as per spec.

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

pack-protocol.txt: fix spellingTay Ray Chuan Sun, 4 Apr 2010 13:12:16 +0000 (21:12 +0800)

pack-protocol.txt: fix spelling

s/paramater/parameter/.

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

Teach mailinfo %< as an alternative scissors markJonathan Nieder Sat, 3 Apr 2010 19:52:17 +0000 (14:52 -0500)

Teach mailinfo %< as an alternative scissors mark

Handle perforations found “in the wild” more robustly by recognizing
“%<” as an alternative scissors mark.

This feature is only meant to support old habits. Discourage new use
of the percent-based version by only documenting the 8< symbol so new
users’ perforations can still be recognized by old versions of Git.

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

Merge branch 'mb/rebase-i-no-ff'Junio C Hamano Sat, 3 Apr 2010 19:28:44 +0000 (12:28 -0700)

Merge branch 'mb/rebase-i-no-ff'

* mb/rebase-i-no-ff:
Teach rebase the --no-ff option.

Conflicts:
git-rebase--interactive.sh
t/t3404-rebase-interactive.sh

Merge branch 'sp/maint-http-backend-die-triggers-die... Junio C Hamano Sat, 3 Apr 2010 19:28:43 +0000 (12:28 -0700)

Merge branch 'sp/maint-http-backend-die-triggers-die-recursively'

* sp/maint-http-backend-die-triggers-die-recursively:
http-backend: Don't infinite loop during die()

Merge branch 'rr/imap-send-unconfuse-from-line'Junio C Hamano Sat, 3 Apr 2010 19:28:42 +0000 (12:28 -0700)

Merge branch 'rr/imap-send-unconfuse-from-line'

* rr/imap-send-unconfuse-from-line:
imap-send: Remove limitation on message body

Merge branch 'mg/use-default-abbrev-length-in-rev-list'Junio C Hamano Sat, 3 Apr 2010 19:28:42 +0000 (12:28 -0700)

Merge branch 'mg/use-default-abbrev-length-in-rev-list'

* mg/use-default-abbrev-length-in-rev-list:
rev-list: use default abbrev length when abbrev-commit is in effect

Merge branch 'mg/maint-send-email-lazy-editor'Junio C Hamano Sat, 3 Apr 2010 19:28:42 +0000 (12:28 -0700)

Merge branch 'mg/maint-send-email-lazy-editor'

* mg/maint-send-email-lazy-editor:
send-email: lazily assign editor variable

Merge branch 'rb/maint-python-path'Junio C Hamano Sat, 3 Apr 2010 19:28:41 +0000 (12:28 -0700)

Merge branch 'rb/maint-python-path'

* rb/maint-python-path:
Correct references to /usr/bin/python which does not exist on FreeBSD

Merge branch 'jn/merge-diff3-label'Junio C Hamano Sat, 3 Apr 2010 19:28:41 +0000 (12:28 -0700)

Merge branch 'jn/merge-diff3-label'

* jn/merge-diff3-label:
merge-recursive: add a label for ancestor
cherry-pick, revert: add a label for ancestor
revert: clarify label on conflict hunks
compat: add mempcpy()
checkout -m --conflict=diff3: add a label for ancestor
merge_trees(): add ancestor label parameter for diff3-style output
merge_file(): add comment explaining behavior wrt conflict style
checkout --conflict=diff3: add a label for ancestor
ll_merge(): add ancestor label parameter for diff3-style output
merge-file --diff3: add a label for ancestor
xdl_merge(): move file1 and file2 labels to xmparam structure
xdl_merge(): add optional ancestor label to diff3-style output
tests: document cherry-pick behavior in face of conflicts
tests: document format of conflicts from checkout -m

Conflicts:
builtin/revert.c

Merge branch 'ef/cherry-abbrev'Junio C Hamano Sat, 3 Apr 2010 19:28:40 +0000 (12:28 -0700)

Merge branch 'ef/cherry-abbrev'

* ef/cherry-abbrev:
ls: remove redundant logic
cherry: support --abbrev option

Merge branch 'bw/template-tool-buildconfig'Junio C Hamano Sat, 3 Apr 2010 19:28:40 +0000 (12:28 -0700)

Merge branch 'bw/template-tool-buildconfig'

* bw/template-tool-buildconfig:
Modernize git calling conventions in hook templates
Make templates honour SHELL_PATH and PERL_PATH

Merge branch 'mg/mailmap-update'Junio C Hamano Sat, 3 Apr 2010 19:28:40 +0000 (12:28 -0700)

Merge branch 'mg/mailmap-update'

* mg/mailmap-update:
.mailmap: Entries for Alex Bennée, Deskin Miller, Vitaly "_Vi" Shukela

Merge branch 'bc/t5505-fix'Junio C Hamano Sat, 3 Apr 2010 19:28:40 +0000 (12:28 -0700)

Merge branch 'bc/t5505-fix'

* bc/t5505-fix:
t/t5505-remote.sh: escape * to prevent interpretation by shell as glob
t5505: add missing &&
t5505: remove unnecessary subshell invocations

Merge branch 'gh/maint-stash-show-error-message'Junio C Hamano Sat, 3 Apr 2010 19:28:40 +0000 (12:28 -0700)

Merge branch 'gh/maint-stash-show-error-message'

* gh/maint-stash-show-error-message:
Improve error messages from 'git stash show'

Merge branch 'rs/threaded-grep-context'Junio C Hamano Sat, 3 Apr 2010 19:28:39 +0000 (12:28 -0700)

Merge branch 'rs/threaded-grep-context'

* rs/threaded-grep-context:
grep: enable threading for context line printing

Conflicts:
grep.c

Merge branch 'bc/maint-daemon-sans-ss-family'Junio C Hamano Sat, 3 Apr 2010 19:28:39 +0000 (12:28 -0700)

Merge branch 'bc/maint-daemon-sans-ss-family'

* bc/maint-daemon-sans-ss-family:
daemon.c: avoid accessing ss_family member of struct sockaddr_storage

Merge branch 'bc/acl-test'Junio C Hamano Sat, 3 Apr 2010 19:28:39 +0000 (12:28 -0700)

Merge branch 'bc/acl-test'

* bc/acl-test:
t/t1304: make a second colon optional in the mask ACL check
t/t1304: set the ACL effective rights mask
t/t1304: use 'test -r' to test readability rather than looking at mode bits
t/t1304: set the Default ACL base entries
t/t1304: avoid -d option to setfacl

Merge branch 'ja/send-email-ehlo'Junio C Hamano Sat, 3 Apr 2010 19:28:39 +0000 (12:28 -0700)

Merge branch 'ja/send-email-ehlo'

* ja/send-email-ehlo:
git-send-email.perl - try to give real name of the calling host to HELO/EHLO
git-send-email.perl: add option --smtp-debug
git-send-email.perl: improve error message in send_message()

Merge branch 'do/rebase-i-arbitrary'Junio C Hamano Sat, 3 Apr 2010 19:28:38 +0000 (12:28 -0700)

Merge branch 'do/rebase-i-arbitrary'

* do/rebase-i-arbitrary:
rebase--interactive: don't require what's rebased to be a branch

Conflicts:
t/t3404-rebase-interactive.sh

Merge branch 'ak/everyday-git'Junio C Hamano Sat, 3 Apr 2010 19:28:38 +0000 (12:28 -0700)

Merge branch 'ak/everyday-git'

* ak/everyday-git:
everyday: fsck and gc are not everyday operations

Makefile: future-proof Cygwin version checkJonathan Nieder Sat, 3 Apr 2010 07:47:00 +0000 (02:47 -0500)

Makefile: future-proof Cygwin version check

Tweak the condition that detects old Cygwin versions to not include
versions such as 1.8, 1.11, and 2.1.

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

Fix _XOPEN_SOURCE problem on DragonFlyYONETANI Tomokazu Fri, 2 Apr 2010 07:52:09 +0000 (16:52 +0900)

Fix _XOPEN_SOURCE problem on DragonFly

As on FreeBSD, defining _XOPEN_SOURCE to 600 on DragonFly BSD 2.4-RELEASE
or later hides symbols from programs, which leads to implicit declaration
of functions, making the return value to be assumed an int. On architectures
where sizeof(int) < sizeof(void *), this can cause unexpected behaviors or
crashes.
This change won't affect other OSes unless they define __DragonFly__ macro,
or older versions of DragonFly BSD as the current git code doesn't rely on
the features only available with _XOPEN_SOURCE set to 600 on DragonFly.

Signed-off-by: YONETANI Tomokazu <y0netan1@dragonflybsd.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

gitweb: update INSTALL to use shorter make targetMark Rada Sat, 3 Apr 2010 00:37:33 +0000 (20:37 -0400)

gitweb: update INSTALL to use shorter make target

Gitweb can be generated by the gitweb/gitweb.cgi target or the gitweb
target. Since the gitweb target is shorter, I think it would be better
to have new users be instructed to use it.

Signed-off-by: Mark Rada <marada@uwaterloo.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

gitweb: add documentation to INSTALL regarding gitweb.jsMark Rada Sat, 3 Apr 2010 00:36:44 +0000 (20:36 -0400)

gitweb: add documentation to INSTALL regarding gitweb.js

This patch updates gitweb/INSTALL to mention gitweb.js, including
JavaScript minification support.

Signed-off-by: Mark Rada <marada@uwaterloo.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

instaweb: add minification awarenessMark Rada Sat, 3 Apr 2010 00:40:33 +0000 (20:40 -0400)

instaweb: add minification awareness

This patch will cause git-instaweb to use the minified version of gitweb
support files (e.g. CSS and JavaScript) if they were generated.

Without minification awareness, generating the minified version of
gitweb's support files will generate a broken instaweb script since the
copy of gitweb.cgi will look for gitweb.min.* which will not exist.

Signed-off-by: Mark Rada <marada@uwaterloo.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Gitweb: add autoconfigure support for minifiersMark Rada Sat, 3 Apr 2010 00:35:54 +0000 (20:35 -0400)

Gitweb: add autoconfigure support for minifiers

This will allow users to set a JavaScript/CSS minifier when/if they run
the autoconfigure script while building git.

Signed-off-by: Mark Rada <marada@uwaterloo.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Gitweb: add support for minifying gitweb.cssMark Rada Sat, 3 Apr 2010 00:35:05 +0000 (20:35 -0400)

Gitweb: add support for minifying gitweb.css

The build system added support minifying gitweb.js through a
JavaScript minifier, but most minifiers come with support for
minifying CSS files as well, so we should use it if we can.

This patch will add the same facilities to gitweb.css that
gitweb.js has for minification. That does not mean that they
will use the same minifier though, as it is not safe to assume
that all JavaScript minifiers will also minify CSS files.

This patch also adds the GITWEB_PROGRAMS variable to the Makefile
to keep a list of potential gitweb dependencies separate from
OTHER_PROGRAMS when we need to know just the gitweb dependencies.

Though the bandwidth savings will not be as dramatic as with
the JavaScript minifier, every byte saved is important.

Signed-off-by: Mark Rada <marada@uwaterloo.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Gitweb: add ignore and clean rules for minified filesMark Rada Sat, 3 Apr 2010 00:33:55 +0000 (20:33 -0400)

Gitweb: add ignore and clean rules for minified files

Signed-off-by: Mark Rada <marada@uwaterloo.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

builtin/commit: remove unnecessary variable definitionMarkus Heidelberg Fri, 2 Apr 2010 12:27:19 +0000 (14:27 +0200)

builtin/commit: remove unnecessary variable definition

The file descriptor is already defined at the beginning of the function.

Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

builtin/commit: fix duplicated sentence in a commentMarkus Heidelberg Fri, 2 Apr 2010 12:27:18 +0000 (14:27 +0200)

builtin/commit: fix duplicated sentence in a comment

Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Integrate version 3 ciabot scripts into contrib/.Eric Raymond Fri, 2 Apr 2010 10:10:11 +0000 (06:10 -0400)

Integrate version 3 ciabot scripts into contrib/.

These have been extensively live-tested in the last week. The version 2
ciabot.sh maintainer has passed the baton to me; ciabot.py is original.

Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

diff: avoid useless filespec populationJeff King Fri, 2 Apr 2010 00:14:24 +0000 (20:14 -0400)

diff: avoid useless filespec population

builtin_diff calls fill_mmfile fairly early, which in turn
calls diff_populate_filespec, which actually retrieves the
file's blob contents into a buffer. Long ago, this was
sensible as we would need to look at the blobs eventually.

These days, however, we may not ever want those blobs if we
end up using a textconv cache, and for large binary files
(exactly the sort for which you might have a textconv
cache), just retrieving the objects can be costly.

This patch just pushes the fill_mmfile call a bit later, so
we can avoid populating the filespec in some cases. There
is one thing to note that looks like a bug but isn't. We
push the fill_mmfile down into the first branch of a
conditional. It seems like we would need it on the other
branch, too, but we don't; fill_textconv does it for us (in
fact, before this, we were just writing over the results of
the fill_mmfile on that branch).

Here's a timing sample on a commit with 45 changed jpgs and
avis. The result is fully textconv cached, but we still
wasted a lot of time just pulling the blobs from storage.
The total size of the blobs (source and dest) is about
180M.

[before]
$ time git show >/dev/null
real 0m0.352s
user 0m0.148s
sys 0m0.200s

[after]
$ time git show >/dev/null
real 0m0.009s
user 0m0.004s
sys 0m0.004s

And that's on a warm cache. On a cold cache, the "after"
case is not much worse, but the "before" case has to do an
extra 180M of I/O.

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

diff: cache textconv outputJeff King Fri, 2 Apr 2010 00:12:15 +0000 (20:12 -0400)

diff: cache textconv output

Running a textconv filter can take a long time. It's
particularly bad for a large file which needs to be spooled
to disk, but even for small files, the fork+exec overhead
can add up for something like "git log -p".

This patch uses the notes-cache mechanism to keep a fast
cache of textconv output. Caches are stored in
refs/notes/textconv/$x, where $x is the userdiff driver
defined in gitattributes.

Caching is enabled only if diff.$x.cachetextconv is true.

In my test repo, on a commit with 45 jpg and avi files
changed and a textconv to show their exif tags:

[before]
$ time git show >/dev/null
real 0m13.724s
user 0m12.057s
sys 0m1.624s

[after, first run]
$ git config diff.mfo.cachetextconv true
$ time git show >/dev/null
real 0m14.252s
user 0m12.197s
sys 0m1.800s

[after, subsequent runs]
$ time git show >/dev/null
real 0m0.352s
user 0m0.148s
sys 0m0.200s

So for a slight (3.8%) cost on the first run, we achieve an
almost 40x speed up on subsequent runs.

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

textconv: refactor calls to run_textconvJeff King Fri, 2 Apr 2010 00:09:26 +0000 (20:09 -0400)

textconv: refactor calls to run_textconv

This patch adds a fill_textconv wrapper, which centralizes
some minor logic like error checking and handling the case
of no-textconv.

In addition to dropping the number of lines, this will make
it easier in future patches to handle multiple types of
textconv.

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

introduce notes-cache interfaceJeff King Fri, 2 Apr 2010 00:07:40 +0000 (20:07 -0400)

introduce notes-cache interface

Notes provide a fast lookup mechanism for data keyed by
sha1. This is ideal for caching certain operations, like
textconv filters.

This patch builds some infrastructure to make it simpler to
use notes trees as caches. In particular, caches:

1. don't have arbitrary commit messages. They store a
cache validity string in the commit, and clear the tree
when the cache validity string changes.

2. don't keep any commit history. The accumulated history
of a a cache is just useless cruft.

3. use a looser form of locking for ref updates. If two
processes try to write to the cache simultaneously, it
is OK if one overwrites the other, losing some changes.
It's just a cache, so we will just end up with an extra
miss.

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

make commit_tree a library functionJeff King Fri, 2 Apr 2010 00:05:23 +0000 (20:05 -0400)

make commit_tree a library function

Until now, this has been part of the commit-tree builtin.
However, it is already used by other builtins (like commit,
merge, and notes), and it would be useful to access it from
library code.

The check_valid helper has to come along, too, but is given
a more library-ish name of "assert_sha1_type".

Otherwise, the code is unchanged. There are still a few
rough edges for a library function, like printing the utf8
warning to stderr, but we can address those if and when they
come up as inappropriate.

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

fix textconv leak in emit_rewrite_diffJeff King Fri, 2 Apr 2010 00:04:14 +0000 (20:04 -0400)

fix textconv leak in emit_rewrite_diff

We correctly free() for the normal diff case, but leak for
rewrite diffs.

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

fix const-correctness of write_sha1_fileJeff King Fri, 2 Apr 2010 00:03:18 +0000 (20:03 -0400)

fix const-correctness of write_sha1_file

These should take const buffers as input data, but zlib's
next_in pointer is not const-correct. Let's fix it at the
zlib level, though, so the cast happens in one obvious
place. This should be safe, as a similar cast is used in
zlib's example code for a const array.

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

Makefile: update defaults for modern CygwinEric Blake Thu, 1 Apr 2010 22:43:54 +0000 (16:43 -0600)

Makefile: update defaults for modern Cygwin

Now that Cygwin 1.7.x has enabled lots of new features, and Cygwin 1.5
is no longer actively supported by the Cygwin mailing lists, we might
as well update the defaults to cater to those new features.

NO_TRUSTABLE_FILEMODE is only necessary on FAT drives; the Cygwin
community recommends NTFS drives, but there is still too much use
for FAT to switch the default. Likewise, UNRELIABLE_FSTAT is probably
file-system specific, but worth keeping unchanged.

This commit does not change the default for NO_MMAP, although definitive
proof of whether this option is necessary is lacking.

Signed-off-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Prompt for a username when an HTTP request 401sScott Chacon Thu, 1 Apr 2010 22:14:35 +0000 (15:14 -0700)

Prompt for a username when an HTTP request 401s

When an HTTP request returns a 401, Git will currently fail with a
confusing message saying that it got a 401, which is not very
descriptive.

Currently if a user wants to use Git over HTTP, they have to use one
URL with the username in the URL (e.g. "http://user@host.com/repo.git")
for write access and another without the username for unauthenticated
read access (unless they want to be prompted for the password each
time). However, since the HTTP servers will return a 401 if an action
requires authentication, we can prompt for username and password if we
see this, allowing us to use a single URL for both purposes.

This patch changes http_request to prompt for the username and password,
then return HTTP_REAUTH so http_get_strbuf can try again. If it gets
a 401 even when a user/pass is supplied, http_request will now return
HTTP_NOAUTH which remote_curl can then use to display a more
intelligent error message that is less confusing.

Signed-off-by: Scott Chacon <schacon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Sync with 1.7.0.4Junio C Hamano Wed, 31 Mar 2010 22:14:27 +0000 (15:14 -0700)

Sync with 1.7.0.4

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

Git 1.7.0.4 v1.7.0.4Junio C Hamano Wed, 31 Mar 2010 22:12:08 +0000 (15:12 -0700)

Git 1.7.0.4

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

Merge branch 'jc/maint-refs-dangling' into maintJunio C Hamano Wed, 31 Mar 2010 22:09:32 +0000 (15:09 -0700)

Merge branch 'jc/maint-refs-dangling' into maint

* jc/maint-refs-dangling:
refs: ref entry with NULL sha1 is can be a dangling symref

Documentation: show-ref <pattern>s are optionalHolger Weiß Mon, 29 Mar 2010 11:02:37 +0000 (13:02 +0200)

Documentation: show-ref <pattern>s are optional

Specifying one or more <pattern> parameters is optional when calling
show-ref, so mark them as such using brackets in the manual.

Signed-off-by: Holger Weiß <holger@zedat.fu-berlin.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Link against libiconv on IRIXHolger Weiß Mon, 29 Mar 2010 10:57:48 +0000 (12:57 +0200)

Link against libiconv on IRIX

On IRIX, "-liconv" must be added to the linker command line in order to
get iconv(3) support; set the according Makefile variable appropriately.

Signed-off-by: Holger Weiß <holger@zedat.fu-berlin.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Don't redefine htonl and ntohl on big-endianHolger Weiß Mon, 29 Mar 2010 10:22:19 +0000 (12:22 +0200)

Don't redefine htonl and ntohl on big-endian

Since commit 0fcabdeb52b79775173d009ccc179db104dfbb66, compat/bswap.h
redefined htonl and ntohl to bswap32 not only if bswap32 has been
defined earlier in compat/bswap.h (which is done only on selected
platforms), but also if bswap32 has been defined anywhere else. This
broke Git at least for NetBSD systems running on big-endian machines
(where ntohl and htonl should, of course, be NOOPs), since NetBSD
defines a bswap32 macro in the system headers.

So, we now undefine any previously defined bswap32 in compat/bswap.h
before defining our own.

Signed-off-by: Holger Weiß <holger@zedat.fu-berlin.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

gitweb: git_get_project_config requires only $git_dir... Jakub Narebski Sat, 27 Mar 2010 19:26:59 +0000 (20:26 +0100)

gitweb: git_get_project_config requires only $git_dir, not also $project

Fix overeager early return in git_get_project_config, introduced in 9be3614
(gitweb: Fix project-specific feature override behavior, 2010-03-01). When
git_get_project_config is called from projects list page via
git_get_project_owner($path) etc., it is called with $git_dir defined (in
git_get_project_owner($path) etc.), but $project variable is not defined.
git_get_project_config doesn't use $project variable anyway.

Reported-by: Tobias Heinlein <keytoaster@gentoo.org>
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Updated the usage string of git resetJan Stępień Wed, 31 Mar 2010 09:24:19 +0000 (11:24 +0200)

Updated the usage string of git reset

Make git reset usage string reflect the command's behaviour and contents of
the man page.

Signed-off-by: Jan Stępień <jstepien@users.sourceforge.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation: Clarify support for smart HTTP backendGreg Bacon Tue, 30 Mar 2010 17:20:57 +0000 (12:20 -0500)

Documentation: Clarify support for smart HTTP backend

In the description of http.getanyfile, replace the vague "older Git
clients" with the earliest release whose client is able to use the
upload pack service.

Signed-off-by: Greg Bacon <gbacon@dbresearch.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Windows: fix utime() for read-only filesJohannes Sixt Tue, 30 Mar 2010 07:46:23 +0000 (09:46 +0200)

Windows: fix utime() for read-only files

Starting with 5256b00 (Use git_mkstemp_mode instead of plain mkstemp to
create object files, 2010-02-22) utime() is invoked on read-only files.
This is not allowed on Windows and results in many warnings of the form

failed utime() on .git/objects/23/tmp_obj_VlgHlc: Permission denied

during a repack. Fix it by making the file temporarily writable.

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

diff: fix textconv error zombiesJohannes Sixt Tue, 30 Mar 2010 17:36:03 +0000 (19:36 +0200)

diff: fix textconv error zombies

To make the code simpler, run_textconv lumps all of its
error checking into one conditional. However, the
short-circuit means that an error in reading will prevent us
from calling finish_command, leaving a zombie child.
Clean up properly after errors.

Based-on-work-by: Jeff King <peff@peff.net>
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint'Junio C Hamano Tue, 30 Mar 2010 04:29:24 +0000 (21:29 -0700)

Merge branch 'maint'

* maint:
format-patch: Squelch 'fatal: Not a range." error

format-patch: Squelch 'fatal: Not a range." errorKevin Ballard Tue, 30 Mar 2010 02:46:38 +0000 (19:46 -0700)

format-patch: Squelch 'fatal: Not a range." error

Don't output an error on `git format-patch --ignore-if-in-upstream HEAD`.
This matches the behavior of `git format-patch HEAD`.

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

refs.c: Write reflogs for notes just like for branch... Michael J Gruber Mon, 29 Mar 2010 13:05:58 +0000 (15:05 +0200)

refs.c: Write reflogs for notes just like for branch heads

The notes code intends to write reflog entries, but currently they are
not written because log_ref_write() checks for the refname path
explicitly.

Add refs/notes to the list of allowed paths so that notes references are
treated just like branch heads, i.e. according to core.logAllRefUpdates
and core.bare.

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

t3301-notes: Test the creation of reflog entriesMichael J Gruber Mon, 29 Mar 2010 13:05:57 +0000 (15:05 +0200)

t3301-notes: Test the creation of reflog entries

Test whether the notes code writes reflog entries. It intends to
(setting up the reflog messages) but currently does not.

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

RPM spec: include bash completion supportIan Ward Comfort Fri, 26 Mar 2010 08:39:57 +0000 (01:39 -0700)

RPM spec: include bash completion support

Include the bash completion routines from the contrib/ directory in our core
RPM, in the de facto standard location.

Signed-off-by: Ian Ward Comfort <icomfort@stanford.edu>
Acked-by: Ben Walton <bwalton@artsci.utoronto.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Update draft release notes to 1.7.1Junio C Hamano Mon, 29 Mar 2010 04:57:59 +0000 (21:57 -0700)

Update draft release notes to 1.7.1

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

Merge branch 'cc/cherry-pick-ff'Junio C Hamano Mon, 29 Mar 2010 04:52:28 +0000 (21:52 -0700)

Merge branch 'cc/cherry-pick-ff'

* cc/cherry-pick-ff:
revert: fix tiny memory leak in cherry-pick --ff
rebase -i: use new --ff cherry-pick option
Documentation: describe new cherry-pick --ff option
cherry-pick: add tests for new --ff option
revert: add --ff option to allow fast forward when cherry-picking
builtin/merge: make checkout_fast_forward() non static
parse-options: add parse_options_concat() to concat options

Merge branch 'sb/notes-parse-opt'Junio C Hamano Mon, 29 Mar 2010 04:52:28 +0000 (21:52 -0700)

Merge branch 'sb/notes-parse-opt'

* sb/notes-parse-opt:
notes: rework subcommands and parse options

Conflicts:
builtin/notes.c

Merge branch 'maint'Junio C Hamano Mon, 29 Mar 2010 04:52:18 +0000 (21:52 -0700)

Merge branch 'maint'

* maint:
Prepare for 1.7.0.4

Conflicts:
RelNotes

Makefile: Remove usage of deprecated Python "has_key... David Aguilar Sun, 28 Mar 2010 00:45:12 +0000 (17:45 -0700)

Makefile: Remove usage of deprecated Python "has_key" method

"has_key" is a deprecated dictionary method in Python 2.6+.
Simplify the sys.path manipulation for installed scripts by
passing a default value to os.getenv() that takes a default
value to be used when the environment variable is missing.

SCRIPT_PYTHON is currently empty but this future-proofs us.
It also fixes things for users who maintain local git forks
with their own SCRIPT_PYTHON additions.

Old code replaced the first element of sys.path[] which is
typically '' (i.e. import library files relative to the script).
It is safer to prepend the extra library path instead.

Signed-off-by: David Aguilar <davvid@gmail.com>
Acked-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

rebase -i: make post-rewrite work for 'edit'Thomas Rast Sun, 28 Mar 2010 19:36:00 +0000 (21:36 +0200)

rebase -i: make post-rewrite work for 'edit'

The post-rewrite support, in the form of the call to
'record_in_rewritten', was hidden in the arm where we have to record a
new commit for the user. This meant that it was never invoked in the
case where the user has already amended the commit by herself.

[The test is designed to exercise both arms of the 'if' in question.]

Furthermore, recording the stopped-sha (the SHA1 of the commit before
the editing) suffered from a cut&paste error from die_with_patch and
used the wrong variable, hence it never recorded anything.

Noticed by Junio.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Prepare for 1.7.0.4Junio C Hamano Mon, 29 Mar 2010 04:32:25 +0000 (21:32 -0700)

Prepare for 1.7.0.4

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

Merge branch 'cp/add-u-pathspec' into maintJunio C Hamano Mon, 29 Mar 2010 04:21:42 +0000 (21:21 -0700)

Merge branch 'cp/add-u-pathspec' into maint

* cp/add-u-pathspec:
test for add with non-existent pathspec
git add -u: die on unmatched pathspec

Merge branch 'maint'Junio C Hamano Mon, 29 Mar 2010 00:42:58 +0000 (17:42 -0700)

Merge branch 'maint'

* maint:
t9350: fix careless use of "cd"
difftool: Fix '--gui' when diff.guitool is unconfigured
fast-export: don't segfault when marks file cannot be opened

t9350: fix careless use of "cd"Junio C Hamano Mon, 29 Mar 2010 00:42:11 +0000 (17:42 -0700)

t9350: fix careless use of "cd"

Upon failure of any of these tests (or when a test that is marked as
expecting a failure is fixed), we will end up running later tests in
random places.

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

Remove a redundant errno test in a usage of remove_pathPeter Collingbourne Fri, 26 Mar 2010 15:25:35 +0000 (15:25 +0000)

Remove a redundant errno test in a usage of remove_path

The errno test is redundant because the same test is carried
out in remove_path itself.

Signed-off-by: Peter Collingbourne <peter@pcc.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Introduce remove_or_warn functionPeter Collingbourne Fri, 26 Mar 2010 15:25:34 +0000 (15:25 +0000)

Introduce remove_or_warn function

This patch introduces the remove_or_warn function which is a
generalised version of the {unlink,rmdir}_or_warn functions. It takes
an additional parameter indicating the mode of the file to be removed.

The patch also modifies certain functions to use remove_or_warn
where appropriate, and adds a test case for a bug fixed by the use
of remove_or_warn.

Signed-off-by: Peter Collingbourne <peter@pcc.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Implement the rmdir_or_warn functionPeter Collingbourne Fri, 26 Mar 2010 15:25:33 +0000 (15:25 +0000)

Implement the rmdir_or_warn function

This patch implements an rmdir_or_warn function (like unlink_or_warn
but for directories) that uses the generalised warning code in
warn_if_unremovable.

Signed-off-by: Peter Collingbourne <peter@pcc.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Generalise the unlink_or_warn functionPeter Collingbourne Fri, 26 Mar 2010 15:25:32 +0000 (15:25 +0000)

Generalise the unlink_or_warn function

This patch moves the warning code of the unlink_or_warn function into
a separate function named warn_if_unremovable so that it may be reused.

Signed-off-by: Peter Collingbourne <peter@pcc.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

difftool: Fix '--gui' when diff.guitool is unconfiguredDavid Aguilar Sat, 27 Mar 2010 21:58:09 +0000 (14:58 -0700)

difftool: Fix '--gui' when diff.guitool is unconfigured

When diff.guitool is unconfigured and "--gui" is specified
git-difftool dies with the following error message:

config diff.guitool: command returned error: 1

Catch the error so that the "--gui" flag is a no-op when
diff.guitool is unconfigured.

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

fast-export: don't segfault when marks file cannot... Sverre Rabbelier Sun, 28 Mar 2010 05:42:48 +0000 (00:42 -0500)

fast-export: don't segfault when marks file cannot be opened

The error function only prints an error message, resulting in a
segfault if we later on try to fprintf to a NULL handle.

Fix this by using die_errno instead.

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

imap-send: suppress warning about cleartext password... Chris Webb Sat, 27 Mar 2010 15:00:19 +0000 (15:00 +0000)

imap-send: suppress warning about cleartext password with CRAM-MD5

If a CRAM-MD5 challenge-response is used to authenticate to the IMAP server,
git imap-send shouldn't warn about the password being sent in the clear.

Signed-off-by: Chris Webb <chris@arachsys.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

send-email: lazily assign editor variableMichael J Gruber Mon, 22 Mar 2010 16:12:53 +0000 (17:12 +0100)

send-email: lazily assign editor variable

b4479f0 (add -i, send-email, svn, p4, etc: use "git var GIT_EDITOR",
2009-10-30) introduced the use of "git var GIT_EDITOR" to obtain the
preferred editor program, instead of reading environment variables
themselves.

However, "git var GIT_EDITOR" run without a tty (think "cron job") would
give a fatal error "Terminal is dumb, but EDITOR unset". This is not a
problem for add-i, svn, p4 and callers of git_editor() defined in
git-sh-setup, as all of these call it just before launching the editor.
At that point, we know the caller wants to edit.

But send-email ran this near the beginning of the program, even if it is
not going to use any editor (e.g. run without --compose). Fix this by
calling the command only when we edit a file.

Reported-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

fmt-merge-msg: hide summary optionStephen Boyd Wed, 24 Mar 2010 07:16:04 +0000 (00:16 -0700)

fmt-merge-msg: hide summary option

The --summary command line option has been deprecated in favor of --log.
Hide the option from the help message to further discourage the use of
this option.

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

fmt-merge-msg: remove custom string_list implementationStephen Boyd Wed, 24 Mar 2010 07:16:03 +0000 (00:16 -0700)

fmt-merge-msg: remove custom string_list implementation

This command uses a custom version of string list when it could
just as easily use the string_list API. Convert it to use string_list
and reduce the code size a bit.

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

string-list: add unsorted_string_list_lookup()Stephen Boyd Wed, 24 Mar 2010 07:16:02 +0000 (00:16 -0700)

string-list: add unsorted_string_list_lookup()

Sometimes users need to lookup a string in an unsorted string_list. In
that case they should use this function instead of the version for
sorted strings.

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

fmt-merge-msg: use pretty.c routinesStephen Boyd Wed, 24 Mar 2010 07:16:01 +0000 (00:16 -0700)

fmt-merge-msg: use pretty.c routines

This command duplicates functionality of the '%s' pretty format.
Simplify the code a bit by using the pretty printing routine
instead of open-coding it here.

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t6200: test fmt-merge-msg moreStephen Boyd Wed, 24 Mar 2010 07:16:00 +0000 (00:16 -0700)

t6200: test fmt-merge-msg more

Add some more tests so we don't break behavior upon modernizing
fmt-merge-msg.

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t6200: modernize with test_tickStephen Boyd Wed, 24 Mar 2010 07:15:59 +0000 (00:15 -0700)

t6200: modernize with test_tick

This test defines its own version of test_tick. Get rid of it.

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

fmt-merge-msg: be quiet if nothing to mergeStephen Boyd Wed, 24 Mar 2010 07:15:58 +0000 (00:15 -0700)

fmt-merge-msg: be quiet if nothing to merge

When FETCH_HEAD contains only 'not-for-merge' entries fmt-merge-msg
still outputs "Merge" (and if the branch isn't master " into <branch>").
In this case fmt-merge-msg is outputting junk and should really just
be quiet. Fix it.

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

diff --check: honor conflict-marker-size attributeJunio C Hamano Thu, 25 Mar 2010 02:21:32 +0000 (19:21 -0700)

diff --check: honor conflict-marker-size attribute

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

Merge branch 'jh/maint-submodule-status-in-void'Junio C Hamano Wed, 24 Mar 2010 23:55:37 +0000 (16:55 -0700)

Merge branch 'jh/maint-submodule-status-in-void'

* jh/maint-submodule-status-in-void:
git submodule summary: Handle HEAD as argument when on an unborn branch
submodule summary: do not fail before the first commit

Merge branch 'tr/notes-display'Junio C Hamano Wed, 24 Mar 2010 23:26:43 +0000 (16:26 -0700)

Merge branch 'tr/notes-display'

* tr/notes-display:
git-notes(1): add a section about the meaning of history
notes: track whether notes_trees were changed at all
notes: add shorthand --ref to override GIT_NOTES_REF
commit --amend: copy notes to the new commit
rebase: support automatic notes copying
notes: implement helpers needed for note copying during rewrite
notes: implement 'git notes copy --stdin'
rebase -i: invoke post-rewrite hook
rebase: invoke post-rewrite hook
commit --amend: invoke post-rewrite hook
Documentation: document post-rewrite hook
Support showing notes from more than one notes tree
test-lib: unset GIT_NOTES_REF to stop it from influencing tests

Conflicts:
git-am.sh
refs.c

Merge branch 'jl/submodule-diff-dirtiness'Junio C Hamano Wed, 24 Mar 2010 23:25:43 +0000 (16:25 -0700)

Merge branch 'jl/submodule-diff-dirtiness'

* jl/submodule-diff-dirtiness:
git status: ignoring untracked files must apply to submodules too
git status: Fix false positive "new commits" output for dirty submodules
Refactor dirty submodule detection in diff-lib.c
git status: Show detailed dirty status of submodules in long format
git diff --submodule: Show detailed dirty status of submodules

Merge branch 'pb/log-first-parent-p-m'Junio C Hamano Wed, 24 Mar 2010 23:25:39 +0000 (16:25 -0700)

Merge branch 'pb/log-first-parent-p-m'

* pb/log-first-parent-p-m:
show --first-parent/-m: do not default to --cc
show -c: show patch text
revision: introduce setup_revision_opt
t4013: add tests for log -p -m --first-parent
git log -p -m: document -m and honor --first-parent

Merge branch 'jc/maint-refs-dangling'Junio C Hamano Wed, 24 Mar 2010 23:25:34 +0000 (16:25 -0700)

Merge branch 'jc/maint-refs-dangling'

* jc/maint-refs-dangling:
refs: ref entry with NULL sha1 is can be a dangling symref

Merge branch 'maint'Junio C Hamano Wed, 24 Mar 2010 23:24:21 +0000 (16:24 -0700)

Merge branch 'maint'

* maint:
Documentation: explain the meaning of "-g" in git-describe output

Merge branch 'jc/color-attrs' into maintJunio C Hamano Wed, 24 Mar 2010 23:24:13 +0000 (16:24 -0700)

Merge branch 'jc/color-attrs' into maint

* jc/color-attrs:
color: allow multiple attributes

Merge branch 'jk/maint-add-ignored-dir' into maintJunio C Hamano Wed, 24 Mar 2010 23:24:03 +0000 (16:24 -0700)

Merge branch 'jk/maint-add-ignored-dir' into maint

* jk/maint-add-ignored-dir:
tests for "git add ignored-dir/file" without -f
dir: fix COLLECT_IGNORED on excluded prefixes
t0050: mark non-working test as such