gitweb.git
Merge git://git.bogomips.org/git-svnJunio C Hamano Thu, 21 May 2009 14:28:07 +0000 (07:28 -0700)

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

* git://git.bogomips.org/git-svn:
git-svn: add --authors-prog option
git-svn: Set svn.authorsfile if it is passed to git svn clone
git-svn: Correctly report max revision when following deleted paths
git-svn: Fix for svn paths removed > log-window-size revisions ago
git-svn testsuite: use standard configuration for Subversion tools

git-send-email: Handle quotes when parsing .mailrc... Eric W. Biederman Thu, 21 May 2009 02:45:53 +0000 (19:45 -0700)

git-send-email: Handle quotes when parsing .mailrc files

It is legal and not uncommon to use quotes in a .mailrc file so
you can include a persons fullname as well as their email alias.
Handle this by using quotewords instead of split when parsing
.mailrc files.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-svn: add --authors-prog optionMark Lodato Fri, 15 May 2009 01:27:15 +0000 (21:27 -0400)

git-svn: add --authors-prog option

Add a new option, --authors-prog, to git-svn that allows a more flexible
alternative (or supplement) to --authors-file. This allows more
advanced username operations than the authors file will allow. For
example, one may look up Subversion users via LDAP, or may generate the
name and email address from the Subversion username.

Notes:

* If both --authors-name and --authors-prog are given, the former is
tried first, falling back to the later.

* The program is called once per unique SVN username, and the result is
cached.

* The command-line argument must be the path to a program, not a generic
shell command line. The absolute path to this program is taken at
startup since the git-svn script changes directory during operation.

* The option is not enabled for `git svn log'.

[ew: fixed case where neither --authors-(name|prog) were defined]
Signed-off-by: Mark Lodato <lodatom@gmail.com>
Acked-by: Eric Wong <normalperson@yhbt.net>

git-svn: Set svn.authorsfile if it is passed to git... Alex Vandiver Wed, 6 May 2009 20:19:45 +0000 (16:19 -0400)

git-svn: Set svn.authorsfile if it is passed to git svn clone

Signed-off-by: Alex Vandiver <alexmv@mit.edu>
Acked-by: Eric Wong <normalperson@yhbt.net>

git-svn: Correctly report max revision when following... Alex Vandiver Wed, 6 May 2009 20:18:53 +0000 (16:18 -0400)

git-svn: Correctly report max revision when following deleted paths

Report the maximum found revision in the range, instead of the minimum
changed revision.

Signed-off-by: Alex Vandiver <alexmv@mit.edu>
Acked-by: Eric Wong <normalperson@yhbt.net>

git-svn: Fix for svn paths removed > log-window-size... Alex Vandiver Wed, 6 May 2009 20:18:52 +0000 (16:18 -0400)

git-svn: Fix for svn paths removed > log-window-size revisions ago

Instead of trying to find the end of the commit history only in the
last window, track if we have seen commits yet, and use that to judge
if we need to backtrack and look for a tail. Otherwise, conversion
can silently lose up to 100 revisions of a branch if it was deleted
>100 revisions ago.

Signed-off-by: Alex Vandiver <alexmv@mit.edu>
Acked-by: Eric Wong <normalperson@yhbt.net>

git-svn testsuite: use standard configuration for Subve... Eygene Ryabinkin Fri, 8 May 2009 08:06:16 +0000 (12:06 +0400)

git-svn testsuite: use standard configuration for Subversion tools

I have tweaked configuration in my ~/.subversion directory, namely I am
running auto-properties and automatically adding '$Id$' expansion to
every file. This choke the last test named 'proplist' from
t9101-git-svn-props.sh, because one more property, svn:keywords is
automatically added.

I had just wrapped svn invocation with the svn_cmd that specifies empty
directory via --config-dir argument. Since the latter is the global
option, it should be recognized by all svn subcommands, so no
regressions will be introduced.

Now svn_cmd is used everywhere, not just in the failed test module: this
should guard us from the future clashes with user-defined configuration
tweaks.

Signed-off-by: Eygene Ryabinkin <rea-git@codelabs.ru>
Acked-by: Eric Wong <normalperson@yhbt.net>

Merge branch 'maint'Junio C Hamano Thu, 21 May 2009 01:59:09 +0000 (18:59 -0700)

Merge branch 'maint'

* maint:
grep: fix word-regexp colouring
completion: use git rev-parse to detect bare repos
Cope better with a _lot_ of packs
for-each-ref: fix segfault in copy_email

grep: fix word-regexp colouringRené Scharfe Wed, 20 May 2009 21:31:53 +0000 (23:31 +0200)

grep: fix word-regexp colouring

As noticed by Dmitry Gryazin: When a pattern is found but it doesn't
start and end at word boundaries, bol is forwarded to after the match and
the pattern is searched again. When a pattern is finally found between
word boundaries, the match offsets are off by the number of characters
that have been skipped.

This patch corrects the offsets to be relative to the value of bol as
passed to match_one_pattern() by its caller.

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

completion: use git rev-parse to detect bare reposGiuseppe Bilotta Mon, 18 May 2009 16:24:30 +0000 (18:24 +0200)

completion: use git rev-parse to detect bare repos

Its check is more robust than a config check for core.bare

Trivially-Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Cope better with a _lot_ of packsJohannes Schindelin Fri, 15 May 2009 18:52:47 +0000 (20:52 +0200)

Cope better with a _lot_ of packs

You might end up with a situation where you have tons of pack files, e.g.
when using hg2git. In this situation, all kinds of operations may
end up with a "too many files open" error. Let's recover gracefully from
that.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Looks-right-to-me-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

grep: make callback functions staticRené Scharfe Wed, 20 May 2009 22:05:22 +0000 (00:05 +0200)

grep: make callback functions static

Suggested by Stephen Boyd: make the callback functions used for option
parsing static.

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

for-each-ref: fix segfault in copy_emailJeff King Mon, 18 May 2009 17:58:11 +0000 (13:58 -0400)

for-each-ref: fix segfault in copy_email

You can trigger a segfault in git.git by doing:

git for-each-ref --format='%(taggeremail)' refs/tags/v0.99

The v0.99 tag is special in that it contains no "tagger"
header.

The bug is obvious in copy_email, which carefully checks to
make sure the result of a strchr is non-NULL, but only after
already having used it to perform other work. The fix is to
move the check up.

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

Extend sample pre-commit hook to check for non ascii... Heiko Voigt Tue, 19 May 2009 20:01:54 +0000 (22:01 +0200)

Extend sample pre-commit hook to check for non ascii filenames

At the moment non-ascii encodings of filenames are not portably
converted between different filesystems by git. This will most likely
change in the future but to allow repositories to be portable among
different file/operating systems this check is enabled by default.

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

Unify signedness in hashing callsDan McGee Tue, 19 May 2009 04:34:02 +0000 (23:34 -0500)

Unify signedness in hashing calls

Our hash_obj and hashtable_index calls and functions were doing a lot of
funny things with signedness. Unify all of it to 'unsigned int'.

Signed-off-by: Dan McGee <dpmcgee@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t5100: use ancient encoding syntax for backwards compat... Brandon Casey Mon, 18 May 2009 23:44:45 +0000 (18:44 -0500)

t5100: use ancient encoding syntax for backwards compatibility

Some ancient platforms do not have an extensive list of alternate names for
character encodings. For example, Solaris 7 does not know that ISO-8859-1
is the same as ISO8859-1. Modern platforms do know this, so use the older
names.

The following conversions were performed:

ISO-8859-1 --> ISO8859-1
ISO-8859-2 --> ISO8859-2
ISO-8859-8 --> ISO8859-8
iso-2022-jp --> ISO-2022-JP

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t9301: use ISO8859-1 rather than ISO-8859-1Brandon Casey Mon, 18 May 2009 23:44:44 +0000 (18:44 -0500)

t9301: use ISO8859-1 rather than ISO-8859-1

Some ancient platforms do not have an extensive list of alternate names for
character encodings. For example, Solaris 7 does not know that ISO-8859-1
is the same as ISO8859-1. Modern platforms do know this, so use the older
name.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t3901: Use ISO8859-1 instead of ISO-8859-1 for backward... Brandon Casey Mon, 18 May 2009 23:44:43 +0000 (18:44 -0500)

t3901: Use ISO8859-1 instead of ISO-8859-1 for backward compatibility

Some ancient platforms do not have an extensive list of alternate names for
character encodings. For example, Solaris 7 does not know that ISO-8859-1
is the same as ISO8859-1. Modern platforms do know this, so use the older
name.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t3901: avoid negation on right hand side of '|'Brandon Casey Mon, 18 May 2009 23:44:42 +0000 (18:44 -0500)

t3901: avoid negation on right hand side of '|'

Some shells do not properly handle constructs of the form:

spew_something | ! process_input

So rewrite this to be:

spew_something | process_input; test $? != 0

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

builtin-mailinfo.c: use "ISO8859-1" instead of "latin1... Brandon Casey Mon, 18 May 2009 23:44:41 +0000 (18:44 -0500)

builtin-mailinfo.c: use "ISO8859-1" instead of "latin1" as fallback encoding

Some platforms do not understand the character encoding "latin1" which is
another name for "ISO8859-1". So use "ISO8859-1" instead which all tested
platforms understand.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

builtin-mailinfo.c: compare character encodings case... Brandon Casey Mon, 18 May 2009 23:44:40 +0000 (18:44 -0500)

builtin-mailinfo.c: compare character encodings case insensitively

When converting between character encodings, git tests whether the "from"
encoding and the "to" encoding have the same name. git should perform this
test case insensitively so that e.g. utf-8 is not seen as a different
encoding than UTF-8.

Additionally, it is not necessary to call tolower() anymore on the encodings
extracted from the mail message.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Use 'UTF-8' rather than 'utf-8' everywhere for backward... Brandon Casey Mon, 18 May 2009 23:44:39 +0000 (18:44 -0500)

Use 'UTF-8' rather than 'utf-8' everywhere for backward compatibility

Some ancient platforms (Solaris 7, IRIX 6.5) do not understand 'utf-8', but
all tested implementations understand 'UTF-8'.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t3900: use ancient iconv names for backward compatibilityBrandon Casey Mon, 18 May 2009 23:44:38 +0000 (18:44 -0500)

t3900: use ancient iconv names for backward compatibility

Some old iconv implementations do not have many alternate names and/or
do not match character encoding names case insensitively. These
implementations can not tell that utf-8 and UTF-8 are the same encoding
and fail when trying to do the conversion. So use the old names, which
modern implementations still support.

The following conversions were performed:

utf-8 --> UTF-8
ISO-8859-1 --> ISO8859-1
EUCJP --> eucJP

Also update t9129 and t9500 which make use of the test files in t/t3900.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'np/push-delta'Junio C Hamano Mon, 18 May 2009 16:01:16 +0000 (09:01 -0700)

Merge branch 'np/push-delta'

* np/push-delta:
allow OFS_DELTA objects during a push

Merge branch 'ar/merge-one-file-diag'Junio C Hamano Mon, 18 May 2009 16:01:11 +0000 (09:01 -0700)

Merge branch 'ar/merge-one-file-diag'

* ar/merge-one-file-diag:
Clarify kind of conflict in merge-one-file helper

Merge branch 'ar/unlink-err'Junio C Hamano Mon, 18 May 2009 16:01:06 +0000 (09:01 -0700)

Merge branch 'ar/unlink-err'

* ar/unlink-err:
print unlink(2) errno in copy_or_link_directory
replace direct calls to unlink(2) with unlink_or_warn
Introduce an unlink(2) wrapper which gives warning if unlink failed

Merge branch 'jk/maint-add-empty'Junio C Hamano Mon, 18 May 2009 16:01:01 +0000 (09:01 -0700)

Merge branch 'jk/maint-add-empty'

* jk/maint-add-empty:
add: don't complain when adding empty project root

Merge branch 'js/add-edit'Junio C Hamano Mon, 18 May 2009 16:00:06 +0000 (09:00 -0700)

Merge branch 'js/add-edit'

* js/add-edit:
t3702: fix reliance on SHELL_PATH being '/bin/sh'
git-add: introduce --edit (to edit the diff vs. the index)

Merge branch 'mh/diff-stat-color'Junio C Hamano Mon, 18 May 2009 15:59:54 +0000 (08:59 -0700)

Merge branch 'mh/diff-stat-color'

* mh/diff-stat-color:
diff: do not color --stat output like patch context

Merge branch 'mh/show-branch-color'Junio C Hamano Mon, 18 May 2009 15:59:48 +0000 (08:59 -0700)

Merge branch 'mh/show-branch-color'

* mh/show-branch-color:
bash completion: show-branch color support
show-branch: color the commit status signs

Conflicts:
contrib/completion/git-completion.bash

Merge branch 'ac/graph-horizontal-line'Junio C Hamano Mon, 18 May 2009 15:59:30 +0000 (08:59 -0700)

Merge branch 'ac/graph-horizontal-line'

* ac/graph-horizontal-line:
graph API: Use horizontal lines for more compact graphs

Merge branch 'ae/anon-fetch-info'Junio C Hamano Mon, 18 May 2009 15:59:27 +0000 (08:59 -0700)

Merge branch 'ae/anon-fetch-info'

* ae/anon-fetch-info:
fetch: Strip usernames from url's before storing them

Merge branch 'maint'Junio C Hamano Mon, 18 May 2009 15:59:20 +0000 (08:59 -0700)

Merge branch 'maint'

* maint:
show-branch: Fix die message in parse_reflog_param()

bisect: check ancestors without forking a "git rev... Christian Couder Sun, 17 May 2009 15:36:46 +0000 (17:36 +0200)

bisect: check ancestors without forking a "git rev-list" process

We must save the pending commits that will be used during revision
walking and unparse them after, because we want to leave a clean
state for the next revision walking that will try to find the best
bisection point.

As we don't fork a process anymore to call "git rev-list", we need
to remove the use of GIT_TRACE to check how "git rev-list" is
called from the t6030 test that uses it.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

commit: add function to unparse a commit and its parentsChristian Couder Sun, 17 May 2009 15:36:45 +0000 (17:36 +0200)

commit: add function to unparse a commit and its parents

This patch adds the "unparse_commit" function that returns a commit
into an unparsed state by freeing its data and resetting its fields
to 0.

Its parents are recursively unparsed too, because they might have
been changed. But its tree is not unparsed as it should not have
been modifed.

Note that as the "flags" and "used" fields may be used even if the
object is not parsed, we have to reset them anyway.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

bisect: rework some rev related functions to make them... Christian Couder Sun, 17 May 2009 15:36:44 +0000 (17:36 +0200)

bisect: rework some rev related functions to make them more reusable

This patches changes the "bisect_rev_setup" and "bisect_common"
functions to make it easier to reuse them in a later patch.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

format-patch: migrate to parse-options APIStephen Boyd Sat, 16 May 2009 09:24:46 +0000 (02:24 -0700)

format-patch: migrate to parse-options API

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

show-branch: Fix die message in parse_reflog_param()Stephen Boyd Sun, 17 May 2009 10:47:02 +0000 (03:47 -0700)

show-branch: Fix die message in parse_reflog_param()

Commit 76a44c5 (show-branch --reflog: show the reflog message at the
top, 2007-01-19) introduced parse_reflog_param(). The die() call was
incorrectly passed arg + 9, when it should have been passed arg.

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

Merge branch 'maint'Junio C Hamano Sun, 17 May 2009 06:08:49 +0000 (23:08 -0700)

Merge branch 'maint'

* maint:
completion: add missing options to show-branch and show
dir.c: clean up handling of 'path' parameter in read_directory_recursive()
Fix type-punning issues

completion: add missing options to show-branch and... Stephen Boyd Sun, 17 May 2009 03:42:43 +0000 (20:42 -0700)

completion: add missing options to show-branch and show

Add --oneline and --abbrev-commit to show and --sparse to show-branch.

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

dir.c: clean up handling of 'path' parameter in read_di... Linus Torvalds Thu, 14 May 2009 20:05:03 +0000 (13:05 -0700)

dir.c: clean up handling of 'path' parameter in read_directory_recursive()

Right now we pass two different pathnames ('path' and 'base') down to
read_directory_recursive(), and the only real reason for that is that we
want to allow an empty 'base' parameter, but when we do so, we need the
pathname to "opendir()" to be "." rather than the empty string.

And rather than handle that confusion in the caller, we can just fix
read_directory_recursive() to handle the case of an empty path itself,
by just passing opendir() a "." ourselves if the path is empty.

This would allow us to then drop one of the pathnames entirely from the
calling convention, but rather than do that, we'll start separating them
out as a "filesystem pathname" (the one we use for filesystem accesses)
and a "git internal base name" (which is the name that we use for git
internally).

That will eventually allow us to do things like handle different
encodings (eg the filesystem pathnames might be Latin1, while git itself
would use UTF-8 for filename information).

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

Fix type-punning issuesDan McGee Tue, 12 May 2009 01:17:38 +0000 (20:17 -0500)

Fix type-punning issues

In these two places we are casting part of our unsigned char sha1 array into
an unsigned int, which violates GCCs strict-aliasing rules (and probably
other compilers).

Signed-off-by: Dan McGee <dpmcgee@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint'Junio C Hamano Sun, 17 May 2009 02:49:42 +0000 (19:49 -0700)

Merge branch 'maint'

* maint:
test: checkout shouldn't say that HEAD has moved if it didn't
completion: enhance "current branch" display
completion: simplify "current branch" in __git_ps1()
completion: fix PS1 display during a merge on detached HEAD
builtin-checkout: Don't tell user that HEAD has moved before it has
pre-commit.sample: don't print incidental SHA1
tests: Add tests for missing format-patch long options
api-parse-options.txt: use 'func' instead of 'funct'
Turn on USE_ST_TIMESPEC for OpenBSD
ls-tree manpage: output of ls-tree is compatible with update-index
ls-tree manpage: use "unless" instead of "when ... is not"

test: checkout shouldn't say that HEAD has moved if... Nanako Shiraishi Sun, 17 May 2009 02:43:08 +0000 (11:43 +0900)

test: checkout shouldn't say that HEAD has moved if it didn't

Signed-off-by: しらいしななこ <nanako3@lavabit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

completion: enhance "current branch" displayJunio C Hamano Sun, 10 May 2009 08:56:21 +0000 (01:56 -0700)

completion: enhance "current branch" display

Introduce GIT_PS1_DESCRIBE option you can set to "contains", "branch", or
"describe" to tweak the way how a detached HEAD is described.

The default behaviour is to describe only exact match with some tag
(otherwise use the first 7 hexdigits) as before.

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

completion: simplify "current branch" in __git_ps1()Junio C Hamano Sun, 10 May 2009 08:53:19 +0000 (01:53 -0700)

completion: simplify "current branch" in __git_ps1()

As I very often work on a detached HEAD, I found it pretty confusing
when __git_ps1() said 'some-name'. Did I create a branch with that name
by mistake, or do I happen to be on a commit with that exact tag?

This patch fixes the issue by enclosing non branch names in a pair of
parentheses when used to substitute %s token in __git_ps1() argument.

It also fixes a small bug where the branch part is left empty when
.git/HEAD is unreadable for whatever reason. The output now says
"(unknown)".

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

completion: fix PS1 display during a merge on detached... Junio C Hamano Sat, 16 May 2009 18:46:22 +0000 (11:46 -0700)

completion: fix PS1 display during a merge on detached HEAD

If your merge stops in a conflict while on a detached HEAD, recent
completion code fails to show anything. This was because various cases
added to support the operation-in-progress markers (e.g. REBASE, MERGING)
forgot that they need to set the variable "b" to something for the result
they computed to be displayed at all.

Probably not many people make trial merges on a detached HEAD (which is
tremendously useful feature of git, by the way), and that may be why this
was not noticed for a long time.

Acked-By: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Improve the naming of guessed target repository for... Alex Riesen Wed, 13 May 2009 16:32:06 +0000 (18:32 +0200)

Improve the naming of guessed target repository for git clone

Strip leading and trailing spaces off guessed target directory, and
replace sequences of whitespace and 'control' characters with one
space character.

User still can have any name by specifying it explicitely after url.

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Use UTF-8 instead of utf8 for backward compatibilityAlex Riesen Thu, 14 May 2009 12:55:54 +0000 (14:55 +0200)

Use UTF-8 instead of utf8 for backward compatibility

An old iconv (GNU libiconv 1.11) does not know about utf8, it does know
UTF-8 though, which is also understood by all newer iconv implementations.

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Revert "git-add--interactive: remove hunk coalescing"Junio C Hamano Sat, 16 May 2009 17:48:23 +0000 (10:48 -0700)

Revert "git-add--interactive: remove hunk coalescing"

This reverts commit 0beee4c6dec15292415e3d56075c16a76a22af54 but with a
bit of twist, as we have added "edit hunk manually" hack and we cannot
rely on the original line numbers of the hunks that were manually edited.

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

Splitting a hunk that adds a line at the top fails... Matt Graham Sat, 16 May 2009 03:10:19 +0000 (23:10 -0400)

Splitting a hunk that adds a line at the top fails in "add -p"

Splitting a hunk into two in add -p doesn't work for a diff that adds a
new line at the top of the file with other add in the same hunk.

Signed-off-by: Matthew Graham <mdg149@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

builtin-checkout: Don't tell user that HEAD has moved... Daniel Cordero Sat, 16 May 2009 17:54:45 +0000 (10:54 -0700)

builtin-checkout: Don't tell user that HEAD has moved before it has

Previously, checkout would tell the user this message before moving HEAD,
without regard to whether the upcoming move will result in success.
If the move failed, this causes confusion.

Show the message after the move, unless the move failed.

Signed-off-by: Daniel Cordero <theappleman@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

pre-commit.sample: don't print incidental SHA1Jim Meyering Sat, 16 May 2009 10:21:50 +0000 (12:21 +0200)

pre-commit.sample: don't print incidental SHA1

Make the sample pre-commit hook script discard
all git-rev-parse output, not just stderr.
Otherwise, it would print an SHA1.

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

tests: Add tests for missing format-patch long optionsStephen Boyd Sat, 16 May 2009 09:24:45 +0000 (02:24 -0700)

tests: Add tests for missing format-patch long options

Exercise format-patch's --signoff, --in-reply-to and --start-number long
options.

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

api-parse-options.txt: use 'func' instead of 'funct'Stephen Boyd Sat, 16 May 2009 09:24:44 +0000 (02:24 -0700)

api-parse-options.txt: use 'func' instead of 'funct'

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

mktree: validate entry type in inputJosh Micich Thu, 14 May 2009 22:49:10 +0000 (15:49 -0700)

mktree: validate entry type in input

Previously mktree would accept tree entries which had a mismatch between
the declared type and the actual type of object. Check the actual type of
the object when it is available locally.

Signed-off-by: Josh Micich <josh.micich@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

mktree --batch: build more than one tree objectJosh Micich Thu, 14 May 2009 19:51:15 +0000 (12:51 -0700)

mktree --batch: build more than one tree object

This option works in a similar way to the '--batch' option of 'git cat-file'.
It enables creation of many tree objects with a single process.

The change was motivated by performance considerations in applications that
need to create many tree objects. A non-rigorous test showed tree creation
times improved from (roughly) 200ms to 50ms.

Signed-off-by: Josh Micich <josh.micich@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

mktree --missing: updated usage message and man pageJosh Micich Thu, 14 May 2009 19:46:03 +0000 (12:46 -0700)

mktree --missing: updated usage message and man page

Update usage message in builtin-mktree.c to include '--missing'. Do the
same to man page and clarify that the input does not have to be sorted.

Signed-off-by: Josh Micich <josh.micich@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Turn on USE_ST_TIMESPEC for OpenBSDTony Kemp Thu, 14 May 2009 06:47:41 +0000 (16:47 +1000)

Turn on USE_ST_TIMESPEC for OpenBSD

Like Darwin, OpenBSD's stat struct uses st_ctimespec and st_mtimestruct
rather than st_ctim and st_mtim.

Signed-off-by: Tony Kemp <tony.kemp@newcastle.edu.au>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint-1.6.2' into maintJunio C Hamano Sat, 16 May 2009 07:12:58 +0000 (00:12 -0700)

Merge branch 'maint-1.6.2' into maint

* maint-1.6.2:
ls-tree manpage: output of ls-tree is compatible with update-index
ls-tree manpage: use "unless" instead of "when ... is not"

Fix behavior with non-commit upstream referencesMichael J Gruber Mon, 11 May 2009 14:42:54 +0000 (16:42 +0200)

Fix behavior with non-commit upstream references

stat_tracking_info() assumes that upstream references (as specified by
--track or set up automatically) are commits. By calling lookup_commit()
on them, create_objects() creates objects for them with type commit no
matter what their real type is; this disturbs lookup_tag() later on in the
call sequence, leading to git status, git branch -v and git checkout
erroring out.

Fix this by using lookup_commit_reference() instead so that (annotated)
tags can be used as upstream references.

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

Merge branch 'maint-1.6.1' into maint-1.6.2Junio C Hamano Thu, 14 May 2009 04:06:11 +0000 (21:06 -0700)

Merge branch 'maint-1.6.1' into maint-1.6.2

* maint-1.6.1:
ls-tree manpage: output of ls-tree is compatible with update-index
ls-tree manpage: use "unless" instead of "when ... is not"

Merge branch 'maint-1.6.0' into maint-1.6.1Junio C Hamano Thu, 14 May 2009 04:05:59 +0000 (21:05 -0700)

Merge branch 'maint-1.6.0' into maint-1.6.1

* maint-1.6.0:
ls-tree manpage: output of ls-tree is compatible with update-index
ls-tree manpage: use "unless" instead of "when ... is not"

Prettify log decorations even moreFelipe Contreras Wed, 13 May 2009 21:32:53 +0000 (00:32 +0300)

Prettify log decorations even more

"tag: v1.6.2.5" looks much better than "tag: refs/tags/v1.6.2.5".

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

Change prettify_ref to prettify_refnameFelipe Contreras Wed, 13 May 2009 21:22:04 +0000 (00:22 +0300)

Change prettify_ref to prettify_refname

In preparation to be used when the ref object is not available

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

send-email: Add config option for sender addressTrent Piepho Tue, 12 May 2009 22:48:56 +0000 (15:48 -0700)

send-email: Add config option for sender address

The sender address, as specified with the '--from' command line option,
couldn't be set in the config file. So add a new config option,
'sendemail.from', which sets it. One can use 'sendemail.<identity>.from'
as well of course, which is likely the more useful case.

The sender address would default to GIT_AUTHOR_IDENT, which is usually the
right thing, but this doesn't allow switching based on the identity
selected. It's possible to switch the SMTP server and envelope sender by
using the '--identity' option, in which case one probably wants to use a
different from address as well, but this had to be manually specified.

The documentation for 'from' is also corrected somewhat. If '--from' is
specified (or the new sendemail.from option is used) then the user isn't
prompted. The default with no '--from' option (or sendemail.from option)
is GIT_AUTHOR_IDENT first then GIT_COMMITTER_IDENT, not just
GIT_COMMITTER_IDENT.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Add NO_CROSS_DIRECTORY_HARDLINKS support to the MakefileJohannes Schindelin Mon, 11 May 2009 11:02:18 +0000 (13:02 +0200)

Add NO_CROSS_DIRECTORY_HARDLINKS support to the Makefile

When the installed programs are tar'ed up and installed on a system where
bin/ and libexec/git-core/ live on different file systems, we do not want
libexec/git-core/git-* to be hardlinks to bin/git.

Noticed by Cedric Staniewski.

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

Test tracking of non-commit upstreamsMichael J Gruber Mon, 11 May 2009 14:42:53 +0000 (16:42 +0200)

Test tracking of non-commit upstreams

git-checkout and git-branch allow setting up an arbitrary committish as
the upstream reference for --track. In particular, tags are allowed. But
they and git-status barf on non-commit upstreams as soon as they are
asked for trackings stats.

Expose this shortcoming by adding two tests: annotated tags are affected
but lightweight tags are OK.

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

Quote LF in urls git fetch saves in FETCH_HEADAlex Riesen Wed, 13 May 2009 18:08:53 +0000 (20:08 +0200)

Quote LF in urls git fetch saves in FETCH_HEAD

The fmt-merge-msg does a strong syntax checking of its input and fails
with if it is incorrect. The LF character is the only character
important for fmt-merge-msg. As the url in FETCH_HEAD plays only
informational role, a quoted representation of the url should be good
and true enough.
The url often comes from either user-editable config or command line,
so it is reasonable to expect all kinds of characters in it, including
the characters which the format of FETCH_HEAD considers special (line
separator in this case).

Noticed and reported by Hugo Mildenberger.

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation: clarify / requirement in 'git check... Michael J Gruber Wed, 13 May 2009 15:43:06 +0000 (17:43 +0200)

Documentation: clarify / requirement in 'git check-ref-format'

'git check-ref-format' checks for the presence of at least one '/', the
idea being that there should be no refs directly below 'refs/', so there
should be a category like 'heads/' or 'tags/' in a refname.

Try and make this clearer in the man page.

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

bash completion: complete variable names for "git confi... Stephen Boyd Sat, 9 May 2009 01:23:32 +0000 (18:23 -0700)

bash completion: complete variable names for "git config" with options

This makes it easier for users to get and unset their configuration
variables without having to open documentation or dig through their
configuration file.

__git_config_get_set_variables() retrieves the set configuration
variables from the appropriate configuration file. For example, if
the user has previously specified --global only the global variables
are returned. The same applies for --system, and --file. If no
location has been specified, all set variables are returned.

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

gitweb: Remove unused $hash_base parameter from normali... Jakub Narebski Mon, 11 May 2009 17:45:11 +0000 (19:45 +0200)

gitweb: Remove unused $hash_base parameter from normalize_link_target

...since it was decided for normalize_link_target to only mangle
pathname, and do not try to check if target is present in $hash_base
tree, for performance reasons.

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

gitweb: Simplify snapshot format detection logic in... Jakub Narebski Mon, 11 May 2009 17:42:47 +0000 (19:42 +0200)

gitweb: Simplify snapshot format detection logic in evaluate_path_info

This issue was caught by perlcritic in harsh severity level noticing
that catch variable was used outside conditional thanks to the
Perl::Critic::Policy::RegularExpressions::ProhibitCaptureWithoutTest
policy. See "Perl Best Practices", chapter 12. Regular Expressions,
section 12.15. Captured Values:

Pattern matches that fail never assign anything to $1, $2, etc.,
nor do they leave those variables undefined. After an unsuccessful
pattern match, the numeric capture variables remain exactly as they
were before the match was attempted.

New version is in my opinion much easier to understand; previous
version worked correctly due to the fact that we returned from loop
on first found match.

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

gitweb: Use capturing parentheses only when you intend... Jakub Narebski Mon, 11 May 2009 17:39:43 +0000 (19:39 +0200)

gitweb: Use capturing parentheses only when you intend to capture

Non-capturing groups are useful because they have better runtime
performance and do not copy strings to the magic global capture
variables.

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

gitweb: Replace wrongly added tabs with spacesJakub Narebski Mon, 11 May 2009 17:37:28 +0000 (19:37 +0200)

gitweb: Replace wrongly added tabs with spaces

In two places there was hard tab character instead of space.
Fix this.

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

Merge branch 'maint'Junio C Hamano Wed, 13 May 2009 05:51:09 +0000 (22:51 -0700)

Merge branch 'maint'

* maint:
GIT 1.6.3.1
Revert "checkout branch: prime cache-tree fully"

GIT 1.6.3.1 v1.6.3.1Junio C Hamano Wed, 13 May 2009 05:28:22 +0000 (22:28 -0700)

GIT 1.6.3.1

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

Merge branch 'maint-1.6.2' into maintJunio C Hamano Tue, 12 May 2009 16:58:34 +0000 (09:58 -0700)

Merge branch 'maint-1.6.2' into maint

* maint-1.6.2:
Revert "checkout branch: prime cache-tree fully"

Merge branch 'jc/maint-read-tree-multi' into maint... Junio C Hamano Tue, 12 May 2009 16:58:21 +0000 (09:58 -0700)

Merge branch 'jc/maint-read-tree-multi' into maint-1.6.2

* jc/maint-read-tree-multi:
Revert "checkout branch: prime cache-tree fully"

Revert "checkout branch: prime cache-tree fully"Junio C Hamano Tue, 12 May 2009 16:41:28 +0000 (09:41 -0700)

Revert "checkout branch: prime cache-tree fully"

The logic in 83ae209 (checkout branch: prime cache-tree fully,
2009-04-20) is bogus; checkout can switch branches with a dirty
index and in such a case the tree won't match HEAD.

Add t2014-switch to catch this breakage.

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

t3900: ISO-2022-JP has more than one popular variantsJunio C Hamano Tue, 12 May 2009 09:01:51 +0000 (02:01 -0700)

t3900: ISO-2022-JP has more than one popular variants

When converting from other encodings (e.g. EUC-JP or UTF-8), there are
subtly different variants of ISO-2022-JP, all of which are valid. At the
end of line or when a run of string switches to 1-byte sequence, ESC ( B
can be used to switch to ASCII or ESC ( J can be used to switch to ISO
646:JP (JIS X 0201) but they essentially are the same character set and
are used interchangeably. Similarly the set ESC $ @ switches to (JIS X
0208-1978) and ESC $ B switches to (JIS X 0208-1983) are in practice used
interchangeably.

Depending on the iconv library and the locale definition on the system, a
program that converts from another encoding to ISO-2022-JP can produce
different byte sequence, and GIT_TEST_CMP (aka "diff -u") will report the
difference as a failure.

Fix this by converting the expected and the actual output to UTF-8 before
comparing when the end result is ISO-2022-JP. The test vector string in
t3900/ISO-2022-JP.txt is expressed with ASCII and JIS X 0208-1983, but it
can be expressed with any other possible variant, and when converted back
to UTF-8, these variants produce identical byte sequences.

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

gitweb: Use block form of map/grep in a few cases moreJakub Narebski Sun, 10 May 2009 00:40:37 +0000 (02:40 +0200)

gitweb: Use block form of map/grep in a few cases more

Use block form of 'grep' i.e. 'grep {BLOCK} LIST' rather than
'grep(EXPR, LIST)' in filter_snapshot_fmts subroutine. This makes
code more readable, as expression is rather long, and statement above
there is 'map' with very similar expression also in the block form.

Remove unnecessary and misleading parentheses around block form 'map'
arguments in quote_command subroutine.

The inner "map" in format_snapshot_links was left alone, as it is not
clear whether adding parentheses or changing it into block form would
improve readibility and clarity of this code.

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

gitweb: Always use three argument form of openJakub Narebski Mon, 11 May 2009 01:29:40 +0000 (03:29 +0200)

gitweb: Always use three argument form of open

From 94638fb6edf3ea693228c680a6a30271ccd77522 Mon Sep 17 00:00:00 2001
From: Jakub Narebski <jnareb@gmail.com>
Date: Mon, 11 May 2009 03:25:55 +0200
Subject: [PATCH] gitweb: Localize magic variable $/

Instead of undefining and then restoring magic variable $/ (input
record separator) for 'slurp mode', localize it.

While at it, state explicitely that "local $/;" makes it undefined, by
using explicit "local $/ = undef;".

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

gitweb: Always use three argument form of openJakub Narebski Sun, 10 May 2009 00:38:34 +0000 (02:38 +0200)

gitweb: Always use three argument form of open

In most cases (except insert_file() subroutine) we used old two argument
form of 'open' to open files for reading. This can cause subtle bugs when
$projectroot or $projects_list file starts with mode characters ('>', '<',
'+<', '|', etc.) or with leading whitespace; and also when $projects_list
file or $mimetypes_file or ctags files end with trailing whitespace or '|'.

Additionally it is also more clear to explicitly state that we open those
files for reading.

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

gitweb: Do not use bareword filehandlesJakub Narebski Mon, 11 May 2009 01:21:06 +0000 (03:21 +0200)

gitweb: Do not use bareword filehandles

gitweb: Do not use bareword filehandles

The script was using bareword filehandles. This is considered a bad
practice so they have been changed to indirect filehandles.

Changes touch git_get_project_ctags and mimetype_guess_file;
while at it rename local variable from $mime to $mimetype (in
mimetype_guess_file) to better reflect its value (its contents).

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

mktree --missing: allow missing objectsJunio C Hamano Sun, 10 May 2009 18:30:03 +0000 (11:30 -0700)

mktree --missing: allow missing objects

We need to allow input lines that point at objects that we do not
have when dealing with submodule entries anyway. This adds an explicit
option to allow missing objects of other types, to be consistent with
the use of --info-only option to the update-index command and --missing-ok
option to the write-tree command.

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

bisect: make "git bisect" use new "--next-all" bisect... Christian Couder Sat, 9 May 2009 15:55:47 +0000 (17:55 +0200)

bisect: make "git bisect" use new "--next-all" bisect-helper function

This patch replace the "--next-exit" option of "git bisect--helper"
with a "--next-all" option that does merge base checking using
the "check_good_are_ancestors_of_bad" function implemented in
"bisect.c" in a former patch.

The new "--next-all" option is then used in "git-bisect.sh" instead
of the "--next-exit" option, and all the shell functions in
"git-bisect.sh" that are now unused are removed.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

bisect: add "check_good_are_ancestors_of_bad" functionChristian Couder Sat, 9 May 2009 15:55:46 +0000 (17:55 +0200)

bisect: add "check_good_are_ancestors_of_bad" function

This is a port of the function with the same name that is in
"git-bisect.sh". The new function is not used yet but will be in
a later patch.

We also implement an helper "check_ancestors" function that use
"start_command" and "finish_command" to launch
"git rev-list $good ^$bad".

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

bisect: implement the "check_merge_bases" functionChristian Couder Sat, 9 May 2009 15:55:45 +0000 (17:55 +0200)

bisect: implement the "check_merge_bases" function

And all functions needed to make it work.

This is a port from the shell function with the same name
"git-bisect.sh". This function is not used yet but it will be used
later.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

bisect: automatically sort sha1_array if needed when... Christian Couder Sat, 9 May 2009 15:55:44 +0000 (17:55 +0200)

bisect: automatically sort sha1_array if needed when looking it up

This makes sha1_array easier to use, so later patches will be simpler.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

bisect: make skipped array functions more genericChristian Couder Sat, 9 May 2009 15:55:43 +0000 (17:55 +0200)

bisect: make skipped array functions more generic

So they can be used on the good array too.

This is done by renaming many functions and some variables to
remove "skip" in the name, and by adding a
"struct sha1_array *array" argument where needed.

While at it, make the second argument to "lookup_sha1_array"
const. It becomes "const unsigned char *sha1".

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

bisect: remove too much function nestingChristian Couder Sat, 9 May 2009 15:55:42 +0000 (17:55 +0200)

bisect: remove too much function nesting

This patch moves some function calls into "bisect_next_exit" so
that functions are nesting less.

The call to "bisect_rev_setup" is moved from "bisect_common" into
"bisect_next_exit" and the call to "read_bisect_refs" from
"bisect_rev_setup" into "bisect_next_exit".

While at it, "rev_argv" is moved into "bisect_rev_setup".

This will make it easier and cleaner to implement checking merge
bases.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

bisect: use new "struct argv_array" to prepare argv... Christian Couder Sat, 9 May 2009 15:55:41 +0000 (17:55 +0200)

bisect: use new "struct argv_array" to prepare argv for "setup_revisions"

Because we will use other instances of this struct.

The "rev_argv_push" function is changed into 2 functions
"argv_array_push" and "argv_array_push_sha1" that take a "struct
argv_array *" as first argument. And these functions are used to
simplify "bisect_rev_setup".

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

bisect: store good revisions in a "sha1_array"Christian Couder Sat, 9 May 2009 15:55:40 +0000 (17:55 +0200)

bisect: store good revisions in a "sha1_array"

This will make it easier to use good revisions for checking merge
bases later.

To simplify the code, a new "sha1_array_push" function is also
introduced.

And while at it we move the earlier part of the code to fill the
argv that is passed to "setup_revisions", so that all this code is
now completely after "read_bisect_refs".

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

bisect: implement "rev_argv_push" to fill an argv with... Christian Couder Sat, 9 May 2009 15:55:39 +0000 (17:55 +0200)

bisect: implement "rev_argv_push" to fill an argv with revs

This patch is a minor clean up right now, but the new function
will evolve and be used more later.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

bisect: use "sha1_array" to store skipped revisionsChristian Couder Sat, 9 May 2009 15:55:38 +0000 (17:55 +0200)

bisect: use "sha1_array" to store skipped revisions

This patch creates a "struct sha1_array" to store skipped revisions,
so that the same struct can be reused in a later patch for good
revisions.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t1010: add mktree testJunio C Hamano Sun, 10 May 2009 18:18:59 +0000 (11:18 -0700)

t1010: add mktree test

So far mktree (which has always been a quick hack) had no test.
At least give it a bit of test coverage.

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

mktree: do not barf on a submodule commitJunio C Hamano Sun, 10 May 2009 17:45:52 +0000 (10:45 -0700)

mktree: do not barf on a submodule commit

It is perfectly normal if a tree entry points at a missing commit as long
as the mode of the entry says it is a submodule.

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

builtin-mktree.c: use a helper function to handle one... Junio C Hamano Sun, 10 May 2009 17:41:22 +0000 (10:41 -0700)

builtin-mktree.c: use a helper function to handle one line of input

The main() function used to do the whole thing; this moves the handling of
a single input line to a separate function to make it easier to read.

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

mktree: use parse-optionsJunio C Hamano Sun, 10 May 2009 17:31:56 +0000 (10:31 -0700)

mktree: use parse-options

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