gitweb.git
refs.c: Remove unused get_ref_sha1()Johannes Sixt Thu, 15 Nov 2007 16:33:44 +0000 (17:33 +0100)

refs.c: Remove unused get_ref_sha1()

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Allow ETC_GITCONFIG to be a relative path.Johannes Sixt Tue, 13 Nov 2007 20:05:06 +0000 (21:05 +0100)

Allow ETC_GITCONFIG to be a relative path.

If ETC_GITCONFIG is not an absolute path, interpret it relative to
--exec-dir. This makes the installed binaries relocatable because the
prefix is not compiled-in.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Introduce git_etc_gitconfig() that encapsulates access... Johannes Sixt Tue, 13 Nov 2007 20:05:05 +0000 (21:05 +0100)

Introduce git_etc_gitconfig() that encapsulates access of ETC_GITCONFIG.

In a subsequent patch the path to the system-wide config file will be
computed. This is a preparation for that change. It turns all accesses
of ETC_GITCONFIG into function calls. There is no change in behavior.

As a consequence, config.c is the only file that needs the definition of
ETC_GITCONFIG. Hence, -DETC_GITCONFIG is removed from the CFLAGS and a
special build rule for config.c is introduced. As a side-effect, changing
the defintion of ETC_GITCONFIG (e.g. in config.mak) does not trigger a
complete rebuild anymore.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Allow a relative builtin template directory.Johannes Sixt Tue, 13 Nov 2007 20:05:04 +0000 (21:05 +0100)

Allow a relative builtin template directory.

In order to make git relocatable (i.e. not have the prefix compiled-in)
the template directory must depend on the location where this git instance
is found, which is GIT_EXEC_DIR.

The exec path is prepended only if the compiled-in default template
directory is to be used and that is relative. Any relative directories
that are specified via environment variable or the --exec-dir switch are
taken as is.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Close files opened by lock_file() before unlinking.Johannes Schindelin Tue, 13 Nov 2007 20:05:03 +0000 (21:05 +0100)

Close files opened by lock_file() before unlinking.

This is needed on Windows since open files cannot be unlinked.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

builtin run_command: do not exit with -1.Johannes Sixt Tue, 13 Nov 2007 20:05:02 +0000 (21:05 +0100)

builtin run_command: do not exit with -1.

There are shells that do not correctly detect an exit code of -1 as a
failure. We simply truncate the status code to the lower 8 bits.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Move #include <sys/select.h> and <sys/ioctl.h> to git... Johannes Sixt Tue, 13 Nov 2007 20:05:01 +0000 (21:05 +0100)

Move #include <sys/select.h> and <sys/ioctl.h> to git-compat-util.h.

... since all system headers are pulled in via git-compat-util.h

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Use is_absolute_path() in sha1_file.c.Johannes Sixt Tue, 13 Nov 2007 20:05:00 +0000 (21:05 +0100)

Use is_absolute_path() in sha1_file.c.

There are some places that test for an absolute path. Use the helper
function to ease porting.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Skip t3902-quoted.sh if the file system does not suppor... Johannes Sixt Tue, 13 Nov 2007 20:04:59 +0000 (21:04 +0100)

Skip t3902-quoted.sh if the file system does not support funny names.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t5302-pack-index: Skip tests of 64-bit offsets if neces... Johannes Sixt Tue, 13 Nov 2007 20:04:58 +0000 (21:04 +0100)

t5302-pack-index: Skip tests of 64-bit offsets if necessary.

There are platforms where off_t is not 64 bits wide. In this case many tests
are doomed to fail. Let's skip them.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t7501-commit.sh: Not all seds understand option -iJohannes Sixt Tue, 13 Nov 2007 20:04:57 +0000 (21:04 +0100)

t7501-commit.sh: Not all seds understand option -i

Use mv instead.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t5300-pack-object.sh: Split the big verify-pack test... Johannes Sixt Tue, 13 Nov 2007 20:04:56 +0000 (21:04 +0100)

t5300-pack-object.sh: Split the big verify-pack test into smaller parts.

This makes it easier to spot which of the tests failed.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

core.excludesfile clean-upJunio C Hamano Wed, 14 Nov 2007 08:05:00 +0000 (00:05 -0800)

core.excludesfile clean-up

There are inconsistencies in the way commands currently handle
the core.excludesfile configuration variable. The problem is
the variable is too new to be noticed by anything other than
git-add and git-status.

* git-ls-files does not notice any of the "ignore" files by
default, as it predates the standardized set of ignore files.
The calling scripts established the convention to use
.git/info/exclude, .gitignore, and later core.excludesfile.

* git-add and git-status know about it because they call
add_excludes_from_file() directly with their own notion of
which standard set of ignore files to use. This is just a
stupid duplication of code that need to be updated every time
the definition of the standard set of ignore files is
changed.

* git-read-tree takes --exclude-per-directory=<gitignore>,
not because the flexibility was needed. Again, this was
because the option predates the standardization of the ignore
files.

* git-merge-recursive uses hardcoded per-directory .gitignore
and nothing else. git-clean (scripted version) does not
honor core.* because its call to underlying ls-files does not
know about it. git-clean in C (parked in 'pu') doesn't either.

We probably could change git-ls-files to use the standard set
when no excludes are specified on the command line and ignore
processing was asked, or something like that, but that will be a
change in semantics and might break people's scripts in a subtle
way. I am somewhat reluctant to make such a change.

On the other hand, I think it makes perfect sense to fix
git-read-tree, git-merge-recursive and git-clean to follow the
same rule as other commands. I do not think of a valid use case
to give an exclude-per-directory that is nonstandard to
read-tree command, outside a "negative" test in the t1004 test
script.

This patch is the first step to untangle this mess.

The next step would be to teach read-tree, merge-recursive and
clean (in C) to use setup_standard_excludes().

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

Remove hint to use "git help -a"Theodore Ts'o Mon, 12 Nov 2007 00:57:57 +0000 (19:57 -0500)

Remove hint to use "git help -a"

The newbie user will run away screaming when they see all possible
commands. The expert user will already know about the -a option from
reading the git man page.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Make the list of common commands more exclusiveTheodore Ts'o Mon, 12 Nov 2007 00:57:56 +0000 (19:57 -0500)

Make the list of common commands more exclusive

Remove apply, archive, cherry-pick, prune, revert, and show-branch, so
"git help" is less intimidating.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'sp/fetch-fix'Junio C Hamano Wed, 14 Nov 2007 22:26:04 +0000 (14:26 -0800)

Merge branch 'sp/fetch-fix'

* sp/fetch-fix:
git-fetch: avoid local fetching from alternate (again)
rev-list: Introduce --quiet to avoid /dev/null redirects
run-command: Support sending stderr to /dev/null
git-fetch: Always fetch tags if the object they reference exists

Merge branch 'bs/maint-commit-options'Junio C Hamano Wed, 14 Nov 2007 22:25:46 +0000 (14:25 -0800)

Merge branch 'bs/maint-commit-options'

* bs/maint-commit-options:
git-commit: Add tests for invalid usage of -a/--interactive with paths
git-commit.sh: Fix usage checks regarding paths given when they do not make sense

Merge branch 'rv/maint-index-commit'Junio C Hamano Wed, 14 Nov 2007 22:25:33 +0000 (14:25 -0800)

Merge branch 'rv/maint-index-commit'

* rv/maint-index-commit:
Make GIT_INDEX_FILE apply to git-commit

Merge branch 'bs/maint-t7005'Junio C Hamano Wed, 14 Nov 2007 22:25:19 +0000 (14:25 -0800)

Merge branch 'bs/maint-t7005'

* bs/maint-t7005:
t7005-editor.sh: Don't invoke real vi when it is in GIT_EXEC_PATH

Merge branch 'jc/maint-add-sync-stat'Junio C Hamano Wed, 14 Nov 2007 22:15:40 +0000 (14:15 -0800)

Merge branch 'jc/maint-add-sync-stat'

* jc/maint-add-sync-stat:
t2200: test more cases of "add -u"
git-add: make the entry stat-clean after re-adding the same contents
ce_match_stat, run_diff_files: use symbolic constants for readability

Conflicts:

builtin-add.c

Merge branch 'mh/retag'Junio C Hamano Wed, 14 Nov 2007 22:06:09 +0000 (14:06 -0800)

Merge branch 'mh/retag'

* mh/retag:
Add tests for git tag
Reuse previous annotation when overwriting a tag

Merge branch 'jc/stash-create'Junio C Hamano Wed, 14 Nov 2007 22:05:47 +0000 (14:05 -0800)

Merge branch 'jc/stash-create'

* jc/stash-create:
git-stash: Fix listing stashes
git-merge: no reason to use cpio anymore
Revert "rebase: allow starting from a dirty tree."
rebase: allow starting from a dirty tree.
stash: implement "stash create"

Merge branch 'bg/format-patch-N'Junio C Hamano Wed, 14 Nov 2007 22:04:25 +0000 (14:04 -0800)

Merge branch 'bg/format-patch-N'

* bg/format-patch-N:
Rearrange git-format-patch synopsis to improve clarity.
format-patch: Test --[no-]numbered and format.numbered
format-patch: Add configuration and off switch for --numbered

Merge branch 'np/progress'Junio C Hamano Wed, 14 Nov 2007 22:04:19 +0000 (14:04 -0800)

Merge branch 'np/progress'

* np/progress:
nicer display of thin pack completion
make display of total transferred fully accurate
remove dead code from the csum-file interface
git-fetch: be even quieter.
make display of total transferred more accurate
sideband.c: ESC is spelled '\033' not '\e' for portability.
fix display overlap between remote and local progress

Merge branch 'js/rebase-detached'Junio C Hamano Wed, 14 Nov 2007 22:04:06 +0000 (14:04 -0800)

Merge branch 'js/rebase-detached'

* js/rebase-detached:
rebase: fix "rebase --continue" breakage
rebase: operate on a detached HEAD

Merge branch 'rs/pretty'Junio C Hamano Wed, 14 Nov 2007 22:03:50 +0000 (14:03 -0800)

Merge branch 'rs/pretty'

* rs/pretty:
Fix preprocessor logic that determines the availablity of strchrnul().
Simplify strchrnul() compat code
--format=pretty: avoid calculating expensive expansions twice
add strbuf_adddup()
--pretty=format: parse commit message only once
--pretty=format: on-demand format expansion
Add strchrnul()

Merge branch 'rr/cvsexportcommit-w'Junio C Hamano Wed, 14 Nov 2007 22:03:40 +0000 (14:03 -0800)

Merge branch 'rr/cvsexportcommit-w'

* rr/cvsexportcommit-w:
cvsexportcommit: Add switch to specify CVS workdir

Merge branch 'gh/cvsimport-user'Junio C Hamano Wed, 14 Nov 2007 22:03:27 +0000 (14:03 -0800)

Merge branch 'gh/cvsimport-user'

* gh/cvsimport-user:
git-cvsimport: fix handling of user name when it is not set in CVSROOT

user-manual: minor rewording for clarity.Sergei Organov Wed, 14 Nov 2007 20:08:15 +0000 (12:08 -0800)

user-manual: minor rewording for clarity.

Junio screwed up when applying the previous round of the patch;
rewording from "previous" to "old" does make the description
clearer.

Also revert the rewording from head to branch. The description
is talking about the branch's tip commit and using the word head
is clearer.

Based on input from Sergei and Bruce.

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

Fix parent rewriting in --early-outputLinus Torvalds Tue, 13 Nov 2007 07:16:08 +0000 (23:16 -0800)

Fix parent rewriting in --early-output

We cannot tell a node that has been checked and found not to be
interesting (which does not have the TREECHANGE flag) from a
node that hasn't been checked if it is interesting or not,
without relying on something else, such as object->parsed.

But an object can get the "parsed" flag for other reasons.
Which means that "TREECHANGE" has the wrong polarity.

This changes the way how the path pruning logic marks an
uninteresting commits. From now on, we consider a commit
interesting by default, and explicitly mark the ones we decided
to prune. The flag is renamed to "TREESAME".

Then, this fixes the logic to show the early output with
incomplete pruning. It basically says "a commit that has
TREESAME set is kind-of-UNINTERESTING", but obviously in a
different way than an outright UNINTERESTING commit. Until we
parse and examine enough parents to determine if a commit
becomes surely "kind-of-UNINTERESTING", we avoid rewriting
the ancestry so that later rounds can fix things up.

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

Fix rev-list when showing objects involving submodulesLinus Torvalds Sun, 11 Nov 2007 23:35:23 +0000 (23:35 +0000)

Fix rev-list when showing objects involving submodules

The function mark_tree_uninteresting() assumed that the tree entries
are blob when they are not trees. This is not so. Since we do
not traverse into submodules (yet), the gitlinks should be ignored.

In general, we should try to start moving away from using the
"S_ISLNK()" like things for internal git state. It was a mistake to
just assume the numbers all were same across all systems in the first
place. This implementation converts to the "object_type", and then
uses a case statement.

Noticed by Ilari on IRC.
Test script taken from an earlier version by Dscho.

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

Merge branch 'maint'Junio C Hamano Wed, 14 Nov 2007 11:37:18 +0000 (03:37 -0800)

Merge branch 'maint'

* maint:
git-clean: honor core.excludesfile
Documentation: Fix man page breakage with DocBook XSL v1.72
git-remote.txt: fix typo
core-tutorial.txt: Fix argument mistake in an example.
replace reference to git-rm with git-reset in git-commit doc
Grammar fixes for gitattributes documentation
Don't allow fast-import tree delta chains to exceed maximum depth
revert/cherry-pick: allow starting from dirty work tree.
t/t3404: fix test for a bogus todo file.

Conflicts:

fast-import.c

Merge branch 'aw/mirror-push' into jk/send-packJunio C Hamano Wed, 14 Nov 2007 11:13:30 +0000 (03:13 -0800)

Merge branch 'aw/mirror-push' into jk/send-pack

* aw/mirror-push:
git-push: add documentation for the newly added --mirror mode
Add tests for git push'es mirror mode
git-push: plumb in --mirror mode
Teach send-pack a mirror mode
send-pack: segfault fix on forced push
send-pack: require --verbose to show update of tracking refs
receive-pack: don't mention successful updates
more terse push output

Conflicts:

transport.c
transport.h

Merge branch 'ar/send-pack-remote-track' into jk/send... Junio C Hamano Wed, 14 Nov 2007 11:11:37 +0000 (03:11 -0800)

Merge branch 'ar/send-pack-remote-track' into jk/send-pack

* ar/send-pack-remote-track:
Update the tracking references only if they were succesfully updated on remote
Add a test checking if send-pack updated local tracking branches correctly

Merge branch 'db/remote-builtin' into jk/send-packJunio C Hamano Wed, 14 Nov 2007 11:09:52 +0000 (03:09 -0800)

Merge branch 'db/remote-builtin' into jk/send-pack

* db/remote-builtin:
Reteach builtin-ls-remote to understand remotes
Build in ls-remote
Use built-in send-pack.
Build-in send-pack, with an API for other programs to call.
Build-in peek-remote, using transport infrastructure.
Miscellaneous const changes and utilities

Conflicts:

transport.c

Fix dependencies of parse-options test programAlex Riesen Tue, 13 Nov 2007 23:16:36 +0000 (00:16 +0100)

Fix dependencies of parse-options test program

A stale test-parse-options can break t0040 otherwise.

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

user-manual.txt: fix a few mistakesSergei Organov Tue, 13 Nov 2007 18:19:39 +0000 (21:19 +0300)

user-manual.txt: fix a few mistakes

Signed-off-by: Sergei Organov <osv@javad.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-clean: honor core.excludesfileJunio C Hamano Wed, 14 Nov 2007 09:54:43 +0000 (01:54 -0800)

git-clean: honor core.excludesfile

git-clean did not honor core.excludesfile configuration
variable, although some other commands such as git-add and
git-status did. Fix this inconsistency.

Original report and patch from Shun'ichi Fuji. Rewritten by me
and bugs and tests are mine.

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

Documentation: Fix man page breakage with DocBook XSL... Jonas Fonseca Wed, 14 Nov 2007 09:38:46 +0000 (10:38 +0100)

Documentation: Fix man page breakage with DocBook XSL v1.72

From version 1.72 it will replace all dots in roff requests with U+2302
("house" character), and add escaping in output for all instances of dot
that are not in roff requests. This caused the ".ft" hack forcing
monospace font in listingblocks to end up as "\&.ft" and being visible
in the resulting man page.

The fix adds a DOCBOOK_XSL_172 build variable that will disable the
hack. To allow this variable to be defined in config.mak it also moves
build variable handling below the inclusion of config.mak.

Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Handle broken vsnprintf implementations in strbufShawn O. Pearce Tue, 13 Nov 2007 08:22:44 +0000 (03:22 -0500)

Handle broken vsnprintf implementations in strbuf

Solaris 9's vsnprintf implementation returns -1 if we pass it a
buffer of length 0. The only way to get it to give us the actual
length necessary for the formatted string is to grow the buffer
out to have at least 1 byte available in the strbuf and then ask
it to compute the length.

If the available space is 0 I'm growing it out by 64 to ensure
we will get an accurate length estimate from all implementations.
Some callers may need to grow the strbuf again but 64 should be a
reasonable enough initial growth.

We also no longer silently fail to append to the string when we are
faced with a broken vsnprintf implementation. On Solaris 9 this
silent failure caused me to no longer be able to execute "git clone"
as we tried to exec the empty string rather than "git-clone".

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

git-remote.txt: fix typoSergei Organov Tue, 13 Nov 2007 18:17:47 +0000 (21:17 +0300)

git-remote.txt: fix typo

Signed-off-by: Sergei Organov <osv@javad.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

core-tutorial.txt: Fix argument mistake in an example.Sergei Organov Sat, 10 Nov 2007 13:17:33 +0000 (16:17 +0300)

core-tutorial.txt: Fix argument mistake in an example.

One of examples has wrong output given the arguments provided.
Fix arguments to match the output.

Fix a minor syntax mistake in another place.

Signed-off-by: Sergei Organov <osv@javad.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

replace reference to git-rm with git-reset in git-commi... Jing Xue Mon, 12 Nov 2007 04:43:00 +0000 (23:43 -0500)

replace reference to git-rm with git-reset in git-commit doc

The message in git-commit suggesting to use 'git rm --cached'
to unstage is just plain wrong. It really should mention 'git reset'.

Suggested by Jan Hudec.

Signed-off-by: Jing Xue <jingxue@digizenstudio.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Grammar fixes for gitattributes documentationWincent Colaiuta Wed, 14 Nov 2007 07:51:41 +0000 (08:51 +0100)

Grammar fixes for gitattributes documentation

Tweak the "filter" section of the gitattributes documentation to add
some
missing articles and improve some word choices without changing the
semantics of the section.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Don't allow fast-import tree delta chains to exceed... Shawn O. Pearce Wed, 14 Nov 2007 04:48:42 +0000 (23:48 -0500)

Don't allow fast-import tree delta chains to exceed maximum depth

Brian Downing noticed fast-import can produce tree depths of up
to 6,035 objects and even deeper. Long delta chains can create
very small packfiles but cause problems during repacking as git
needs to unpack each tree to count the reachable blobs.

What's happening here is the active branch cache isn't big enough.
We're swapping out the branch and thus recycling the tree information
(struct tree_content) back into the free pool. When we later reload
the tree we set the delta_depth to 0 but we kept the tree we just
reloaded as a delta base.

So if the tree we reloaded was already at the maximum depth we
wouldn't know it and make the new tree a delta. Multiply the
number of times the branch cache has to swap out the tree times
max_depth (10) and you get the maximum delta depth of a tree created
by fast-import. In Brian's case above the active branch cache had
to swap the branch out 603/604 times during this import to produce
a tree with a delta depth of 6035.

Acked-by: Brian Downing <bdowning@lavos.net>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Resurrect git-revert.sh example and add comment to... Junio C Hamano Tue, 13 Nov 2007 21:45:11 +0000 (13:45 -0800)

Resurrect git-revert.sh example and add comment to builtin-revert.c

I had to scratch my head for quite some time figuring out why we
cannot optimize out write_tree() we do when --no-commit option
is given, whose purpose seem to be only to check if the index is
unmerged, with a simple loop over the active_cache[].

So add a comment to describe why the write_tree() is there, and
resurrect the last scripted version as a reference material in
contrib/example directory with others.

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

revert/cherry-pick: allow starting from dirty work... Junio C Hamano Tue, 13 Nov 2007 20:28:53 +0000 (12:28 -0800)

revert/cherry-pick: allow starting from dirty work tree.

There is no reason to forbid a dirty work tree when reverting or
cherry-picking a change, as long as the index is clean.

The scripted version used to allow it:

case "$no_commit" in
t)
# We do not intend to commit immediately. We just want to
# merge the differences in.
head=$(git-write-tree) ||
die "Your index file is unmerged."
;;
*)
head=$(git-rev-parse --verify HEAD) ||
die "You do not have a valid HEAD"
files=$(git-diff-index --cached --name-only $head) || exit
if [ "$files" ]; then
die "Dirty index: cannot $me (dirty: $files)"
fi
;;
esac

but C rewrite tightened the check, probably by mistake.

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

t/t3404: fix test for a bogus todo file.Junio C Hamano Tue, 13 Nov 2007 21:05:50 +0000 (13:05 -0800)

t/t3404: fix test for a bogus todo file.

The test wants to see if there are still remaining tasks, but checked
a wrong file.

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

git-quiltimport.sh fix --patches handlingAndy Whitcroft Mon, 12 Nov 2007 12:07:40 +0000 (12:07 +0000)

git-quiltimport.sh fix --patches handling

When converting git-quiltimport.sh to the new git-rev-part --parseopt
system, the handling of --patches was broken. We inadvertantly always
attempt to use '--patches' as the value.

This was introduced in the following commit:

commit e01fbf1a8f185bf6722e828286862a4122269ef7
Author: Pierre Habouzit <madcoder@debian.org>
Date: Sun Nov 4 11:31:01 2007 +0100

Migrate git-quiltimport.sh to use git-rev-parse --parseopt

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-commit: Add tests for invalid usage of -a/--interac... Björn Steinbrink Mon, 12 Nov 2007 15:15:39 +0000 (16:15 +0100)

git-commit: Add tests for invalid usage of -a/--interactive with paths

git-commit was/is broken in that it accepts paths together with -a or
--interactive, which it shouldn't. There tests check those usage errors.

Signed-off-by: Björn Steinbrink <B.Steinbrink@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-push: add documentation for the newly added --mirro... Andy Whitcroft Fri, 9 Nov 2007 23:32:57 +0000 (23:32 +0000)

git-push: add documentation for the newly added --mirror mode

Add some basic documentation on the --mirror mode for git-push.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Add tests for git push'es mirror modeAndy Whitcroft Fri, 9 Nov 2007 23:32:41 +0000 (23:32 +0000)

Add tests for git push'es mirror mode

Add some tests for git push --mirror mode.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Fix preprocessor logic that determines the availablity... Johannes Sixt Mon, 12 Nov 2007 10:09:05 +0000 (11:09 +0100)

Fix preprocessor logic that determines the availablity of strchrnul().

Apart from the error in the condition (&& should actually be ||), the
construct

#if !defined(A) || !A

leads to a syntax error in the C preprocessor if A is indeed not defined.

Tested-by: David Symonds <dsymonds@gmail.com>
Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Update the tracking references only if they were succes... Alex Riesen Mon, 12 Nov 2007 21:39:38 +0000 (22:39 +0100)

Update the tracking references only if they were succesfully updated on remote

It fixes the bug where local tracking branches were filled with zeroed
SHA-1 if the remote branch was not updated because, for instance, it
was not an ancestor of the local (i.e. had other changes).

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

Add a test checking if send-pack updated local tracking... Alex Riesen Mon, 12 Nov 2007 21:38:23 +0000 (22:38 +0100)

Add a test checking if send-pack updated local tracking branches correctly

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

git-clean: Fix error message if clean.requireForce... Johannes Sixt Mon, 12 Nov 2007 08:27:35 +0000 (09:27 +0100)

git-clean: Fix error message if clean.requireForce is not set.

It was distracting to see this error message:

clean.requireForce set and -n or -f not given; refusing to clean

even though clean.requireForce was not set at all. This patch distinguishes
the cases and gives a different message depending on whether the
configuration variable is not set or set to true.

While we are here, we also divert the error messages to stderr.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

rebase: fix "rebase --continue" breakageJohannes Schindelin Mon, 12 Nov 2007 13:11:46 +0000 (13:11 +0000)

rebase: fix "rebase --continue" breakage

The --skip case was handled properly when rebasing without --merge,
but the --continue case was not.

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

git-svn: support for funky branch and project names... Eric Wong Mon, 12 Nov 2007 07:37:42 +0000 (23:37 -0800)

git-svn: support for funky branch and project names over HTTP(S)

SVN requires that paths be URI-escaped for HTTP(S) repositories.
file:// and svn:// repositories do not need these rules.

Additionally, accessing individual paths inside repositories
(check_path() and get_log() do NOT require escapes to function
and in fact it breaks things).

Noticed-by: Michael J. Cohen <mjc@cruiseplanners.com>
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation: Fix references to deprecated commandsJonas Fonseca Mon, 12 Nov 2007 00:32:51 +0000 (01:32 +0100)

Documentation: Fix references to deprecated commands

... by changing git-tar-tree reference to git-archive and removing
seemingly unrelevant footnote about git-ssh-{fetch,upload}.

Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint'Junio C Hamano Mon, 12 Nov 2007 08:14:15 +0000 (00:14 -0800)

Merge branch 'maint'

* maint:
for-each-ref: fix off by one read.
git-branch: remove mention of non-existent '-b' option
git-svn: prevent dcommitting if the index is dirty.
Fix memory leak in traverse_commit_list

Merge branch 'sp/maint-plug-traverse-commit-list-leak... Junio C Hamano Mon, 12 Nov 2007 08:00:00 +0000 (00:00 -0800)

Merge branch 'sp/maint-plug-traverse-commit-list-leak' into maint

* sp/maint-plug-traverse-commit-list-leak:
Fix memory leak in traverse_commit_list

for-each-ref: fix off by one read.Christian Couder Mon, 12 Nov 2007 04:37:25 +0000 (05:37 +0100)

for-each-ref: fix off by one read.

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

git-branch: remove mention of non-existent '-b' optionJeff King Mon, 12 Nov 2007 04:07:05 +0000 (23:07 -0500)

git-branch: remove mention of non-existent '-b' option

This looks like a cut and paste error from the git-checkout
explanation of --no-track.

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

git-svn: prevent dcommitting if the index is dirty.Benoit Sigoure Sun, 11 Nov 2007 18:41:41 +0000 (19:41 +0100)

git-svn: prevent dcommitting if the index is dirty.

dcommit uses rebase to sync the history with what has just been pushed to
SVN. Trying to dcommit with a dirty index is troublesome for rebase, so now
the user will get an error message if he attempts to dcommit with a dirty
index.

Signed-off-by: Benoit Sigoure <tsuna@lrde.epita.fr>
Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t2200: test more cases of "add -u"Junio C Hamano Mon, 12 Nov 2007 02:44:16 +0000 (18:44 -0800)

t2200: test more cases of "add -u"

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

git-fetch: avoid local fetching from alternate (again)Shawn O. Pearce Sun, 11 Nov 2007 07:29:47 +0000 (02:29 -0500)

git-fetch: avoid local fetching from alternate (again)

Back in e3c6f240fd9c5bdeb33f2d47adc859f37935e2df Junio taught
git-fetch to avoid copying objects when we are fetching from
a repository that is already registered as an alternate object
database. In such a case there is no reason to copy any objects
as we can already obtain them through the alternate.

However we need to ensure the objects are all reachable, so we
run `git rev-list --objects $theirs --not --all` to verify this.
If any object is missing or unreadable then we need to fetch/copy
the objects from the remote. When a missing object is detected
the git-rev-list process will exit with a non-zero exit status,
making this condition quite easy to detect.

Although git-fetch is currently a builtin (and so is rev-list)
we cannot invoke the traverse_objects() API at this point in the
transport code. The object walker within traverse_objects() calls
die() as soon as it finds an object it cannot read. If that happens
we want to resume the fetch process by calling do_fetch_pack().
To get around this we spawn git-rev-list into a background process
to prevent a die() from killing the foreground fetch process,
thus allowing the fetch process to resume into do_fetch_pack()
if copying is necessary.

We aren't interested in the output of rev-list (a list of SHA-1
object names that are reachable) or its errors (a "spurious" error
about an object not being found as we need to copy it) so we redirect
both stdout and stderr to /dev/null.

We run this git-rev-list based check before any fetch as we may
already have the necessary objects local from a prior fetch. If we
don't then its very likely the first $theirs object listed on the
command line won't exist locally and git-rev-list will die very
quickly, allowing us to start the network transfer. This test even
on remote URLs may save bandwidth if someone runs `git pull origin`,
sees a merge conflict, resets out, then redoes the same pull just
a short time later. If the remote hasn't changed between the two
pulls and the local repository hasn't had git-gc run in it then
there is probably no need to perform network transfer as all of
the objects are local.

Documentation for the new quickfetch function was suggested and
written by Junio, based on his original comment in git-fetch.sh.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

rev-list: Introduce --quiet to avoid /dev/null redirectsShawn O. Pearce Sun, 11 Nov 2007 07:29:41 +0000 (02:29 -0500)

rev-list: Introduce --quiet to avoid /dev/null redirects

Some uses of git-rev-list are to run it with --objects to see if
a range of objects between two or more commits is fully connected
or not. In such a case the caller doesn't care about the actual
object names or hash hints so formatting this data only for it to
be dumped to /dev/null by a redirect is a waste of CPU time. If
all the caller needs is the exit status then --quiet can be used
to bypass the commit and object formatting.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

run-command: Support sending stderr to /dev/nullShawn O. Pearce Sun, 11 Nov 2007 07:29:37 +0000 (02:29 -0500)

run-command: Support sending stderr to /dev/null

Some callers may wish to redirect stderr to /dev/null in some
contexts, such as if they are executing a command only to get
the exit status and don't want users to see whatever output it
may produce as a side-effect of computing that exit status.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

git-fetch: Always fetch tags if the object they referen... Shawn O. Pearce Sun, 11 Nov 2007 07:29:30 +0000 (02:29 -0500)

git-fetch: Always fetch tags if the object they reference exists

Previously git-fetch.sh used `git cat-file -t` to determine if an
object referenced by a tag exists, and if so fetch that tag locally.
This was subtly broken during the port to C based builtin-fetch as
lookup_object() only works to locate an object if it was previously
accessed by the transport. Not all transports will access all
objects in this way, so tags were not always being fetched.

The rsync transport never loads objects into the internal object
table so automated tag following didn't work if rsync was used.
Automated tag following also didn't work on the native transport
if the new tag was behind the common point(s) negotiated between
the two ends of the connection as the tag's referrant would not
be loaded into the internal object table. Further the automated
tag following was broken with the HTTP commit walker if the new
tag's referrant was behind an existing ref, as the walker would
stop before loading the tag's referrant into the object table.

Switching to has_sha1_file() restores the original behavior from
the shell script by checking if the object exists in the ODB,
without relying on the state left behind by a transport.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

Merge branch 'sp/maint-plug-traverse-commit-list-leak... Junio C Hamano Mon, 12 Nov 2007 01:09:48 +0000 (17:09 -0800)

Merge branch 'sp/maint-plug-traverse-commit-list-leak' into sp/fetch-fix

* sp/maint-plug-traverse-commit-list-leak:
Fix memory leak in traverse_commit_list

Do git reset --hard HEAD when using git rebase --skipMike Hommey Thu, 8 Nov 2007 07:03:06 +0000 (08:03 +0100)

Do git reset --hard HEAD when using git rebase --skip

When you have a merge conflict and want to bypass the commit causing it,
you don't want to care about the dirty state of the working tree.

Also, don't git reset --hard HEAD in the rebase-skip test, so that the
lack of support for this is detected.

Signed-off-by: Mike Hommey <mh@glandium.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-checkout: Test for relative path use.David Symonds Fri, 9 Nov 2007 09:12:28 +0000 (20:12 +1100)

git-checkout: Test for relative path use.

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

git-checkout: Support relative paths containing "..".David Symonds Fri, 9 Nov 2007 00:36:06 +0000 (11:36 +1100)

git-checkout: Support relative paths containing "..".

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

Reorder diff_opt_parse options more logically per topics.Pierre Habouzit Wed, 7 Nov 2007 10:20:32 +0000 (11:20 +0100)

Reorder diff_opt_parse options more logically per topics.

This is a line reordering patch _only_.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Make the diff_options bitfields be an unsigned with... Pierre Habouzit Sat, 10 Nov 2007 19:05:14 +0000 (20:05 +0100)

Make the diff_options bitfields be an unsigned with explicit masks.

reverse_diff was a bit-value in disguise, it's merged in the flags now.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Use OPT_BIT in builtin-pack-refsPierre Habouzit Wed, 7 Nov 2007 10:20:30 +0000 (11:20 +0100)

Use OPT_BIT in builtin-pack-refs

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

Use OPT_BIT in builtin-for-each-refPierre Habouzit Wed, 7 Nov 2007 10:20:29 +0000 (11:20 +0100)

Use OPT_BIT in builtin-for-each-ref

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

Use OPT_SET_INT and OPT_BIT in builtin-branchPierre Habouzit Wed, 7 Nov 2007 10:20:28 +0000 (11:20 +0100)

Use OPT_SET_INT and OPT_BIT in builtin-branch

Also remove a spurious after-check on --abbrev (OPT__ABBREV already takes
care of that)

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

parse-options new features.Pierre Habouzit Wed, 7 Nov 2007 10:20:27 +0000 (11:20 +0100)

parse-options new features.

options flags:
~~~~~~~~~~~~~
PARSE_OPT_NONEG allow the caller to disallow the negated option to exists.

option types:
~~~~~~~~~~~~
OPTION_BIT: ORs (or NANDs) a mask.
OPTION_SET_INT: force the value to be set to this integer.
OPTION_SET_PTR: force the value to be set to this pointer.

helper:
~~~~~~
HAS_MULTI_BITS (in git-compat-util.h) is a bit-hack to check if an
unsigned integer has more than one bit set, useful to check if conflicting
options have been used.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t7005-editor.sh: Don't invoke real vi when it is in... Björn Steinbrink Sun, 11 Nov 2007 17:38:11 +0000 (18:38 +0100)

t7005-editor.sh: Don't invoke real vi when it is in GIT_EXEC_PATH

The git wrapper executable always prepends the GIT_EXEC_PATH build
variable to the current PATH, so prepending "." to the PATH is not
enough to give precedence to the fake vi executable.

The --exec-path option allows to prepend a directory to PATH even before
GIT_EXEC_PATH (which is added anyway), so we can use that instead.

Signed-off-by: Björn Steinbrink <B.Steinbrink@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Make GIT_INDEX_FILE apply to git-commitRémi Vanicat Sun, 11 Nov 2007 12:28:08 +0000 (13:28 +0100)

Make GIT_INDEX_FILE apply to git-commit

Currently, when committing, git-commit ignore the value of
GIT_INDEX_FILE, and always use $GIT_DIR/index. This patch
fix it.

Signed-off-by: Rémi Vanicat <vanicat@debian.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'js/upload-pack'Junio C Hamano Sun, 11 Nov 2007 23:19:57 +0000 (15:19 -0800)

Merge branch 'js/upload-pack'

* js/upload-pack:
upload-pack: Use finish_{command,async}() instead of waitpid().

Merge branch 'js/reset'Junio C Hamano Sun, 11 Nov 2007 23:19:24 +0000 (15:19 -0800)

Merge branch 'js/reset'

* js/reset:
builtin-reset: avoid forking "update-index --refresh"
builtin-reset: do not call "ls-files --unmerged"

Merge branch 'js/parseopt-abbrev-fix'Junio C Hamano Sun, 11 Nov 2007 23:12:06 +0000 (15:12 -0800)

Merge branch 'js/parseopt-abbrev-fix'

* js/parseopt-abbrev-fix:
parse-options: abbreviation engine fix.

Merge branch 'maint'Junio C Hamano Sun, 11 Nov 2007 23:00:05 +0000 (15:00 -0800)

Merge branch 'maint'

* maint:
fix index-pack with packs >4GB containing deltas on 32-bit machines
git-hash-object should honor config variables
gitweb: correct month in date display for atom feeds

push: teach push to pass --verbose option to transport... Steffen Prohaska Sun, 11 Nov 2007 14:01:44 +0000 (15:01 +0100)

push: teach push to pass --verbose option to transport layer

A --verbose option to push should also be passed to the
transport layer, i.e. git-send-pack, git-http-push.

git push is modified to do so.

Signed-off-by: Steffen Prohaska <prohaska@zib.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

push: mention --verbose option in documentationSteffen Prohaska Sun, 11 Nov 2007 14:01:43 +0000 (15:01 +0100)

push: mention --verbose option in documentation

Before this commit, only '-v' was documented.

Signed-off-by: Steffen Prohaska <prohaska@zib.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Simplify strchrnul() compat codeAndreas Ericsson Sat, 10 Nov 2007 11:55:48 +0000 (12:55 +0100)

Simplify strchrnul() compat code

strchrnul() was introduced in glibc in April 1999 and included in
glibc-2.1. Checking for that version means the majority of all git
users would get to use the optimized version in glibc. Of the
remaining few some might get to use a slightly slower version
than necessary but probably not slower than what we have today.

Unfortunately, __GLIBC_PREREQ() macro was not available in glibc 2.1.1
which was short lived but already supported strchrnul(). Odd minority
users of that library needs to live with our compatibility inline version.

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

fix index-pack with packs >4GB containing deltas on... Nicolas Pitre Sun, 11 Nov 2007 04:29:10 +0000 (23:29 -0500)

fix index-pack with packs >4GB containing deltas on 32-bit machines

This probably hasn't been properly tested before. Here's a script to
create a 8GB repo with the necessary characteristics (copy the
test-genrandom executable from the Git build tree to /tmp first):

-----
#!/bin/bash

git init
git config core.compression 0

# create big objects with no deltas
for i in $(seq -w 1 2 63)
do
echo $i
/tmp/test-genrandom $i 268435456 > file_$i
git add file_$i
rm file_$i
echo "file_$i -delta" >> .gitattributes
done

# create "deltifiable" objects in between big objects
for i in $(seq -w 2 2 64)
do
echo "$i $i $i" >> grow
cp grow file_$i
git add file_$i
rm file_$i
done
rm grow

# create a pack with them
git commit -q -m "commit of big objects interlaced with small deltas"
git repack -a -d
-----

Then clone this repo over the Git protocol.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-hash-object should honor config variablesNicolas Pitre Sat, 10 Nov 2007 20:00:33 +0000 (15:00 -0500)

git-hash-object should honor config variables

... such as core.compression.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

--format=pretty: avoid calculating expensive expansions... René Scharfe Sat, 10 Nov 2007 11:18:26 +0000 (12:18 +0100)

--format=pretty: avoid calculating expensive expansions twice

As Jeff King remarked, format strings with duplicate placeholders can
be slow to expand, because each instance is calculated anew.

This patch makes use of the fact that format_commit_message() and its
helper functions only ever add stuff to the end of the strbuf. For
certain expensive placeholders, store the offset and length of their
expansion with the strbuf at the first occurrence. Later they
expansion result can simply be copied from there -- no malloc() or
strdup() required.

These certain placeholders are the abbreviated commit, tree and
parent hashes, as the search for a unique abbreviated hash is quite
costly. Here are the times for next (best of three runs):

$ time git log --pretty=format:%h >/dev/null

real 0m0.611s
user 0m0.404s
sys 0m0.204s

$ time git log --pretty=format:%h%h%h%h >/dev/null

real 0m1.206s
user 0m0.744s
sys 0m0.452s

And here those with this patch (and the previous two); the speedup
of the single placeholder case is just noise:

$ time git log --pretty=format:%h >/dev/null

real 0m0.608s
user 0m0.416s
sys 0m0.192s

$ time git log --pretty=format:%h%h%h%h >/dev/null

real 0m0.639s
user 0m0.488s
sys 0m0.140s

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

add strbuf_adddup()René Scharfe Sat, 10 Nov 2007 11:16:05 +0000 (12:16 +0100)

add strbuf_adddup()

Add a new function, strbuf_adddup(), that appends a duplicate of a
part of a struct strbuf to end of the latter.

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

--pretty=format: parse commit message only onceRené Scharfe Sat, 10 Nov 2007 11:14:20 +0000 (12:14 +0100)

--pretty=format: parse commit message only once

As Jeff King pointed out, some placeholder expansions are related to
each other: the steps to calculate one go most of the way towards
calculating the other, too.

This patch makes format_commit_message() parse the commit message
only once, remembering the position of each item. This speeds up
handling of format strings containing multiple placeholders from the
set %s, %a*, %c*, %e, %b.

Here are the timings for the git version in next. The first one is
to estimate the overhead of the caching, the second one is taken
from http://svn.tue.mpg.de/tentakel/trunk/tentakel/Makefile as an
example of a format string found in the wild. The times are the
fastest of three consecutive runs in each case:

$ time git log --pretty=format:%e >/dev/null

real 0m0.381s
user 0m0.340s
sys 0m0.024s

$ time git log --pretty=format:"* %cd %cn%n%n%s%n%b" >/dev/null

real 0m0.623s
user 0m0.556s
sys 0m0.052s

And here the times with this patch:

$ time git log --pretty=format:%e >/dev/null

real 0m0.385s
user 0m0.332s
sys 0m0.040s

$ time git log --pretty=format:"* %cd %cn%n%n%s%n%b" >/dev/null

real 0m0.563s
user 0m0.504s
sys 0m0.048s

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

gitweb: correct month in date display for atom feedsVincent Zanotti Sat, 10 Nov 2007 18:55:27 +0000 (19:55 +0100)

gitweb: correct month in date display for atom feeds

Signed-off-by: Vincent Zanotti <vincent.zanotti@m4x.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

test-lib.sh: move error line after error() declarationMichele Ballabio Sat, 10 Nov 2007 14:17:25 +0000 (15:17 +0100)

test-lib.sh: move error line after error() declaration

This patch removes a spurious "command not found" error
and actually makes the "Test script did not set test_description."
string follow the command line option "--no-color".

Signed-off-by: Michele Ballabio <barra_cuda@katamail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

for-each-ref: fix setup of option-parsing for --sortLars Hjemli Sat, 10 Nov 2007 16:47:54 +0000 (17:47 +0100)

for-each-ref: fix setup of option-parsing for --sort

The option value for --sort is already a pointer to a pointer to struct
ref_sort, so just use it.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint'Junio C Hamano Sat, 10 Nov 2007 10:06:30 +0000 (02:06 -0800)

Merge branch 'maint'

* maint:
print warning/error/fatal messages in one shot

core-tutorial.txt: Fix git-show-branch example and... Sergei Organov Thu, 8 Nov 2007 15:10:28 +0000 (18:10 +0300)

core-tutorial.txt: Fix git-show-branch example and its description

Signed-off-by: Sergei Organov <osv@javad.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Fix memory leak in traverse_commit_listShawn O. Pearce Fri, 9 Nov 2007 11:06:10 +0000 (06:06 -0500)

Fix memory leak in traverse_commit_list

If we were listing objects too then the objects were buffered in an
array only reachable from a stack allocated structure. When this
function returns that array would be leaked as nobody would have
a reference to it anymore.

Historically this hasn't been a problem as the primary user of
traverse_commit_list() (the noble git-rev-list) would terminate
as soon as the function was finished, thus allowing the operating
system to cleanup memory. However we have been leaking this data
in git-pack-objects ever since that program learned how to run the
revision listing internally, rather than relying on reading object
names from git-rev-list.

To better facilitate reuse of traverse_commit_list during other
builtin tools (such as git-fetch) we shouldn't leak temporary memory
like this and instead we need to clean up properly after ourselves.

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

git-commit: a bit more testsJunio C Hamano Sat, 10 Nov 2007 09:49:34 +0000 (01:49 -0800)

git-commit: a bit more tests

Add tests for -s (sign-off) and multiple -m options

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