gitweb.git
add --porcelain option to git-pushLarry D'Anna Tue, 23 Jun 2009 01:10:01 +0000 (21:10 -0400)

add --porcelain option to git-push

If --porcelain is used git-push will produce machine-readable output. The
output status line for each ref will be tab-separated and sent to stdout instead
of stderr. The full symbolic names of the refs will be given. For example

$ git push --dry-run --porcelain master :foobar 2>/dev/null \
| perl -pe 's/\t/ TAB /g'

= TAB refs/heads/master:refs/heads/master TAB [up to date]
- TAB :refs/heads/foobar TAB [deleted]

Signed-off-by: Larry D'Anna <larry@elder-gods.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge git://git.bogomips.org/git-svnJunio C Hamano Sun, 28 Jun 2009 03:09:04 +0000 (20:09 -0700)

Merge git://git.bogomips.org/git-svn

* git://git.bogomips.org/git-svn:
git svn: Doc update for multiple branch and tag paths
git svn: cleanup t9138-multiple-branches
git-svn: Canonicalize svn urls to prevent libsvn assertion
t9138: remove stray dot in test which broke bash
git-svn: convert globs to regexps for branch destinations
git svn: Support multiple branch and tag paths in the svn repository.
Add 'git svn reset' to unwind 'git svn fetch'
git-svn: speed up find_rev_before
Add 'git svn help [cmd]' which works outside a repo.
git-svn: let 'dcommit $rev' work on $rev instead of HEAD

git svn: Doc update for multiple branch and tag pathsMarc Branchaud Fri, 26 Jun 2009 20:49:19 +0000 (16:49 -0400)

git svn: Doc update for multiple branch and tag paths

Signed-off-by: Marc Branchaud <marcnarc@xiplink.com>
Acked-by: Eric Wong <normalperson@yhbt.net>

git svn: cleanup t9138-multiple-branchesMarc Branchaud Fri, 26 Jun 2009 21:08:19 +0000 (17:08 -0400)

git svn: cleanup t9138-multiple-branches

Using the "svn_cmd" wrapper instead of "svn" alone allows tests
to run consistently for users with customized
~/.subversion/configs. Additionally, using subshells via
"(cd ...)" allow cleaner and less error-prone tests to
be written.

[ew: expanded commit message]

Signed-off-by: Marc Branchaud <marcnarc@xiplink.com>
Acked-by: Eric Wong <normalperson@yhbt.net>

Merge branch 'pb/send-email-cccmd-fix'Junio C Hamano Sat, 27 Jun 2009 21:13:43 +0000 (14:13 -0700)

Merge branch 'pb/send-email-cccmd-fix'

* pb/send-email-cccmd-fix:
t/t9001-send-email.sh: ensure generated script is executed with $SHELL_PATH

read-tree: migrate to parse-optionsStephen Boyd Fri, 26 Jun 2009 05:14:10 +0000 (22:14 -0700)

read-tree: migrate to parse-options

Cleanup the documentation to explicitly state that --exclude-directory
is only meaningful when used with -u. Also make the documentation more
consistent with the usage message printed with read-tree --help-all.

The -m, --prefix, --reset options are performing similar actions
(setting some flags, read_cache_unmerged(), checking for illegal option
combinations). Instead of performing these actions when the options are
parsed, we delay performing them until after parse-opts has finished.

The bit fields in struct unpack_trees_options have been promoted to full
unsigned ints. This is necessary to avoid "foo ? 1 : 0" constructs to
set these fields.

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

read-tree: convert unhelpful usage()'s to helpful die()'sStephen Boyd Fri, 26 Jun 2009 05:14:09 +0000 (22:14 -0700)

read-tree: convert unhelpful usage()'s to helpful die()'s

Printing the usage message when encountering bad option combinations is
not very helpful. Instead, die with a message which tells the user
exactly what combination is invalid.

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

fast-export: Document the fact that git-rev-list argume... Elijah Newren Fri, 26 Jun 2009 04:48:33 +0000 (22:48 -0600)

fast-export: Document the fact that git-rev-list arguments are accepted

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Add new fast-export testcasesElijah Newren Fri, 26 Jun 2009 04:48:32 +0000 (22:48 -0600)

Add new fast-export testcases

The testcases test the new --tag-of-filtered-object option, the output
when limiting what to export by path, and test behavior when no
exact-ref revision is included (e.g. master~8 present on command line
but not master).

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

fast-export: Add a --tag-of-filtered-object option... Elijah Newren Fri, 26 Jun 2009 04:48:31 +0000 (22:48 -0600)

fast-export: Add a --tag-of-filtered-object option for newly dangling tags

When providing a list of paths to limit what is exported, the object that
a tag points to can be filtered out entirely. This new switch allows
the user to specify what should happen to the tag in such a case. The
default action, 'abort' will exit with an error message. With 'drop', the
tag will simply be omitted from the output. With 'rewrite', if the object
tagged was a commit, the tag will be modified to tag an alternate commit.
The alternate commit is determined by treating the original commit as the
"parent" of the tag and then using the parent rewriting algorithm of the
revision traversal machinery (related to the "--parents" option of "git
rev-list")

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

fast-export: Do parent rewriting to avoid dropping... Elijah Newren Fri, 26 Jun 2009 04:48:30 +0000 (22:48 -0600)

fast-export: Do parent rewriting to avoid dropping relevant commits

When specifying paths to export, parent rewriting must be turned on for
fast-export to output anything at all.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

fast-export: Make sure we show actual ref names instead... Elijah Newren Fri, 26 Jun 2009 04:48:29 +0000 (22:48 -0600)

fast-export: Make sure we show actual ref names instead of "(null)"

The code expects a ref name to be provided in commit->util. While there
was some code to set commit->util, it only worked in cases where there was
an unbroken chain of revisions from a ref to the relevant commit. In
cases such as running
git fast-export --parents master -- COPYING
commit->util would fail to be set. The old method of setting commit->util
has been removed in favor of requesting show_source from the revision
traversal machinery (related to the "--source" option of "git log" family
of commands.)

However, this change does not fix cases like
git fast export master~1
or
git fast export :/arguments
since in such cases commit->util will be "master~1" or ":/arguments" while
we need the actual ref (e.g. "refs/heads/master")

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

fast-export: Omit tags that tag treesElijah Newren Fri, 26 Jun 2009 04:48:28 +0000 (22:48 -0600)

fast-export: Omit tags that tag trees

Commit c0582c53bcf4e83bba70e1ad23abbad31f96ebc8 introduced logic to just
omit tags that point to tree objects. However, these objects were still
being output and were pointing at "mark :0", which caused fast-import to
crash. This patch makes sure such tags (including deeper nestings such
as tags of tags of trees), are omitted.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

fast-export: Set revs.topo_order before calling setup_r... Elijah Newren Fri, 26 Jun 2009 04:48:27 +0000 (22:48 -0600)

fast-export: Set revs.topo_order before calling setup_revisions

setup_revisions sets a variety of flags based on the setting of other
flags, such as setting the limited flag when topo_order is set. To avoid
circumventing any invariants created by setup_revisions, we set
revs.topo_order before calling it rather than after.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint'Junio C Hamano Sat, 27 Jun 2009 20:44:25 +0000 (13:44 -0700)

Merge branch 'maint'

* maint:
gitweb/README: fix AliasMatch in example
Test grep --and/--or/--not
Test git archive --remote
fread does not return negative on error

gitweb/README: fix AliasMatch in exampleGiuseppe Bilotta Sat, 27 Jun 2009 16:24:11 +0000 (18:24 +0200)

gitweb/README: fix AliasMatch in example

When combining "dumb client" and human-friendly access by using the
'.git' extension to switch between the two, make sure the AliasMatch
covers the entire request. Without a full match, a request for

http://git.example.com/project/shortlog/branch..gitsomething

would result in a 404 because the server would try to access the
the project 'project/shortlog/branch.'

The solution is still not bulletproof, so document the possible failing
case.

Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Test grep --and/--or/--notThomas Rast Sat, 27 Jun 2009 18:47:44 +0000 (20:47 +0200)

Test grep --and/--or/--not

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

Test git archive --remoteThomas Rast Sat, 27 Jun 2009 18:47:43 +0000 (20:47 +0200)

Test git archive --remote

Add a small test case for git archive --remote (and thus
git-upload-archive), which so far went untested.

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

Use die_errno() instead of die() when checking syscallsThomas Rast Sat, 27 Jun 2009 15:58:47 +0000 (17:58 +0200)

Use die_errno() instead of die() when checking syscalls

Lots of die() calls did not actually report the kind of error, which
can leave the user confused as to the real problem. Use die_errno()
where we check a system/library call that sets errno on failure, or
one of the following that wrap such calls:

Function Passes on error from
-------- --------------------
odb_pack_keep open
read_ancestry fopen
read_in_full xread
strbuf_read xread
strbuf_read_file open or strbuf_read_file
strbuf_readlink readlink
write_in_full xwrite

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

Convert existing die(..., strerror(errno)) to die_errno()Thomas Rast Sat, 27 Jun 2009 15:58:46 +0000 (17:58 +0200)

Convert existing die(..., strerror(errno)) to die_errno()

Change calls to die(..., strerror(errno)) to use the new die_errno().

In the process, also make slight style adjustments: at least state
_something_ about the function that failed (instead of just printing
the pathname), and put paths in single quotes.

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

die_errno(): double % in strerror() output just in... Junio C Hamano Sat, 27 Jun 2009 15:58:45 +0000 (17:58 +0200)

die_errno(): double % in strerror() output just in case

[tr: handle border case where % is placed at end of buffer]

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

Introduce die_errno() that appends strerror(errno)... Thomas Rast Sat, 27 Jun 2009 15:58:44 +0000 (17:58 +0200)

Introduce die_errno() that appends strerror(errno) to die()

There are many calls to die() that do, or should, report
strerror(errno) to indicate how the syscall they guard failed.
Introduce a small helper function for this case.

Note:

- POSIX says vsnprintf can modify errno in some unlikely cases, so we
have to use errno early.

- We take some care to pass the original format to die_routine(), in
case someone wants to call die_errno() with custom format
characters.

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

git-svn: Canonicalize svn urls to prevent libsvn assertionUlrich Dangel Fri, 26 Jun 2009 14:52:09 +0000 (16:52 +0200)

git-svn: Canonicalize svn urls to prevent libsvn assertion

Cloning/initializing svn repositories with an uncanonicalize url
does not work as libsvn throws an assertion. This patch
canonicalize svn uris for the clone and init command from
git-svn.

[ew: fixed trailing whitespace]

Signed-off-by: Ulrich Dangel <uli@spamt.net>
Acked-by: Eric Wong <normalperson@yhbt.net>

t9138: remove stray dot in test which broke bashEric Wong Thu, 25 Jun 2009 23:09:59 +0000 (16:09 -0700)

t9138: remove stray dot in test which broke bash

The stray dot broke bash and probably some other shells,
but worked fine with dash in my limited testing.

Signed-off-by: Eric Wong <normalperson@yhbt.net>

git-remote: fix missing .uploadpack usage for show... Chris Frey Thu, 25 Jun 2009 21:21:35 +0000 (17:21 -0400)

git-remote: fix missing .uploadpack usage for show command

For users pulling from machines with self compiled git installs,
in non-PATH locations, they can set the config option
remote.<name>.uploadpack to set the location of git-upload-pack.

When using 'git remote show <name>', the remote HEAD check
did not use the uploadpack configuration setting, and would
not use the configured program.

In builtin-remote.c, the config setting is already loaded
with the call to remote_get(), so this patch passes that remote
along to transport_get().

Signed-off-by: Chris Frey <cdfrey@foursquare.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-svn: convert globs to regexps for branch destinationsEric Wong Thu, 25 Jun 2009 09:28:15 +0000 (02:28 -0700)

git-svn: convert globs to regexps for branch destinations

Marc Branchaud wrote:
> I'm fairly happy with this, except for the way the branch
> subcommand matches refspecs. The patch does a simple string
> comparison, but it'd be better to do an actual glob. I just
> couldn't track down the right function for that, so I left it as
> a strcmp and hope that a gitizen can tell me how to glob here.

Signed-off-by: Eric Wong <normalperson@yhbt.net>

git svn: Support multiple branch and tag paths in the... Marc Branchaud Tue, 23 Jun 2009 17:02:08 +0000 (13:02 -0400)

git svn: Support multiple branch and tag paths in the svn repository.

This enables git-svn.perl to read multiple 'branches' and 'tags' entries in
svn-remote config sections. The init and clone subcommands also support
multiple --branches and --tags arguments.

The branch (and tag) subcommand gets a new argument: --destination (or -d).
This argument is required if there are multiple branches (or tags) entries
configured for the remote Subversion repository. The argument's value
specifies which branch (or tag) path to use to create the branch (or tag).
The specified value must match the left side (without wildcards) of one of
the branches (or tags) refspecs in the svn-remote's config.

[ew: avoided explicit loop when combining globs with "push"]

Signed-off-by: Marc Branchaud <marcnarc@xiplink.com>
Acked-by: Eric Wong <normalperson@yhbt.net>

Add 'git svn reset' to unwind 'git svn fetch'Ben Jackson Thu, 4 Jun 2009 03:45:52 +0000 (20:45 -0700)

Add 'git svn reset' to unwind 'git svn fetch'

Add a command to unwind the effects of fetch by moving the rev_map
and refs/remotes/git-svn back to an old SVN revision. This allows
revisions to be re-fetched. Ideally SVN revs would be immutable,
but permissions changes in the SVN repository or indiscriminate use
of '--ignore-paths' can create situations where fetch cannot make
progress.

Signed-off-by: Ben Jackson <ben@ben.com>
Acked-by: Eric Wong <normalperson@yhbt.net>

git-svn: speed up find_rev_beforeBen Jackson Thu, 4 Jun 2009 03:45:51 +0000 (20:45 -0700)

git-svn: speed up find_rev_before

By limiting start revision of find_rev_before to max existing
revision. This avoids a long wait if you do
'git svn reset -r 9999999'. The linear search within the
contiguous revisions doesn't seem to be a problem.

[ew: expanded commit message]

Signed-off-by: Ben Jackson <ben@ben.com>
Acked-by: Eric Wong <normalperson@yhbt.net>

Add 'git svn help [cmd]' which works outside a repo.Ben Jackson Sun, 31 May 2009 01:17:06 +0000 (18:17 -0700)

Add 'git svn help [cmd]' which works outside a repo.

Previously there was no explicit 'help' command, but 'git svn help'
still printed the usage message (as an invalid command), provided you
got past the initialization steps that required a valid repo.

Signed-off-by: Ben Jackson <ben@ben.com>
Acked-by: Eric Wong <normalperson@yhbt.net>

git-svn: let 'dcommit $rev' work on $rev instead of... Thomas Rast Fri, 29 May 2009 15:09:42 +0000 (17:09 +0200)

git-svn: let 'dcommit $rev' work on $rev instead of HEAD

'git svn dcommit' takes an optional revision argument, but the meaning
of it was rather scary. It completely ignored the current state of
the HEAD, only looking at the revisions between SVN and $rev. If HEAD
was attached to $branch, the branch lost all commits $rev..$branch in
the process.

Considering that 'git svn dcommit HEAD^' has the intuitive meaning
"dcommit all changes on my branch except the last one", we change the
meaning of the revision argument. git-svn temporarily checks out $rev
for its work, meaning that

* if a branch is specified, that branch (_not_ the HEAD) is rebased as
part of the dcommit,

* if some other revision is specified, as in the example, all work
happens on a detached HEAD and no branch is affected.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Acked-by: Eric Wong <normalperson@yhbt.net>

fread does not return negative on errorRoel Kluin Mon, 22 Jun 2009 16:42:33 +0000 (18:42 +0200)

fread does not return negative on error

size_t res cannot be less than 0. fread returns 0 on error.

Reported-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

builtin-remote: (get_one_entry): use strbufBert Wesarg Mon, 22 Jun 2009 22:27:44 +0000 (00:27 +0200)

builtin-remote: (get_one_entry): use strbuf

Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t/t9001-send-email.sh: ensure generated script is execu... Brandon Casey Mon, 22 Jun 2009 17:32:52 +0000 (12:32 -0500)

t/t9001-send-email.sh: ensure generated script is executed with $SHELL_PATH

If the shell is not specified using the '#!' notation, then the OS will
use '/bin/sh' to execute the script which may not produce the desired
results. In particular, /bin/sh on Solaris interprets '^' specially which
has an effect on the sed command that this patch touches.

Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint'Junio C Hamano Mon, 22 Jun 2009 07:44:34 +0000 (00:44 -0700)

Merge branch 'maint'

* maint:
t3700-add: add a POSIXPERM prerequisite to a new test

t3700-add: add a POSIXPERM prerequisite to a new testJohannes Sixt Mon, 22 Jun 2009 07:30:38 +0000 (09:30 +0200)

t3700-add: add a POSIXPERM prerequisite to a new test

The new test does a 'chmod 0', which does not have the intended
effect on Windows.

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

Merge branch 'sb/maint-1.6.0-add-config-fix' into maintJunio C Hamano Mon, 22 Jun 2009 07:44:09 +0000 (00:44 -0700)

Merge branch 'sb/maint-1.6.0-add-config-fix' into maint

* sb/maint-1.6.0-add-config-fix:
add: allow configurations to be overriden by command line

Sync with 1.6.3.3Junio C Hamano Mon, 22 Jun 2009 06:50:17 +0000 (23:50 -0700)

Sync with 1.6.3.3

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

GIT 1.6.3.3 v1.6.3.3Junio C Hamano Mon, 22 Jun 2009 04:02:49 +0000 (21:02 -0700)

GIT 1.6.3.3

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

Merge branch 'ak/maint-for-each-ref-no-lookup' into... Junio C Hamano Mon, 22 Jun 2009 04:15:39 +0000 (21:15 -0700)

Merge branch 'ak/maint-for-each-ref-no-lookup' into maint

* ak/maint-for-each-ref-no-lookup:
for-each-ref: Do not lookup objects when they will not be used

Merge branch 'rc/maint-http-local-slot-fix' into maintJunio C Hamano Mon, 22 Jun 2009 04:15:31 +0000 (21:15 -0700)

Merge branch 'rc/maint-http-local-slot-fix' into maint

* rc/maint-http-local-slot-fix:
http*: cleanup slot->local after fclose

Merge branch 'cb/maint-no-double-merge' into maintJunio C Hamano Mon, 22 Jun 2009 04:15:27 +0000 (21:15 -0700)

Merge branch 'cb/maint-no-double-merge' into maint

* cb/maint-no-double-merge:
refuse to merge during a merge

Merge branch 'mn/maint-iconv-autoconf' into maintJunio C Hamano Mon, 22 Jun 2009 04:14:25 +0000 (21:14 -0700)

Merge branch 'mn/maint-iconv-autoconf' into maint

* mn/maint-iconv-autoconf:
fix handling of iconv configuration options

Merge branch 'lt/maint-unsigned-left-shift' into maintJunio C Hamano Mon, 22 Jun 2009 04:14:09 +0000 (21:14 -0700)

Merge branch 'lt/maint-unsigned-left-shift' into maint

* lt/maint-unsigned-left-shift:
Fix big left-shifts of unsigned char

Merge branch 'pb/maint-1.6.2-userdiff-fix' into maintJunio C Hamano Mon, 22 Jun 2009 04:08:05 +0000 (21:08 -0700)

Merge branch 'pb/maint-1.6.2-userdiff-fix' into maint

* pb/maint-1.6.2-userdiff-fix:
upload-archive: fix infinite loop on Cygwin
avoid exponential regex match for java and objc function names

receive-pack: do not send error details to the clientJohannes Sixt Sun, 21 Jun 2009 21:16:09 +0000 (23:16 +0200)

receive-pack: do not send error details to the client

If the objects that a client pushes to the server cannot be processed for
any reason, an error is reported back to the client via the git protocol.
We used to send quite detailed information if a system call failed if
unpack-objects is run. This can be regarded as an information leak. Now we
do not send any error details like we already do in the case where
index-pack failed.

Errors in system calls as well as the exit code of unpack-objects and
index-pack are now reported to stderr; in the case of a local push or via
ssh these messages still go to the client, but that is OK since these forms
of access to the server assume that the client can be trusted. If
receive-pack is run from git-daemon, then the daemon should put the error
messages into the syslog.

With this reasoning a new status report is added for the post-update-hook;
untrusted (i.e. daemon's) clients cannot observe its status anyway, others
may want to know failure details.

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

attribute: whitespace set to true detects all errors... Junio C Hamano Sun, 21 Jun 2009 09:35:18 +0000 (02:35 -0700)

attribute: whitespace set to true detects all errors known to git

That is what the documentation says, but the code pretends as if all the
known whitespace error tokens were given.

Among the whitespace error tokens, there is one kind that loosens the rule
when set: cr-at-eol. Which means that whitespace error token that is set
to true ignores a newly introduced CR at the end, which is inconsistent
with the documentation.

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

.gitattributes: CR at the end of the line is an errorNanako Shiraishi Fri, 19 Jun 2009 10:42:53 +0000 (19:42 +0900)

.gitattributes: CR at the end of the line is an error

When a CR is accidentally added at the end of a C source file in the git
project tree, "git diff --check" doesn't detect it as an error.

$ echo abQ | tr Q '\015' >>fast-import.c
$ git diff --check

I think this is because the "whitespace" attribute is set to *.[ch] files
without specifying what kind of errors are caught. It makes git "notice
all types of errors" (as described in the documentation), but I think it
is incorrectly setting cr-at-eol, too, and hides this error.

Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t3505: fix abuse of test_expect_codeJunio C Hamano Sun, 21 Jun 2009 09:01:28 +0000 (02:01 -0700)

t3505: fix abuse of test_expect_code

The test wanted to make sure that cherry-pick exits with status 1,
but with the way it was placed after "git checkout master &&" meant
that it could have misjudged success if checkout barfed with the
same failure status.

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

show-ref: migrate to parse-optionsStephen Boyd Sun, 21 Jun 2009 04:40:46 +0000 (21:40 -0700)

show-ref: migrate to parse-options

Also make the docs more consistent with the usage message. While we're
here remove the zero initializers from the static variables as they're
unnecessary.

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

Merge branch 'maint'Junio C Hamano Sun, 21 Jun 2009 06:50:17 +0000 (23:50 -0700)

Merge branch 'maint'

* maint:
git-show-ref.txt: remove word and make consistent
git-svn documentation: fix typo in 'rebase vs. pull/merge' section

Merge branch 'maint-1.6.2' into maintJunio C Hamano Sun, 21 Jun 2009 06:48:46 +0000 (23:48 -0700)

Merge branch 'maint-1.6.2' into maint

* maint-1.6.2:
git-show-ref.txt: remove word and make consistent
git-svn documentation: fix typo in 'rebase vs. pull/merge' section
use xstrdup, not strdup in ll-merge.c

Merge branch 'maint-1.6.1' into maint-1.6.2Junio C Hamano Sun, 21 Jun 2009 06:48:28 +0000 (23:48 -0700)

Merge branch 'maint-1.6.1' into maint-1.6.2

* maint-1.6.1:
git-show-ref.txt: remove word and make consistent
git-svn documentation: fix typo in 'rebase vs. pull/merge' section
use xstrdup, not strdup in ll-merge.c

Merge branch 'maint-1.6.0' into maint-1.6.1Junio C Hamano Sun, 21 Jun 2009 06:48:21 +0000 (23:48 -0700)

Merge branch 'maint-1.6.0' into maint-1.6.1

* maint-1.6.0:
git-show-ref.txt: remove word and make consistent
git-svn documentation: fix typo in 'rebase vs. pull/merge' section
use xstrdup, not strdup in ll-merge.c

git-show-ref.txt: remove word and make consistentStephen Boyd Sun, 21 Jun 2009 04:40:45 +0000 (21:40 -0700)

git-show-ref.txt: remove word and make consistent

Under is better than in because of the nested nature of the .git
directory.

"also using" sounds a little odd, plus we say combined with later on so
just use that.

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

Fix various sparse warnings in the git source codeLinus Torvalds Thu, 18 Jun 2009 17:28:43 +0000 (10:28 -0700)

Fix various sparse warnings in the git source code

There are a few remaining ones, but this fixes the trivial ones. It boils
down to two main issues that sparse complains about:

- warning: Using plain integer as NULL pointer

Sparse doesn't like you using '0' instead of 'NULL'. For various good
reasons, not the least of which is just the visual confusion. A NULL
pointer is not an integer, and that whole "0 works as NULL" is a
historical accident and not very pretty.

A few of these remain: zlib is a total mess, and Z_NULL is just a 0.
I didn't touch those.

- warning: symbol 'xyz' was not declared. Should it be static?

Sparse wants to see declarations for any functions you export. A lack
of a declaration tends to mean that you should either add one, or you
should mark the function 'static' to show that it's in file scope.

A few of these remain: I only did the ones that should obviously just
be made static.

That 'wt_status_submodule_summary' one is debatable. It has a few related
flags (like 'wt_status_use_color') which _are_ declared, and are used by
builtin-commit.c. So maybe we'd like to export it at some point, but it's
not declared now, and not used outside of that file, so 'static' it is in
this patch.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'ph/submodule-rebase'Junio C Hamano Sun, 21 Jun 2009 04:51:13 +0000 (21:51 -0700)

Merge branch 'ph/submodule-rebase'

* ph/submodule-rebase:
git-submodule: add support for --merge.

Conflicts:
Documentation/git-submodule.txt
git-submodule.sh

Makefile: Solaris needs HAVE_ALLOCA_H for alloca()Brandon Casey Fri, 19 Jun 2009 15:10:39 +0000 (10:10 -0500)

Makefile: Solaris needs HAVE_ALLOCA_H for alloca()

There is special handling in compat/regex/regex.c for the GNU compiler
to define alloca to __builtin_alloca, but the native compiler must include
alloca.h which happens when HAVE_ALLOCA_H is defined.

Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'jc/cache-tree'Junio C Hamano Sun, 21 Jun 2009 04:47:30 +0000 (21:47 -0700)

Merge branch 'jc/cache-tree'

* jc/cache-tree:
Avoid "diff-index --cached" optimization under --find-copies-harder
Optimize "diff-index --cached" using cache-tree
t4007: modernize the style
cache-tree.c::cache_tree_find(): simplify internal API
write-tree --ignore-cache-tree

Merge branch 'mg/pushurl'Junio C Hamano Sun, 21 Jun 2009 04:47:27 +0000 (21:47 -0700)

Merge branch 'mg/pushurl'

* mg/pushurl:
avoid NULL dereference on failed malloc
builtin-remote: Make "remote -v" display push urls
builtin-remote: Show push urls as well
technical/api-remote: Describe new struct remote member pushurl
t5516: Check pushurl config setting
Allow push and fetch urls to be different

Merge branch 'mn/maint-iconv-autoconf'Junio C Hamano Sun, 21 Jun 2009 04:47:22 +0000 (21:47 -0700)

Merge branch 'mn/maint-iconv-autoconf'

* mn/maint-iconv-autoconf:
fix handling of iconv configuration options

Merge branch 'sb/pull-rebase'Junio C Hamano Sun, 21 Jun 2009 04:47:13 +0000 (21:47 -0700)

Merge branch 'sb/pull-rebase'

* sb/pull-rebase:
parse-remote: remove unused functions
parse-remote: support default reflist in get_remote_merge_branch
parse-remote: function to get the tracking branch to be merge

Merge branch 'pb/send-email-cccmd-fix'Junio C Hamano Sun, 21 Jun 2009 04:47:06 +0000 (21:47 -0700)

Merge branch 'pb/send-email-cccmd-fix'

* pb/send-email-cccmd-fix:
Test cccmd in t9001-send-email.sh and fix some bugs

Merge branch 'pb/maint-1.6.2-userdiff-fix'Junio C Hamano Sun, 21 Jun 2009 04:46:55 +0000 (21:46 -0700)

Merge branch 'pb/maint-1.6.2-userdiff-fix'

* pb/maint-1.6.2-userdiff-fix:
upload-archive: fix infinite loop on Cygwin
avoid exponential regex match for java and objc function names

Merge branch 'sb/maint-1.6.0-add-config-fix'Junio C Hamano Sun, 21 Jun 2009 04:46:38 +0000 (21:46 -0700)

Merge branch 'sb/maint-1.6.0-add-config-fix'

* sb/maint-1.6.0-add-config-fix:
add: allow configurations to be overriden by command line
use xstrdup, not strdup in ll-merge.c

Conflicts:
builtin-add.c

Merge branch 'lt/maint-unsigned-left-shift'Junio C Hamano Sun, 21 Jun 2009 04:46:10 +0000 (21:46 -0700)

Merge branch 'lt/maint-unsigned-left-shift'

* lt/maint-unsigned-left-shift:
Fix big left-shifts of unsigned char

git-svn documentation: fix typo in 'rebase vs. pull... Miklos Vajna Sat, 20 Jun 2009 11:27:15 +0000 (13:27 +0200)

git-svn documentation: fix typo in 'rebase vs. pull/merge' section

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge git://git.kernel.org/pub/scm/gitk/gitkJunio C Hamano Sat, 20 Jun 2009 18:54:37 +0000 (11:54 -0700)

Merge git://git.kernel.org/pub/scm/gitk/gitk

* git://git.kernel.org/pub/scm/gitk/gitk:
gitk: Allow diff view without context lines
gitk: Add another string to translation
gitk: Add option 'Simple history' to the options menu
gitk: Handle msysGit version during version comparisons
gitk: Make more options easily accessible from Edit View dialog
gitk: Check git version before using --textconv flag
gitk: Use --textconv to generate diff text
gitk: Update German translation.

add: allow configurations to be overriden by command... Stephen Boyd Thu, 18 Jun 2009 09:17:54 +0000 (02:17 -0700)

add: allow configurations to be overriden by command line

Don't call git_config after parsing the command line options, otherwise
the config settings will override any settings made by the command line.

This can be seen by setting add.ignore_errors and then specifying
--no-ignore-errors when using git-add.

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

stash: teach quiet optionStephen Boyd Thu, 18 Jun 2009 01:07:37 +0000 (18:07 -0700)

stash: teach quiet option

Teach stash pop, apply, save, and drop to be quiet when told. By using
the quiet option (-q), these actions will be silent unless errors are
encountered.

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

am, rebase: teach quiet optionStephen Boyd Tue, 16 Jun 2009 22:33:01 +0000 (15:33 -0700)

am, rebase: teach quiet option

git-am and git-rebase are talkative scripts. Teach them to be quiet when
told, allowing them to speak only when they fail or experience errors.

The quiet option is maintained when git-am or git-rebase fails to apply
a patch. This means subsequent --resolved, --continue, --skip, --abort
invocations will be quiet if the original invocation was quiet.

Drop a handful of >&2 redirection; the rest of the program sends all the
info messages to stdout, not to stderr.

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

upload-pack: squelch progress indicator if client canno... Johannes Sixt Tue, 16 Jun 2009 18:41:16 +0000 (20:41 +0200)

upload-pack: squelch progress indicator if client cannot see it

upload-pack runs pack-objects, which generates progress indicator output
on its stderr. If the client requests a sideband, this indicator is sent
to the client; but if it did not, then the progress is written to
upload-pack's own stderr.

If upload-pack is itself run from git-daemon (and if the client did not
request a sideband) the progress indicator never reaches the client and it
need not be generated in the first place. With this patch the progress
indicator is suppressed in this situation.

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

daemon: send stderr of service programs to the syslogJohannes Sixt Sun, 14 Jun 2009 20:38:51 +0000 (22:38 +0200)

daemon: send stderr of service programs to the syslog

If git-daemon is run with --detach or --inetd, then stderr is explicitly
redirected to /dev/null. But notice that the service programs were spawned
via execl_git_cmd(), in particular, the stderr channel is inherited from
the daemon. This means that errors that the programs wrote to stderr (for
example, via die()), went to /dev/null.

This patch arranges that the daemon does not merely exec the service
program, but forks it and monitors stderr of the child; it writes the
errors that it produces to the daemons log via logerror().

A consequence is that the daemon process remains in memory for the full
duration of the service program, but this cannot be avoided.

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

http.c: add http.sslCertPasswordProtected optionMark Lodato Thu, 28 May 2009 03:16:03 +0000 (23:16 -0400)

http.c: add http.sslCertPasswordProtected option

Add a configuration option, http.sslCertPasswordProtected, and associated
environment variable, GIT_SSL_CERT_PASSWORD_PROTECTED, to enable SSL client
certificate password prompt from within git. If this option is false and
if the environment variable does not exist, git falls back to OpenSSL's
prompts (as in earlier versions of git).

The environment variable may only be used to enable, not to disable
git's password prompt. This behavior mimics GIT_NO_VERIFY; the mere
existence of the variable is all that is checked.

Signed-off-by: Mark Lodato <lodatom@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

http.c: prompt for SSL client certificate passwordMark Lodato Thu, 28 May 2009 03:16:02 +0000 (23:16 -0400)

http.c: prompt for SSL client certificate password

If an SSL client certificate is enabled (via http.sslcert or
GIT_SSL_CERT), prompt for the certificate password rather than
defaulting to OpenSSL's password prompt. This causes the prompt to only
appear once each run. Previously, OpenSSL prompted the user *many*
times, causing git to be unusable over HTTPS with client-side
certificates.

Note that the password is stored in memory in the clear while the
program is running. This may be a security problem if git crashes and
core dumps.

The user is always prompted, even if the certificate is not encrypted.
This should be fine; unencrypted certificates are rare and a security
risk anyway.

Signed-off-by: Mark Lodato <lodatom@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint'Junio C Hamano Thu, 18 Jun 2009 17:39:17 +0000 (10:39 -0700)

Merge branch 'maint'

* maint:
http.c: fix compiling with libcurl 7.9.2
import-tars: support symlinks
pull, rebase: simplify to use die()

Merge branch 'sb/parse-options-integer'Junio C Hamano Thu, 18 Jun 2009 17:36:22 +0000 (10:36 -0700)

Merge branch 'sb/parse-options-integer'

* sb/parse-options-integer:
parse-options: simplify usage argh handling
parse-options: make OPT_INTEGER's argh explicit

Merge branch 'ak/maint-for-each-ref-no-lookup'Junio C Hamano Thu, 18 Jun 2009 17:33:09 +0000 (10:33 -0700)

Merge branch 'ak/maint-for-each-ref-no-lookup'

* ak/maint-for-each-ref-no-lookup:
for-each-ref: Do not lookup objects when they will not be used

Add -k option to cvsexportcommit to revert expanded... Alex Bennée Tue, 16 Jun 2009 14:21:04 +0000 (15:21 +0100)

Add -k option to cvsexportcommit to revert expanded CVS keywords in CVS working tree before applying commit patch

Depending on how your CVS->GIT conversion went you will have some
unexpanded CVS keywords in your GIT repo. If any of your git commits
touch these lines then the patch application will fail. This patch
addresses that by adding an option that will revert and expanded CVS
keywords to files in the working CVS directory that are affected by
the commit being applied.

Signed-off-by: Alex Bennée <alex@bennee.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

http.c: fix compiling with libcurl 7.9.2Mark Lodato Mon, 15 Jun 2009 02:39:00 +0000 (22:39 -0400)

http.c: fix compiling with libcurl 7.9.2

Change the minimimum required libcurl version for the http.sslKey option
to 7.9.3. Previously, preprocessor macros checked for >= 7.9.2, which
is incorrect because CURLOPT_SSLKEY was introduced in 7.9.3. This now
allows git to compile with libcurl 7.9.2.

Signed-off-by: Mark Lodato <lodatom@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Makefile: use compat regex on SolarisJeff King Tue, 16 Jun 2009 19:08:21 +0000 (15:08 -0400)

Makefile: use compat regex on Solaris

The system regex is either slow or buggy for complex
patterns, like the built-in xfuncname pattern for java
files.

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

Makefile: refactor regex compat supportJeff King Tue, 16 Jun 2009 19:07:40 +0000 (15:07 -0400)

Makefile: refactor regex compat support

There was no tweakable knob to use the regex compat code; it
was embedded in the mingw build. Since other platforms may
want to use it, let's factor it out in the usual way for
build configuration knobs.

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

Test cccmd in t9001-send-email.sh and fix some bugsPaolo Bonzini Thu, 18 Jun 2009 12:31:32 +0000 (14:31 +0200)

Test cccmd in t9001-send-email.sh and fix some bugs

For another patch series I'm working on I needed some tests
for the cc-cmd feature of git-send-email.

This patch adds 3 tests for the feature and for the possibility
to specify --suppress-cc multiple times, and fixes two bugs.
The first bug is that the --suppress-cc option for `cccmd' was
misspelled as `ccmd' in the code. The second bug, which is
actually found only with my other series, is that the argument
to the cccmd is never quoted, so the cccmd would fail with
patch file names containing a space.

A third bug I fix (in the docs) is that the bodycc argument was
actually spelled ccbody in the documentation and bash completion.

Signed-off-by: Paolo Bonzini <bonzini@gnu.org>
Cc: Markus Heidelberg <markus.heidelberg@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

fetch: do not create ref from empty nameClemens Buchacher Wed, 17 Jun 2009 13:38:36 +0000 (15:38 +0200)

fetch: do not create ref from empty name

Previously, the refspec "<src>:" would be expanded to
"<src>:refs/heads/". Instead, treat an empty <dst> just like refspecs
without a colon.

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

import-tars: support symlinksJohannes Schindelin Wed, 17 Jun 2009 12:49:39 +0000 (14:49 +0200)

import-tars: support symlinks

Without this patch, symbolic links are turned into empty files.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

upload-archive: fix infinite loop on CygwinRené Scharfe Wed, 17 Jun 2009 10:11:10 +0000 (12:11 +0200)

upload-archive: fix infinite loop on Cygwin

On Cygwin, poll() reports POLLIN even for file descriptors that have
reached their end. This caused git upload-archive to be stuck in an
infinite loop, as it only looked at the POLLIN flag.

In addition to POLLIN, check if read() returned 0, which indicates
end-of-file, and keep looping only as long as at least one of the file
descriptors has input. This lets the following command finish on its
own when run in a git repository on Cygwin, instead of it getting stuck
after printing all file names:

$ git archive -v --remote . HEAD >/dev/null

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

avoid exponential regex match for java and objc functio... Paolo Bonzini Wed, 17 Jun 2009 14:26:06 +0000 (16:26 +0200)

avoid exponential regex match for java and objc function names

In the old regex

^[ \t]*(([ \t]*[A-Za-z_][A-Za-z_0-9]*){2,}[ \t]*\([^;]*)$
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

you can backtrack arbitrarily from [A-Za-z_0-9]* into [A-Za-z_], thus
causing an exponential number of backtracks. Ironically it also causes
the regex not to work as intended; for example "catch" can match the
underlined part of the regex, the first repetition matching "c" and
the second matching "atch".

The replacement regex avoids this problem, because it makes sure that
at least a space/tab is eaten on each repetition. In other words,
a suffix of a repetition can never be a prefix of the next repetition.

Signed-off-by: Paolo Bonzini <bonzini@gnu.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

submodule, repack: migrate to git-sh-setup's say()Stephen Boyd Tue, 16 Jun 2009 22:33:00 +0000 (15:33 -0700)

submodule, repack: migrate to git-sh-setup's say()

Now that there is say() in git-sh-setup, these scripts don't need to use
their own. Migrate them over by setting GIT_QUIET and removing their
custom say() functions.

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

git-sh-setup: introduce say() for quiet optionsStephen Boyd Tue, 16 Jun 2009 22:32:59 +0000 (15:32 -0700)

git-sh-setup: introduce say() for quiet options

Scripts should use say() when they want to output non-error messages.
This function helps future script writers easily implement a quiet
option by setting GIT_QUIET to enable suppression of non-error messages.

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

am: suppress apply errors when using 3-wayStephen Boyd Tue, 16 Jun 2009 22:32:58 +0000 (15:32 -0700)

am: suppress apply errors when using 3-way

git-am with 3-way outputs errors when applying, even though the
3-way will usually be successful. We suppress these errors from
git-apply because they are not "true" errors until the 3-way has been
attempted.

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

t4150: test applying with a newline in subjectStephen Boyd Tue, 16 Jun 2009 22:32:57 +0000 (15:32 -0700)

t4150: test applying with a newline in subject

Commit 4b7cc26 (git-am: use printf instead of echo on user-supplied
strings, 2007-05-25) fixed a bug where subjects with newlines would
cause git-am to echo multiple lines when it says "Applying: <subject>".

This test ensures that fix stays valid.

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

Fix big left-shifts of unsigned charLinus Torvalds Thu, 18 Jun 2009 00:22:27 +0000 (17:22 -0700)

Fix big left-shifts of unsigned char

Shifting 'unsigned char' or 'unsigned short' left can result in sign
extension errors, since the C integer promotion rules means that the
unsigned char/short will get implicitly promoted to a signed 'int' due to
the shift (or due to other operations).

This normally doesn't matter, but if you shift things up sufficiently, it
will now set the sign bit in 'int', and a subsequent cast to a bigger type
(eg 'long' or 'unsigned long') will now sign-extend the value despite the
original expression being unsigned.

One example of this would be something like

unsigned long size;
unsigned char c;

size += c << 24;

where despite all the variables being unsigned, 'c << 24' ends up being a
signed entity, and will get sign-extended when then doing the addition in
an 'unsigned long' type.

Since git uses 'unsigned char' pointers extensively, we actually have this
bug in a couple of places.

I may have missed some, but this is the result of looking at

git grep '[^0-9 ][ ]*<<[ ][a-z]' -- '*.c' '*.h'
git grep '<<[ ]*24'

which catches at least the common byte cases (shifting variables by a
variable amount, and shifting by 24 bits).

I also grepped for just 'unsigned char' variables in general, and
converted the ones that most obviously ended up getting implicitly cast
immediately anyway (eg hash_name(), encode_85()).

In addition to just avoiding 'unsigned char', this patch also tries to use
a common idiom for the delta header size thing. We had three different
variations on it: "& 0x7fUL" in one place (getting the sign extension
right), and "& ~0x80" and "& 0x7f" in two other places (not getting it
right). Apart from making them all just avoid using "unsigned char" at
all, I also unified them to then use a simple "& 0x7f".

I considered making a sparse extension which warns about doing implicit
casts from unsigned types to signed types, but it gets rather complex very
quickly, so this is just a hack.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

pull, rebase: simplify to use die()Stephen Boyd Sun, 14 Jun 2009 23:08:56 +0000 (16:08 -0700)

pull, rebase: simplify to use die()

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

use xstrdup, not strdup in ll-merge.cJim Meyering Sun, 14 Jun 2009 19:47:54 +0000 (21:47 +0200)

use xstrdup, not strdup in ll-merge.c

Otherwise, a fluky allocation failure would cause merge
configuration settings to be silently ignored.

Signed-off-by: Jim Meyering <meyering@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

avoid NULL dereference on failed mallocJim Meyering Sun, 14 Jun 2009 19:46:10 +0000 (21:46 +0200)

avoid NULL dereference on failed malloc

* builtin-remote.c (get_one_entry): Use xmalloc, not malloc.

Signed-off-by: Jim Meyering <meyering@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-am: refactor 'cleaning up and aborting'Giuseppe Bilotta Wed, 27 May 2009 09:25:19 +0000 (11:25 +0200)

git-am: refactor 'cleaning up and aborting'

Introduce a clean_abort function that echoes an optional error message
to standard error, removes the dotest directory and exits with status 1.

Use it when patch format detection or patch splitting fails early.

Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint'Junio C Hamano Sun, 14 Jun 2009 00:10:18 +0000 (17:10 -0700)

Merge branch 'maint'

* maint:
git-rerere.txt: grammatical fixups and cleanups

Merge branch 'maint-1.6.2' into maintJunio C Hamano Sun, 14 Jun 2009 00:10:08 +0000 (17:10 -0700)

Merge branch 'maint-1.6.2' into maint

* maint-1.6.2:
git-rerere.txt: grammatical fixups and cleanups

Merge branch 'maint-1.6.1' into maint-1.6.2Junio C Hamano Sun, 14 Jun 2009 00:09:50 +0000 (17:09 -0700)

Merge branch 'maint-1.6.1' into maint-1.6.2

* maint-1.6.1:
git-rerere.txt: grammatical fixups and cleanups

Merge branch 'maint-1.6.0' into maint-1.6.1Junio C Hamano Sun, 14 Jun 2009 00:09:45 +0000 (17:09 -0700)

Merge branch 'maint-1.6.0' into maint-1.6.1

* maint-1.6.0:
git-rerere.txt: grammatical fixups and cleanups
http-push.c::remove_locks(): fix use after free