gitweb.git
Merge branch 'mv/remote-rename'Junio C Hamano Thu, 13 Nov 2008 06:00:25 +0000 (22:00 -0800)

Merge branch 'mv/remote-rename'

* mv/remote-rename:
git-remote: document the migration feature of the rename subcommand
git-remote rename: migrate from remotes/ and branches/
remote: add a new 'origin' variable to the struct
Implement git remote rename

Merge branch 'jk/deny-push-to-current'Junio C Hamano Thu, 13 Nov 2008 05:56:14 +0000 (21:56 -0800)

Merge branch 'jk/deny-push-to-current'

* jk/deny-push-to-current:
receive-pack: detect push to current branch of non-bare repo
t5516: refactor oddball tests

Merge branch 'dl/xdiff'Junio C Hamano Thu, 13 Nov 2008 05:51:30 +0000 (21:51 -0800)

Merge branch 'dl/xdiff'

* dl/xdiff:
xdiff: give up scanning similar lines early

Merge branch 'lt/decorate'Junio C Hamano Thu, 13 Nov 2008 05:51:19 +0000 (21:51 -0800)

Merge branch 'lt/decorate'

* lt/decorate:
rev-list documentation: clarify the two parts of history simplification
Document "git log --simplify-by-decoration"
Document "git log --source"
revision traversal: '--simplify-by-decoration'
Make '--decorate' set an explicit 'show_decorations' flag
revision: make tree comparison functions take commits rather than trees
Add a 'source' decorator for commits

Conflicts:
Documentation/rev-list-options.txt

Merge branch 'jk/diff-convfilter'Junio C Hamano Thu, 13 Nov 2008 05:50:58 +0000 (21:50 -0800)

Merge branch 'jk/diff-convfilter'

* jk/diff-convfilter:
enable textconv for diff in verbose status/commit
wt-status: load diff ui config
only textconv regular files
userdiff: require explicitly allowing textconv
refactor userdiff textconv code

Conflicts:
t/t4030-diff-textconv.sh

Merge branch 'jk/diff-convfilter-test-fix'Junio C Hamano Thu, 13 Nov 2008 05:50:41 +0000 (21:50 -0800)

Merge branch 'jk/diff-convfilter-test-fix'

* jk/diff-convfilter-test-fix:
Avoid using non-portable `echo -n` in tests.
add userdiff textconv tests
document the diff driver textconv feature
diff: add missing static declaration

Conflicts:
Documentation/gitattributes.txt

Merge branch 'st/tag'Junio C Hamano Thu, 13 Nov 2008 05:49:25 +0000 (21:49 -0800)

Merge branch 'st/tag'

* st/tag:
tag: Add more tests about mixing incompatible modes and options
tag: Check that options are only allowed in the appropriate mode

Merge git://repo.or.cz/git-guiJunio C Hamano Thu, 13 Nov 2008 05:12:41 +0000 (21:12 -0800)

Merge git://repo.or.cz/git-gui

* git://repo.or.cz/git-gui:
git-gui: Request blame metadata in utf-8.
git-gui: Add the Show SSH Key item to the clone dialog.
git-gui: Fix focus transition in the blame viewer.

git.html: Update the links to stale versionsJunio C Hamano Wed, 12 Nov 2008 23:04:54 +0000 (15:04 -0800)

git.html: Update the links to stale versions

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

Merge branch 'maint'Junio C Hamano Wed, 12 Nov 2008 23:03:57 +0000 (15:03 -0800)

Merge branch 'maint'

* maint:
Start 1.6.0.5 cycle
Fix pack.packSizeLimit and --max-pack-size handling
checkout: Fix "initial checkout" detection
Remove the period after the git-check-attr summary

Conflicts:
RelNotes

Start 1.6.0.5 cycleJunio C Hamano Wed, 12 Nov 2008 23:03:03 +0000 (15:03 -0800)

Start 1.6.0.5 cycle

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

Fix pack.packSizeLimit and --max-pack-size handlingNicolas Pitre Wed, 12 Nov 2008 18:23:58 +0000 (13:23 -0500)

Fix pack.packSizeLimit and --max-pack-size handling

If the limit was sufficiently low, having a single object written
could bust the limit (by design), but caused the remaining allowed
size to go negative for subsequent objects, which for an unsigned
variable is a rather huge limit.

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

rev-list documentation: clarify the two parts of histor... Santi Béjar Wed, 12 Nov 2008 10:51:28 +0000 (11:51 +0100)

rev-list documentation: clarify the two parts of history simplification

One set of options and parameters determine what commits are involved in
the simplification process, and another set of options determine how the
simplification is done. Clarify their distinction at the beginning.

Signed-off-by: Santi Béjar <santi@agolina.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Document "git log --simplify-by-decoration"Nanako Shiraishi Mon, 10 Nov 2008 09:58:17 +0000 (18:58 +0900)

Document "git log --simplify-by-decoration"

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

checkout: Fix "initial checkout" detectionJunio C Hamano Wed, 12 Nov 2008 19:52:35 +0000 (11:52 -0800)

checkout: Fix "initial checkout" detection

Earlier commit 5521883 (checkout: do not lose staged removal, 2008-09-07)
tightened the rule to prevent switching branches from losing local
changes, so that staged removal of paths can be protected, while
attempting to keep a loophole to still allow a special case of switching
out of an un-checked-out state.

However, the loophole was made a bit too tight, and did not allow
switching from one branch (in an un-checked-out state) to check out
another branch.

The change to builtin-checkout.c in this commit loosens it to allow this,
by not insisting the original commit and the new commit to be the same.

It also introduces a new function, is_index_unborn (and an associated
macro, is_cache_unborn), to check if the repository is truly in an
un-checked-out state more reliably, by making sure that $GIT_INDEX_FILE
did not exist when populating the in-core index structure. A few places
the earlier commit 5521883 added the check for the initial checkout
condition are updated to use this function.

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

Remove the period after the git-check-attr summaryMatt Kraai Fri, 7 Nov 2008 12:26:55 +0000 (04:26 -0800)

Remove the period after the git-check-attr summary

The period at the end of the git-check-attr summary causes there to be
two periods after the summary in the git(1) manual page.

Signed-off-by: Matt Kraai <kraai@ftbfs.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-remote: document the migration feature of the renam... Miklos Vajna Mon, 10 Nov 2008 20:43:03 +0000 (21:43 +0100)

git-remote: document the migration feature of the rename subcommand

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

git-remote rename: migrate from remotes/ and branches/Miklos Vajna Mon, 10 Nov 2008 20:43:01 +0000 (21:43 +0100)

git-remote rename: migrate from remotes/ and branches/

Remote definition that came from $GIT_DIR/remotes/nick and
$GIT_DIR/branches/nick are migrated to [remotes "nick"] section in the
configuration file.

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

git-diff: Add --staged as a synonym for --cached.David Symonds Wed, 29 Oct 2008 16:15:36 +0000 (09:15 -0700)

git-diff: Add --staged as a synonym for --cached.

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

git-p4: Cache git config for performanceJohn Chapman Sat, 8 Nov 2008 03:22:49 +0000 (14:22 +1100)

git-p4: Cache git config for performance

This makes git-p4 noticibly faster on Windows.

Signed-off-by: John Chapman <thestar@fussycoder.id.au>
Acked-by: Simon Hausmann <simon@lst.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-p4: Support purged files and optimize memory usageJohn Chapman Sat, 8 Nov 2008 03:22:48 +0000 (14:22 +1100)

git-p4: Support purged files and optimize memory usage

Purged files are handled as if they are merely deleted, which is not
entirely optimal, but I don't know of any other way to handle them.
File data is deleted from memory as early as they can, and they are more
efficiently handled, at (significant) cost to CPU usage.

Still need to handle p4 branches with spaces in their names.
Still need to make git-p4 clone more reliable.
- Perhaps with a --continue option. (Sometimes the p4 server kills
the connection)

Signed-off-by: John Chapman <thestar@fussycoder.id.au>
Acked-by: Simon Hausmann <simon@lst.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Fix non-literal format in printf-style callsDaniel Lowe Mon, 10 Nov 2008 21:07:52 +0000 (16:07 -0500)

Fix non-literal format in printf-style calls

These were found using gcc 4.3.2-1ubuntu11 with the warning:

warning: format not a string literal and no format arguments

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

Merge branch 'maint'Junio C Hamano Tue, 11 Nov 2008 22:46:31 +0000 (14:46 -0800)

Merge branch 'maint'

* maint:
Fix non-literal format in printf-style calls
git-submodule: Avoid printing a spurious message.
git ls-remote: make usage string match manpage
Makefile: help people who run 'make check' by mistake

Fix non-literal format in printf-style callsDaniel Lowe Mon, 10 Nov 2008 21:07:52 +0000 (16:07 -0500)

Fix non-literal format in printf-style calls

These were found using gcc 4.3.2-1ubuntu11 with the warning:

warning: format not a string literal and no format arguments

Incorporated suggestions from Brandon Casey <casey@nrlssc.navy.mil>.

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

remote: add a new 'origin' variable to the structMiklos Vajna Mon, 10 Nov 2008 20:43:00 +0000 (21:43 +0100)

remote: add a new 'origin' variable to the struct

This allows one to track where was the remote's original source, so that
it's possible to decide if it makes sense to migrate it to the config
format or not.

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

git-submodule: Avoid printing a spurious message.Alexandre Julliard Tue, 11 Nov 2008 21:09:16 +0000 (22:09 +0100)

git-submodule: Avoid printing a spurious message.

Fix 'git submodule update' to avoid printing a spurious "Maybe you want
to use 'update --init'?" once for every uninitialized submodule it
encounters.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git ls-remote: make usage string match manpageStefan Naewe Tue, 11 Nov 2008 15:52:31 +0000 (16:52 +0100)

git ls-remote: make usage string match manpage

The usage string of 'git ls-remote' is pretty terse. The manpage
however gives the correct 'synopsis'.

Signed-off-by: Stefan Naewe <stefan.naewe@atlas-elektronik.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Makefile: help people who run 'make check' by mistakeJunio C Hamano Tue, 11 Nov 2008 21:12:17 +0000 (13:12 -0800)

Makefile: help people who run 'make check' by mistake

The target to run self test is 'make test', but there are people who try
'make check' and worse yet do not have sparse installed.

Suggest 'make test' target when they do not have 'sparse'.

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

Document "git log --source"Nanako Shiraishi Mon, 10 Nov 2008 09:58:15 +0000 (18:58 +0900)

Document "git log --source"

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

git-gui: Request blame metadata in utf-8.Alexander Gavrilov Sun, 9 Nov 2008 15:53:09 +0000 (18:53 +0300)

git-gui: Request blame metadata in utf-8.

The blame builtin now supports automatic conversion of
metadata encoding. By default it is converted to the
character set specified by i18n.logoutputencoding.

Since gui blame expects the data in utf-8, it is
necessary to specify the desired encoding directly.
An old version of the blame command will simply
ignore the option.

Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

git-gui: Add the Show SSH Key item to the clone dialog.Alexander Gavrilov Sun, 9 Nov 2008 15:51:16 +0000 (18:51 +0300)

git-gui: Add the Show SSH Key item to the clone dialog.

The user might need to see the key before cloning a repository.
This patch makes the relevant menu item available in the Select
Repository/Clone dialog.

Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

git-gui: Fix focus transition in the blame viewer.Alexander Gavrilov Sun, 9 Nov 2008 15:36:50 +0000 (18:36 +0300)

git-gui: Fix focus transition in the blame viewer.

Now that the blame viewer has a search panel, it should be
taken into account by the focus transition code. Otherwise
showing a commit tip (by accidentally moving the mouse to
the text frame) causes the focus to transfer away from the
search field.

Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

Merge branch 'maint'Junio C Hamano Sun, 9 Nov 2008 18:56:26 +0000 (10:56 -0800)

Merge branch 'maint'

* maint:
Documentation: bisect: change a few instances of "git-cmd" to "git cmd"
Documentation: rev-list: change a few instances of "git-cmd" to "git cmd"
checkout: Don't crash when switching away from an invalid branch.

bisect: fix missing "exit"Christian Couder Sun, 9 Nov 2008 14:25:55 +0000 (15:25 +0100)

bisect: fix missing "exit"

Check to see given bad/good/skip sets are valid commit and to exit
otherwise was broken by 6a54d97 (bisect: remove "checkout_done" variable
used when checking merge bases, 2008-09-06).

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

Documentation: bisect: change a few instances of "git... Christian Couder Sun, 9 Nov 2008 13:53:14 +0000 (14:53 +0100)

Documentation: bisect: change a few instances of "git-cmd" to "git cmd"

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

Documentation: rev-list: change a few instances of... Christian Couder Sun, 9 Nov 2008 13:46:35 +0000 (14:46 +0100)

Documentation: rev-list: change a few instances of "git-cmd" to "git cmd"

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

receive-pack: detect push to current branch of non... Jeff King Sun, 9 Nov 2008 01:49:27 +0000 (20:49 -0500)

receive-pack: detect push to current branch of non-bare repo

Pushing into the currently checked out branch of a non-bare
repository can be dangerous; the HEAD then loses sync with
the index and working tree, and it looks in the receiving
repo as if the pushed changes have been reverted in the
index (since they were never there in the first place).

This patch adds a safety valve that checks for this
condition and either generates a warning or denies the
update. We trigger the check only on a non-bare repository,
since a bare repo does not have a working tree (and in fact,
pushing to the HEAD branch is a common workflow for
publishing repositories).

The behavior is configurable via receive.denyCurrentBranch,
defaulting to "warn" so as not to break existing setups
(though it may, after a deprecation period, switch to
"refuse" by default). For users who know what they are doing
and want to silence the warning (e.g., because they have a
post-receive hook that reconciles the HEAD and working
tree), they can turn off the warning by setting it to false
or "ignore".

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

t5516: refactor oddball testsJeff King Fri, 7 Nov 2008 22:20:33 +0000 (17:20 -0500)

t5516: refactor oddball tests

t5516 sets up some utility functions for starting each test
with a clean slate. However, there were a few tests added
that do not use these functions, but instead make their own
repositories.

Let's bring these in line with the rest of the tests. Not
only do we reduce the number of lines, but these tests will
benefit from any further enhancements to the utility
scripts.

The conversion is pretty straightforward. Most of the tests
created a parent/child clone relationship, for which we now
use 'testrepo' as the parent. One test looked in testrepo,
but relied on previous tests to have set it up; it now sets
up testrepo explicitly, which makes it a bit more robust to
changes in the script, as well.

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

checkout: Don't crash when switching away from an inval... Alexandre Julliard Sat, 8 Nov 2008 12:03:59 +0000 (13:03 +0100)

checkout: Don't crash when switching away from an invalid branch.

When using alternates, it is possible for HEAD to end up pointing to
an invalid commit. git checkout should be able to recover from that
situation without crashing.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint'Junio C Hamano Sun, 9 Nov 2008 05:33:55 +0000 (21:33 -0800)

Merge branch 'maint'

* maint:
GIT 1.6.0.4
Update RPM spec for the new location of git-cvsserver.
push: fix local refs update if already up-to-date
do not force write of packed refs

Conflicts:
builtin-revert.c

GIT 1.6.0.4 v1.6.0.4Junio C Hamano Sun, 9 Nov 2008 01:33:50 +0000 (17:33 -0800)

GIT 1.6.0.4

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

Update RPM spec for the new location of git-cvsserver.Quy Tonthat Fri, 12 Sep 2008 16:22:44 +0000 (02:22 +1000)

Update RPM spec for the new location of git-cvsserver.

git-cvsserver has been moved from libexecdir to bindir.

Signed-off-by: Quy Tonthat <qtonthat@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'cb/maint-update-ref-fix' into maintJunio C Hamano Sun, 9 Nov 2008 01:32:49 +0000 (17:32 -0800)

Merge branch 'cb/maint-update-ref-fix' into maint

* cb/maint-update-ref-fix:
push: fix local refs update if already up-to-date
do not force write of packed refs

Merge branch 'cj/maint-gitpm-fix-maybe-self' into maintJunio C Hamano Sun, 9 Nov 2008 00:50:25 +0000 (16:50 -0800)

Merge branch 'cj/maint-gitpm-fix-maybe-self' into maint

* cj/maint-gitpm-fix-maybe-self:
Git.pm: do not break inheritance

Merge branch 'ar/maint-mksnpath' into maintJunio C Hamano Sun, 9 Nov 2008 00:13:19 +0000 (16:13 -0800)

Merge branch 'ar/maint-mksnpath' into maint

* ar/maint-mksnpath:
Use git_pathdup instead of xstrdup(git_path(...))
git_pathdup: returns xstrdup-ed copy of the formatted path
Fix potentially dangerous use of git_path in ref.c
Add git_snpath: a .git path formatting routine with output buffer
Fix potentially dangerous uses of mkpath and git_path
Fix mkpath abuse in dwim_ref and dwim_log of sha1_name.c
Add mksnpath which allows you to specify the output buffer

Conflicts:
builtin-revert.c
rerere.c

Merge branch 'mv/maint-branch-m-symref' into maintJunio C Hamano Sun, 9 Nov 2008 00:07:37 +0000 (16:07 -0800)

Merge branch 'mv/maint-branch-m-symref' into maint

* mv/maint-branch-m-symref:
update-ref --no-deref -d: handle the case when the pointed ref is packed
git branch -m: forbid renaming of a symref
Fix git update-ref --no-deref -d.
rename_ref(): handle the case when the reflog of a ref does not exist
Fix git branch -m for symrefs.

Merge branch 'ds/autoconf'Junio C Hamano Sun, 9 Nov 2008 00:05:49 +0000 (16:05 -0800)

Merge branch 'ds/autoconf'

* ds/autoconf:
autoconf: Add link tests to each AC_CHECK_FUNC() test

Merge branch 'rs/blame'Junio C Hamano Sun, 9 Nov 2008 00:05:39 +0000 (16:05 -0800)

Merge branch 'rs/blame'

* rs/blame:
blame: use xdi_diff_hunks(), get rid of struct patch
add xdi_diff_hunks() for callers that only need hunk lengths
Allow alternate "low-level" emit function from xdl_diff
Always initialize xpparam_t to 0
blame: inline get_patch()

t5400: expect success for denying deletionJeff King Fri, 7 Nov 2008 22:09:55 +0000 (17:09 -0500)

t5400: expect success for denying deletion

Commit a240de11 introduced this test and the code to make it
successful.

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

xdiff: give up scanning similar lines earlyDavide Libenzi Sat, 8 Nov 2008 05:24:33 +0000 (21:24 -0800)

xdiff: give up scanning similar lines early

In a corner case of large files whose lines do not match uniquely, the
loop to eliminate a line that matches multiple locations adjacent to a run
of lines that do not uniquely match wasted too much cycles. Fix this by
giving up early after scanning 100 lines in both direction.

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

gitweb: Fix mod_perl support.Alexander Gavrilov Wed, 5 Nov 2008 22:10:07 +0000 (01:10 +0300)

gitweb: Fix mod_perl support.

ModPerl::Registry precompiles scripts by wrapping them
in a subroutine. This causes ordinary subroutines of the
script to become nested, and warnings appear:

gitweb.cgi: Variable "$path_info" will not stay shared

This warning means that $path_info was declared as 'my',
and thus according to the perl evaluation rules all nested
subroutines will retain a reference to the instance of the
variable used in the first invocation of the master script.

When the script (i.e. the master meta-subroutine) is executed
the second time, it will use a new instance, so the logic
breaks. To avoid this it is necessary to declare all global
variables as 'our', which places them at the package level.

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

gitweb: Add a per-repository authorization hook.Alexander Gavrilov Wed, 5 Nov 2008 22:36:23 +0000 (01:36 +0300)

gitweb: Add a per-repository authorization hook.

Add a configuration variable that can be used to specify an
arbitrary subroutine that will be called in the same situations
where $export_ok is checked, and its return value used
to decide whether the repository is to be shown.

This allows the user to implement custom authentication
schemes, for example by issuing a subrequest through mod_perl
and checking if Apache will authorize it.

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

gitweb: Use single implementation of export_ok check.Alexander Gavrilov Wed, 5 Nov 2008 22:15:56 +0000 (01:15 +0300)

gitweb: Use single implementation of export_ok check.

GitWeb source contains a special function that implements the
export_ok check, but validate_project still uses a separate copy
of essentially the same code.

This patch makes it use the dedicated function, thus ensuring
that all checks are done through a single code path.

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

Windows: Make OpenSSH properly detect tty detachment.Alexander Gavrilov Sun, 2 Nov 2008 17:11:13 +0000 (20:11 +0300)

Windows: Make OpenSSH properly detect tty detachment.

Apparently, CREATE_NO_WINDOW makes the OS tell the process
that it has a console, but without actually creating the
window. As a result, when git is started from GUI, ssh
tries to ask its questions on the invisible console.

This patch uses DETACHED_PROCESS instead, which clearly
means that the process should be left without a console.
The downside is that if the process manually calls
AllocConsole, the window will appear. A similar thing
might occur if it calls another console executable.

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

push: fix local refs update if already up-to-dateClemens Buchacher Wed, 5 Nov 2008 20:55:54 +0000 (21:55 +0100)

push: fix local refs update if already up-to-date

git push normally updates local refs only after a successful push. If the
remote already has the updates -- pushed indirectly through another repository,
for example -- we forget to update local tracking refs.

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

do not force write of packed refsClemens Buchacher Wed, 5 Nov 2008 20:55:53 +0000 (21:55 +0100)

do not force write of packed refs

We force writing a ref if it does not exist. Originally, we only had to look
for the ref file to check if it existed. Now we have to look for a packed ref
as well. Luckily, resolve_ref already does all the work for us.

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

Implement git remote renameMiklos Vajna Mon, 3 Nov 2008 18:26:18 +0000 (19:26 +0100)

Implement git remote rename

The new rename subcommand does the followings:

1) Renames the remote.foo configuration section to remote.bar

2) Updates the remote.bar.fetch refspecs

3) Updates the branch.*.remote settings

4) Renames the tracking branches: renames the normal refs and rewrites
the symrefs to point to the new refs.

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

Update draft release notes to 1.6.1Junio C Hamano Wed, 5 Nov 2008 20:20:55 +0000 (12:20 -0800)

Update draft release notes to 1.6.1

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

Merge branch 'ar/mksnpath'Junio C Hamano Wed, 5 Nov 2008 19:35:53 +0000 (11:35 -0800)

Merge branch 'ar/mksnpath'

* ar/mksnpath:
Use git_pathdup instead of xstrdup(git_path(...))
git_pathdup: returns xstrdup-ed copy of the formatted path
Fix potentially dangerous use of git_path in ref.c
Add git_snpath: a .git path formatting routine with output buffer
Fix potentially dangerous uses of mkpath and git_path
Fix potentially dangerous uses of mkpath and git_path
Fix mkpath abuse in dwim_ref and dwim_log of sha1_name.c
Add mksnpath which allows you to specify the output buffer

Conflicts:
builtin-revert.c

Merge branch 'jc/gitweb-fix-cloud-tag'Junio C Hamano Wed, 5 Nov 2008 19:34:28 +0000 (11:34 -0800)

Merge branch 'jc/gitweb-fix-cloud-tag'

* jc/gitweb-fix-cloud-tag:
Fix reading of cloud tags

Merge branch 'mv/maint-branch-m-symref'Junio C Hamano Wed, 5 Nov 2008 19:33:19 +0000 (11:33 -0800)

Merge branch 'mv/maint-branch-m-symref'

* mv/maint-branch-m-symref:
update-ref --no-deref -d: handle the case when the pointed ref is packed
git branch -m: forbid renaming of a symref
Fix git update-ref --no-deref -d.
rename_ref(): handle the case when the reflog of a ref does not exist
Fix git branch -m for symrefs.

Merge branch 'mv/parseopt-checkout-index'Junio C Hamano Wed, 5 Nov 2008 19:25:58 +0000 (11:25 -0800)

Merge branch 'mv/parseopt-checkout-index'

* mv/parseopt-checkout-index:
parse-opt: migrate builtin-checkout-index.

tag: Add more tests about mixing incompatible modes... Samuel Tardieu Tue, 4 Nov 2008 23:20:36 +0000 (00:20 +0100)

tag: Add more tests about mixing incompatible modes and options

Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

tag: Check that options are only allowed in the appropr... Samuel Tardieu Tue, 4 Nov 2008 23:20:31 +0000 (00:20 +0100)

tag: Check that options are only allowed in the appropriate mode

If "git tag -d -l -v ..." is called, only "-l" is honored, which is
arbitrary and wrong. Also, unrecognized options are accepted in the
wrong modes, causing for example "git tag -n 100" to create a tag
named "100" while the user may have wanted to type "git tag -n100".

This patch checks that "git tag" knows in what mode it operates before
performing any operation and accepts only the related options.

Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint'Junio C Hamano Tue, 4 Nov 2008 23:11:26 +0000 (15:11 -0800)

Merge branch 'maint'

* maint:
format-patch documentation: mention the special case of showing a single commit

contrib/hooks/post-receive-email: Make revision display... Pete Harlan Tue, 4 Nov 2008 07:19:54 +0000 (23:19 -0800)

contrib/hooks/post-receive-email: Make revision display configurable

Add configuration option hooks.showrev, letting the user override how
revisions will be shown in the commit email.

Signed-off-by: Pete Harlan <pgit@pcharlan.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

contrib/hooks/post-receive-email: Put rev display in... Pete Harlan Tue, 4 Nov 2008 07:19:53 +0000 (23:19 -0800)

contrib/hooks/post-receive-email: Put rev display in separate function

The display of a revision in an email-appropriate format is done in
two places with similar code. In preparation for making that display
more complex, move it into a separate function that handles both cases.

Signed-off-by: Pete Harlan <pgit@pcharlan.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

revision traversal: '--simplify-by-decoration'Linus Torvalds Mon, 3 Nov 2008 19:25:46 +0000 (11:25 -0800)

revision traversal: '--simplify-by-decoration'

With this, you can simplify history not by the contents of the tree, but
whether a commit has been named (ie it's referred to by some branch or
tag) or not.

This makes it possible to see the relationship between different named
commits, without actually seeing any of the details.

When used with pathspec, you would get the usual view that is limited to
the commits that change the contents of the tree plus commits that are
named.

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

Make '--decorate' set an explicit 'show_decorations... Linus Torvalds Mon, 3 Nov 2008 19:23:57 +0000 (11:23 -0800)

Make '--decorate' set an explicit 'show_decorations' flag

We will want to add decorations without necessarily showing them, so add
an explicit revisions info flag as to whether we're showing decorations
or not.

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

revision: make tree comparison functions take commits... Linus Torvalds Mon, 3 Nov 2008 18:45:41 +0000 (10:45 -0800)

revision: make tree comparison functions take commits rather than trees

This will make it easier to do various clever things that don't depend
on the pure tree contents. It also makes the parameter passing much
simpler - the callers doesn't really look at trees anywhere else, and
it's really the function that should look at the low-level details.

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

Add a 'source' decorator for commitsLinus Torvalds Mon, 27 Oct 2008 19:51:59 +0000 (12:51 -0700)

Add a 'source' decorator for commits

We already support decorating commits by tags or branches that point to
them, but especially when we are looking at multiple branches together,
we sometimes want to see _how_ we reached a particular commit.

We can abuse the '->util' field in the commit to keep track of that as
we walk the commit lists, and get a reasonably useful view into which
branch or tag first reaches that commit.

Of course, if the commit is reachable through multiple sources (which is
common), our particular choice of "first" reachable is entirely random
and depends on the particular path we happened to follow.

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

Makefile: add install-man rules (quick and normal)Markus Heidelberg Sun, 2 Nov 2008 17:53:03 +0000 (18:53 +0100)

Makefile: add install-man rules (quick and normal)

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

format-patch documentation: mention the special case... Junio C Hamano Mon, 3 Nov 2008 04:45:55 +0000 (20:45 -0800)

format-patch documentation: mention the special case of showing a single commit

Even long timers seem to have missed that "format-patch -1 $commit" is a
much simpler and more obvious way to say "format-patch $commit^..$commit"
from the current documentation (and an example "format-patch -3 $commit"
to get three patches). Add an explicit instruction in a much earlier part
of the documentation to make it easier to find.

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

Update draft release notes to 1.6.1Junio C Hamano Sun, 2 Nov 2008 23:21:02 +0000 (15:21 -0800)

Update draft release notes to 1.6.1

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

Merge branch 'maint'Junio C Hamano Mon, 3 Nov 2008 00:36:40 +0000 (16:36 -0800)

Merge branch 'maint'

* maint:
Add reference for status letters in documentation.
Document that git-log takes --all-match.
Update draft 1.6.0.4 release notes

Merge branch 'np/index-pack'Junio C Hamano Mon, 3 Nov 2008 00:36:37 +0000 (16:36 -0800)

Merge branch 'np/index-pack'

* np/index-pack:
index-pack: don't leak leaf delta result
improve index-pack tests
fix multiple issues in index-pack
index-pack: smarter memory usage during delta resolution
index-pack: rationalize delta resolution code

Merge branch 'sh/rebase-i-p'Junio C Hamano Mon, 3 Nov 2008 00:36:33 +0000 (16:36 -0800)

Merge branch 'sh/rebase-i-p'

* sh/rebase-i-p:
git-rebase--interactive.sh: comparision with == is bashism
rebase-i-p: minimum fix to obvious issues
rebase-i-p: if todo was reordered use HEAD as the rewritten parent
rebase-i-p: do not include non-first-parent commits touching UPSTREAM
rebase-i-p: only list commits that require rewriting in todo
rebase-i-p: fix 'no squashing merges' tripping up non-merges
rebase-i-p: delay saving current-commit to REWRITTEN if squashing
rebase-i-p: use HEAD for updating the ref instead of mapping OLDHEAD
rebase-i-p: test to exclude commits from todo based on its parents

Merge branch 'ag/blame-encoding'Junio C Hamano Mon, 3 Nov 2008 00:36:30 +0000 (16:36 -0800)

Merge branch 'ag/blame-encoding'

* ag/blame-encoding:
builtin-blame: Reencode commit messages according to git-log rules.

Merge branch 'gb/gitweb-pathinfo'Junio C Hamano Mon, 3 Nov 2008 00:36:25 +0000 (16:36 -0800)

Merge branch 'gb/gitweb-pathinfo'

* gb/gitweb-pathinfo:
gitweb: generate parent..current URLs
gitweb: parse parent..current syntax from PATH_INFO
gitweb: use_pathinfo filenames start with /
gitweb: generate project/action/hash URLs
gitweb: parse project/action/hash_base:filename PATH_INFO

Merge branch 'cj/maint-gitpm-fix-maybe-self'Junio C Hamano Mon, 3 Nov 2008 00:36:21 +0000 (16:36 -0800)

Merge branch 'cj/maint-gitpm-fix-maybe-self'

* cj/maint-gitpm-fix-maybe-self:
Git.pm: do not break inheritance

Add reference for status letters in documentation.Yann Dirson Sun, 2 Nov 2008 13:37:28 +0000 (14:37 +0100)

Add reference for status letters in documentation.

Also fix error in diff_filepair::status documentation, and point to
the in-code reference as well as the doc.

Signed-off-by: Yann Dirson <ydirson@altern.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Document that git-log takes --all-match.Mikael Magnusson Sun, 2 Nov 2008 18:32:46 +0000 (19:32 +0100)

Document that git-log takes --all-match.

Signed-off-by: Mikael Magnusson <mikachu@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

autoconf: Add link tests to each AC_CHECK_FUNC() testDavid M. Syzdek Sun, 26 Oct 2008 11:52:19 +0000 (03:52 -0800)

autoconf: Add link tests to each AC_CHECK_FUNC() test

Update configure.ac to test libraries for getaddrinfo, strcasestr, memmem,
strlcpy, strtoumax, setenv, unsetenv, and mkdtemp. The default compilers
on FreeBSD 4.9-SECURITY and FreeBSD 6.2-RELEASE-p4 do not generate warnings
for missing prototypes unless `-Wall' is used. This behavior renders the
results of AC_CHECK_FUNC() void on these platforms. The test AC_SEARCH_LIBS()
verifies a function is valid by linking to symbol within the system libraries.

Since this pattern needs to be repeated for many functions that are
checked with AC_CHECK_FUNC(), we add GIT_CHECK_FUNC() to drive the two
autoconf macros together.

Signed-off-by: David M. Syzdek <david.syzdek@acsalaska.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Update draft 1.6.0.4 release notesJunio C Hamano Sun, 2 Nov 2008 22:35:41 +0000 (14:35 -0800)

Update draft 1.6.0.4 release notes

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

Merge branch 'js/maint-fetch-update-head' into maintJunio C Hamano Sun, 2 Nov 2008 21:37:16 +0000 (13:37 -0800)

Merge branch 'js/maint-fetch-update-head' into maint

* js/maint-fetch-update-head:
pull: allow "git pull origin $something:$current_branch" into an unborn branch
Fix fetch/pull when run without --update-head-ok

Merge branch 'jk/maint-ls-files-other' into maintJunio C Hamano Sun, 2 Nov 2008 21:37:13 +0000 (13:37 -0800)

Merge branch 'jk/maint-ls-files-other' into maint

* jk/maint-ls-files-other:
refactor handling of "other" files in ls-files and status

Merge branch 'jc/maint-reset-remove-unmerged-new' into... Junio C Hamano Sun, 2 Nov 2008 21:36:20 +0000 (13:36 -0800)

Merge branch 'jc/maint-reset-remove-unmerged-new' into maint

* jc/maint-reset-remove-unmerged-new:
reset --hard/read-tree --reset -u: remove unmerged new paths

Merge branch 'jc/maint-co-track' into maintJunio C Hamano Sun, 2 Nov 2008 21:36:14 +0000 (13:36 -0800)

Merge branch 'jc/maint-co-track' into maint

* jc/maint-co-track:
Enhance hold_lock_file_for_{update,append}() API
demonstrate breakage of detached checkout with symbolic link HEAD
Fix "checkout --track -b newbranch" on detached HEAD

Update draft release notes to 1.6.1Junio C Hamano Sun, 2 Nov 2008 07:36:07 +0000 (00:36 -0700)

Update draft release notes to 1.6.1

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

Stop using compat/regex.c on platforms with working... Junio C Hamano Fri, 24 Oct 2008 02:44:27 +0000 (19:44 -0700)

Stop using compat/regex.c on platforms with working regexp library

We used to have non-POSIX comformant BRE in our code, and linked with GNU
regexp library on a few platforms (Darwin, FreeBSD and AIX) to work it
around. This was backwards.

We've fixed the broken regexps to use ERE that native regexp libraries on
these platforms can handle just fine. There is no need to link with GNU
regexp library on these platforms anymore.

Tested-on-AIX-by: Mike Ralphson <mike@abacus.co.uk>
Tested-on-FreeBSD-by: Jeff King <peff@peff.net>
Tested-on-Darwin-by: Arjen Laarhoven <arjen@yaph.org>
Tested-on-Darwin-by: Pieter de Bie <pieter@frim.nl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

connect.c: add a way for git-daemon to pass an error... Tom Preston-Werner Sat, 1 Nov 2008 18:44:45 +0000 (11:44 -0700)

connect.c: add a way for git-daemon to pass an error back to client

The current behavior of git-daemon is to simply close the connection on
any error condition. This leaves the client without any information as
to the cause of the failed fetch/push/etc.

This patch allows get_remote_heads to accept a line prefixed with "ERR"
that it can display to the user in an informative fashion. Once clients
can understand this ERR line, git-daemon can be made to properly report
"repository not found", "permission denied", or other errors.

Example

S: ERR No matching repository.
C: fatal: remote error: No matching repository.

Signed-off-by: Tom Preston-Werner <tom@github.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Introduce receive.denyDeletesJan Krüger Sat, 1 Nov 2008 14:42:16 +0000 (15:42 +0100)

Introduce receive.denyDeletes

Occasionally, it may be useful to prevent branches from getting deleted from
a centralized repository, particularly when no administrative access to the
server is available to undo it via reflog. It also makes
receive.denyNonFastForwards more useful if it is used for access control
since it prevents force-updating by deleting and re-creating a ref.

Signed-off-by: Jan Krüger <jk@jk.gs>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint'Junio C Hamano Sun, 2 Nov 2008 07:15:22 +0000 (00:15 -0700)

Merge branch 'maint'

* maint:
Start 1.6.0.4 cycle
add instructions on how to send patches to the mailing list with Gmail
Documentation/gitattributes: Add subsection header for each attribute
git send-email: avoid leaking directory file descriptors.
send-pack: do not send out single-level refs such as refs/stash
fix overlapping memcpy in normalize_absolute_path
pack-objects: avoid reading uninitalized data
correct cache_entry allocation

Conflicts:
RelNotes

Start 1.6.0.4 cycleJunio C Hamano Sun, 2 Nov 2008 07:14:04 +0000 (00:14 -0700)

Start 1.6.0.4 cycle

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

add instructions on how to send patches to the mailing... Tom Preston-Werner Sat, 1 Nov 2008 15:28:18 +0000 (15:28 +0000)

add instructions on how to send patches to the mailing list with Gmail

Gmail is one of the most popular email providers in the world. Now that Gmail
supports IMAP, sending properly formatted patches via `git imap-send` is
trivial. This section in SubmittingPatches explains how to do so.

Signed-off-by: Tom Preston-Werner <tom@github.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation/gitattributes: Add subsection header... Jakub Narebski Sat, 1 Nov 2008 06:24:55 +0000 (06:24 +0000)

Documentation/gitattributes: Add subsection header for each attribute

This makes attributes easier to find; before this patch some
attributes had individual subsections, and some didn't.

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

git send-email: avoid leaking directory file descriptors.Pierre Habouzit Fri, 31 Oct 2008 18:57:10 +0000 (18:57 +0000)

git send-email: avoid leaking directory file descriptors.

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

send-pack: do not send out single-level refs such as... Jeff King Wed, 29 Oct 2008 05:17:55 +0000 (05:17 +0000)

send-pack: do not send out single-level refs such as refs/stash

Since no version of receive-pack accepts these "funny refs", we should
mirror the check when considering the list of refs to send. IOW, don't
even make them eligible for matching or mirroring.

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

fix overlapping memcpy in normalize_absolute_pathJeff King Thu, 23 Oct 2008 04:32:23 +0000 (04:32 +0000)

fix overlapping memcpy in normalize_absolute_path

The comments for normalize_absolute_path explicitly claim
that the source and destination buffers may be the same
(though they may not otherwise overlap). Thus the call to
memcpy may involve copying overlapping data, and memmove
should be used instead.

This fixes a valgrind error in t1504.

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

pack-objects: avoid reading uninitalized dataJeff King Thu, 23 Oct 2008 04:31:03 +0000 (04:31 +0000)

pack-objects: avoid reading uninitalized data

In the main loop of find_deltas, we do:

struct object_entry *entry = *list++;
...
if (!*list_size)
...
break

Because we look at and increment *list _before_ the check of
list_size, in the very last iteration of the loop we will
look at uninitialized data, and increment the pointer beyond
one past the end of the allocated space. Since we don't
actually do anything with the data until after the check,
this is not a problem in practice.

But since it technically violates the C standard, and
because it provokes a spurious valgrind warning, let's just
move the initialization of entry to a safe place.

This fixes valgrind errors in t5300, t5301, t5302, t303, and
t9400.

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