git.git
17 years agoPrepare for 1.6.1.4.
Junio C Hamano [Thu, 12 Feb 2009 02:44:03 +0000 (18:44 -0800)]
Prepare for 1.6.1.4.

Signed-off-by: Junio C Hamano <redacted>
17 years agoMerge branch 'maint-1.6.0' into maint
Junio C Hamano [Thu, 12 Feb 2009 02:32:37 +0000 (18:32 -0800)]
Merge branch 'maint-1.6.0' into maint

* maint-1.6.0:
  Make repack less likely to corrupt repository
  fast-export: ensure we traverse commits in topological order
  Clear the delta base cache if a pack is rebuilt

17 years agoMake repack less likely to corrupt repository
Junio C Hamano [Tue, 10 Feb 2009 20:16:31 +0000 (12:16 -0800)]
Make repack less likely to corrupt repository

Some platforms refuse to rename a file that is open.  When repacking an
already packed repository without adding any new object, the resulting
pack will contain the same set of objects as an existing pack, and on such
platforms, a newly created packfile cannot replace the existing one.

The logic detected this issue but did not try hard enough to recover from
it.  Especially because the files that needs renaming come in pairs, there
potentially are different failure modes that one can be renamed but the
others cannot.  Asking manual recovery to end users were error prone.

This patch tries to make it more robust by first making sure all the
existing files that need to be renamed have been renamed before
continuing, and attempts to roll back if some failed to rename.

This is based on an initial patch by Robin Rosenberg.

Signed-off-by: Junio C Hamano <redacted>
17 years agofast-export: ensure we traverse commits in topological order
Elijah Newren [Wed, 11 Feb 2009 06:03:53 +0000 (23:03 -0700)]
fast-export: ensure we traverse commits in topological order

fast-export will only list as parents those commits which have already
been traversed (making it appear as if merges have been squashed if not
all parents have been traversed).  To avoid this silent squashing of
merge commits, we request commits in topological order.

Signed-off-by: Elijah Newren <redacted>
Acked-by: Johannes Schindelin <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agofilter-branch: Add more error-handling
Eric Kidd [Wed, 11 Feb 2009 21:10:41 +0000 (16:10 -0500)]
filter-branch: Add more error-handling

9273b56 (filter-branch: Fix fatal error on bare repositories, 2009-02-03)
fixed a missing check of return status from an underlying command in
git-filter-branch, but there still are places that do not check errors.
For example, the command does not pay attention to the exit status of the
command given by --commit-filter.  It should abort in such a case.

This attempts to fix all the remaining places that fails to checks errors.

In two places, I've had to break apart pipelines in order to check the
error code for the first stage of the pipeline, as discussed here:

  http://kerneltrap.org/mailarchive/git/2009/1/28/4835614

Feedback on this patch was provided by Johannes Sixt, Johannes Schindelin
and Junio C Hamano.  Thomas Rast helped with pipeline error handling.

Signed-off-by: Eric Kidd <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agocompletion: More fixes to prevent unbound variable errors
Ted Pavlic [Wed, 11 Feb 2009 18:03:26 +0000 (13:03 -0500)]
completion: More fixes to prevent unbound variable errors

Several functions make use of "[-n ...]" and "[-z ...]". In many cases,
the variables being tested were declared with "local."

However, several __variables are not, and so they must be replaced with
their ${__-} equivalents.

Signed-off-by: Ted Pavlic <redacted>
Acked-by: Shawn O. Pearce <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agocompletion: Better __git_ps1 support when not in working directory
Ted Pavlic [Wed, 11 Feb 2009 18:03:25 +0000 (13:03 -0500)]
completion: Better __git_ps1 support when not in working directory

If .git/HEAD is not readable, __git_ps1 does nothing.

If --is-in-git-dir, __git_ps1 returns " (GIT_DIR!)" as a cautionary
note. The previous behavior would show the branch name (and would
optionally attempt to determine the dirtyState of the directory, which
was impossible because a "git diff" was used).

If --is-in-work-tree, __git_ps1 returns the branch name. Additionally,
if showDirtyState is on, the dirty state is displayed.

Signed-off-by: Ted Pavlic <redacted>
Acked-by: Shawn O. Pearce <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agocompletion: Use consistent if [...] convention, not "test"
Ted Pavlic [Wed, 11 Feb 2009 18:03:24 +0000 (13:03 -0500)]
completion: Use consistent if [...] convention, not "test"

The local coding convention in bash completion is to use [...] rather
than test. Additionally,

    if [...]; then

is preferred over

    if [...]
    then

and so matching "if [...]\nthen" were changed accordingly.

Signed-off-by: Ted Pavlic <redacted>
Acked-by: Shawn O. Pearce <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agocompletion: For consistency, change "git rev-parse" to __gitdir calls
Ted Pavlic [Wed, 11 Feb 2009 18:03:23 +0000 (13:03 -0500)]
completion: For consistency, change "git rev-parse" to __gitdir calls

Signed-off-by: Ted Pavlic <redacted>
Acked-by: Shawn O. Pearce <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agoFix contrib/hooks/post-receive-email for new duplicate branch
Pat Notz [Tue, 10 Feb 2009 16:43:30 +0000 (09:43 -0700)]
Fix contrib/hooks/post-receive-email for new duplicate branch

In the show_new_revisions function, the original code:

  git rev-parse --not --branches | grep -v $(git rev-parse $refname) |

isn't quite right since one can create a new branch and push it
without any new commits.  In that case, two refs will have the same
sha1 but both would get filtered by the 'grep'.  In the end, we'll
show ALL the history which is not what we want.  Instead, we should
list the branches by name and remove the branch being updated and THEN
pass that list through rev-parse.

Revised as suggested by Jakub Narebski and Junio C Hamano to use
git-for-each-ref instead of git-branch.  (Thanks!)

Signed-off-by: Pat Notz <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agoClear the delta base cache if a pack is rebuilt
Shawn O. Pearce [Wed, 11 Feb 2009 18:15:30 +0000 (10:15 -0800)]
Clear the delta base cache if a pack is rebuilt

There is some risk that re-opening a regenerated pack file with
different offsets could leave stale entries within the delta base
cache that could be matched up against other objects using the same
"struct packed_git*" and pack offset.

Throwing away the entire delta base cache in this case is safer,
as we don't have to worry about a recycled "struct packed_git*"
matching to the wrong base object, resulting in delta apply
errors while unpacking an object.

Suggested-by: Daniel Barkalow <redacted>
Signed-off-by: Shawn O. Pearce <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agoMerge git://git.bogomips.org/git-svn
Junio C Hamano [Wed, 11 Feb 2009 18:20:12 +0000 (10:20 -0800)]
Merge git://git.bogomips.org/git-svn

* git://git.bogomips.org/git-svn:
  test case for regression caused by git-svn empty symlink fix
  git-svn: fix broken symlink workaround when switching branches
  git-svn: Print revision while searching for earliest use of path
  git-svn: abstract out a block into new method other_gs()
  git-svn: allow disabling expensive broken symlink checks

17 years agoSquelch overzealous "ignoring dangling symref" in an empty repository
Junio C Hamano [Wed, 11 Feb 2009 17:22:16 +0000 (09:22 -0800)]
Squelch overzealous "ignoring dangling symref" in an empty repository

057e713 (Warn use of "origin" when remotes/origin/HEAD is dangling,
2009-02-08) tried to warn dangling refs/remotes/origin/HEAD only when
"origin" was used to refer to it.  There was one corner case a symref is
expected to be dangling and this warning is unwarranted: HEAD in an empty
repository.

This squelches the warning for this special case.

Signed-off-by: Junio C Hamano <redacted>
17 years agotest case for regression caused by git-svn empty symlink fix
Anton Gyllenberg [Tue, 10 Feb 2009 22:38:45 +0000 (00:38 +0200)]
test case for regression caused by git-svn empty symlink fix

Commit dbc6c74d0858d77e61e092a48d467e725211f8e9 "git-svn: handle empty
files marked as symlinks in SVN" caused a regression in an unusual case
where a branch has been created in SVN, later deleted and then created
again from another branch point and the original branch point had empty
files not in the new branch. In some cases git svn fetch will then fail
while trying to fetch the empty file from the wrong SVN revision.

This adds a test case that reproduces the issue.

[ew: added additional test to ensure file was created correctly
     made test file executable ]

Signed-off-by: Anton Gyllenberg <redacted>
Acked-by: Eric Wong <redacted>
17 years agogit-svn: fix broken symlink workaround when switching branches
Eric Wong [Wed, 11 Feb 2009 09:56:58 +0000 (01:56 -0800)]
git-svn: fix broken symlink workaround when switching branches

Thanks to Anton Gyllenberg <redacted> for the bug report
(and testcase in the following commit):
> Commit dbc6c74d0858d77e61e092a48d467e725211f8e9 "git-svn:
> handle empty files marked as symlinks in SVN" caused a
> regression in an unusual case where a branch has been created
> in SVN, later deleted and then created again from another
> branch point and the original branch point had empty files not
> in the new branch. In some cases git svn fetch will then fail
> while trying to fetch the empty file from the wrong SVN
> revision.

Signed-off-by: Eric Wong <redacted>
17 years agogit-svn: Print revision while searching for earliest use of path
Deskin Miller [Mon, 9 Feb 2009 00:33:18 +0000 (19:33 -0500)]
git-svn: Print revision while searching for earliest use of path

When initializing a git-svn repository from a Subversion repoository,
it is common to be interested in a path which did not exist in the
initial commit to Subversion.  In a large repository, the initial fetch
may take some looking for the earliest existence of the path time while
the user receives no additional feedback.  Print the highest revision
number scanned thus far to let the user know something is still
happening.

Signed-off-by: Deskin Miller <redacted>
17 years agogit-svn: abstract out a block into new method other_gs()
Sam Vilain [Tue, 26 Jun 2007 07:23:59 +0000 (19:23 +1200)]
git-svn: abstract out a block into new method other_gs()

We will be adding a more places that need to find git revisions
corresponding to new parents, so abstract out this section into a new
method.

Signed-off-by: Yuval Kogman <redacted>
Signed-off-by: Sam Vilain <redacted>
Acked-by: Eric Wong <redacted>
[ew: minor formatting changes]

17 years agogit-svn: allow disabling expensive broken symlink checks
Eric Wong [Sun, 1 Feb 2009 01:31:12 +0000 (17:31 -0800)]
git-svn: allow disabling expensive broken symlink checks

Since dbc6c74d0858d77e61e092a48d467e725211f8e9, git-svn has had
an expensive check for broken symlinks that exist in some
repositories.  This leads to a heavy performance hit on
repositories with many empty blobs that are not supposed to be
symlinks.

The workaround is enabled by default; and may be disabled via:

  git config svn.brokenSymlinkWorkaround false

Reported by Markus Heidelberg.

Signed-off-by: Eric Wong <redacted>
17 years agoMerge branch 'maint'
Junio C Hamano [Wed, 11 Feb 2009 10:00:22 +0000 (02:00 -0800)]
Merge branch 'maint'

* maint:
  revision traversal and pack: notice and die on missing commit

17 years agoMerge branch 'maint-1.5.6' into maint
Junio C Hamano [Wed, 11 Feb 2009 10:00:07 +0000 (02:00 -0800)]
Merge branch 'maint-1.5.6' into maint

* maint-1.5.6:
  revision traversal and pack: notice and die on missing commit

17 years agoMerge branch 'maint-1.5.5' into maint-1.5.6
Junio C Hamano [Wed, 11 Feb 2009 09:41:22 +0000 (01:41 -0800)]
Merge branch 'maint-1.5.5' into maint-1.5.6

* maint-1.5.5:
  revision traversal and pack: notice and die on missing commit

Conflicts:
revision.c

17 years agoMerge branch 'maint-1.5.4' into maint-1.5.5
Junio C Hamano [Wed, 11 Feb 2009 09:40:12 +0000 (01:40 -0800)]
Merge branch 'maint-1.5.4' into maint-1.5.5

* maint-1.5.4:
  revision traversal and pack: notice and die on missing commit

17 years agorevision traversal and pack: notice and die on missing commit
Junio C Hamano [Wed, 11 Feb 2009 09:27:43 +0000 (01:27 -0800)]
revision traversal and pack: notice and die on missing commit

cc0e6c5 (Handle return code of parse_commit in revision machinery,
2007-05-04) attempted to tighten error checking in the revision machinery,
but it wasn't enough.  When get_revision_1() was asked for the next commit
to return, it tries to read and simplify the parents of the commit to be
returned, but an error while doing so was silently ignored and reported as
a truncated history to the caller instead.

This resulted in an early end of "git log" output or a pack that lacks
older commits from "git pack-objects", without any error indication in the
exit status from these commands, even though the underlying parse_commit()
issues an error message to the end user.

Note that the codepath in add_parents_list() that paints parents of an
UNINTERESTING commit UNINTERESTING silently ignores the error when
parse_commit() fails; this is deliberate and in line with aeeae1b
(revision traversal: allow UNINTERESTING objects to be missing,
2009-01-27).

Signed-off-by: Junio C Hamano <redacted>
17 years agobuiltin-receive-pack.c: do not initialize statics to 0
Junio C Hamano [Mon, 9 Feb 2009 06:19:43 +0000 (22:19 -0800)]
builtin-receive-pack.c: do not initialize statics to 0

Signed-off-by: Junio C Hamano <redacted>
17 years agoreceive-pack: receive.denyDeleteCurrent
Junio C Hamano [Mon, 9 Feb 2009 06:31:21 +0000 (22:31 -0800)]
receive-pack: receive.denyDeleteCurrent

This is a companion patch to the recent 3d95d92 (receive-pack: explain
what to do when push updates the current branch, 2009-01-31).

Deleting the current branch from a remote will result in the next clone
from it not check out anything, among other things.  It also is one of the
cause that makes remotes/origin/HEAD a dangling symbolic ref.  This patch
still allows the traditional behaviour but with a big warning, and promises
that the default will change to 'refuse' in a future release.

Signed-off-by: Junio C Hamano <redacted>
17 years agoDrop double-semicolon in C
Junio C Hamano [Wed, 11 Feb 2009 01:42:04 +0000 (17:42 -0800)]
Drop double-semicolon in C

The worst offenders are "continue;;" and "break;;" in switch statements.

Signed-off-by: Junio C Hamano <redacted>
17 years agoWarn use of "origin" when remotes/origin/HEAD is dangling
Junio C Hamano [Mon, 9 Feb 2009 07:52:01 +0000 (23:52 -0800)]
Warn use of "origin" when remotes/origin/HEAD is dangling

The previous one squelched the diagnositic message we used to issue every
time we enumerated the refs and noticed a dangling ref.  This adds the
warning back to the place where the user actually attempts to use it.

Signed-off-by: Junio C Hamano <redacted>
17 years agoremote prune: warn dangling symrefs
Junio C Hamano [Mon, 9 Feb 2009 07:27:10 +0000 (23:27 -0800)]
remote prune: warn dangling symrefs

If you prune from the remote "frotz" that deleted the ref your tracking
branch remotes/frotz/HEAD points at, the symbolic ref will become
dangling.  We used to detect this as an error condition and issued a
message every time refs are enumerated.

This stops the error message, but moves the warning to "remote prune".

Signed-off-by: Junio C Hamano <redacted>
17 years agoFix the installation path for html documentation
Michael J Gruber [Tue, 10 Feb 2009 15:14:13 +0000 (16:14 +0100)]
Fix the installation path for html documentation

026fa0d (Move computation of absolute paths from Makefile to runtime in
preparation for RUNTIME_PREFIX, 2009-01-18) broke the installation of html
documentation.  A relative htmldir is given to Documentation/Makefile and
html documentations are installed in a subdirectory of "Documentation" in
the source tree.

Fix this by not exporting htmldir from Makefile; this allows
Documentation/Makefile to compute the htmldir from the prefix.

Signed-off-by: Michael J Gruber <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agoGeneralize and libify index_is_dirty() to index_differs_from(...)
Stephan Beyer [Tue, 10 Feb 2009 14:30:35 +0000 (15:30 +0100)]
Generalize and libify index_is_dirty() to index_differs_from(...)

index_is_dirty() in builtin-revert.c checks if the index is dirty.
This patch generalizes this function to check if the index differs
from a revision, i.e. the former index_is_dirty() behavior can now be
achieved by index_differs_from("HEAD", 0).

The second argument "diff_flags" allows to set further diff option
flags like DIFF_OPT_IGNORE_SUBMODULES. See DIFF_OPT_* macros in diff.h
for a list.

index_differs_from() seems to be useful for more than builtin-revert.c,
so it is moved into diff-lib.c and also used in builtin-commit.c.

Yet to mention:

 - "rev.abbrev = 0;" can be safely removed.
   This has no impact on performance or functioning of neither
   setup_revisions() nor run_diff_index().

 - rev.pending.objects is free()d because this fixes a leak.
   (Also see 295dd2ad "Fix memory leak in traverse_commit_list")

Mentored-by: Daniel Barkalow <redacted>
Mentored-by: Christian Couder <redacted>
Signed-off-by: Stephan Beyer <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agoMakefile: resort filenames alphabetically
Stephan Beyer [Mon, 9 Feb 2009 22:00:45 +0000 (23:00 +0100)]
Makefile: resort filenames alphabetically

Some filenames in the Makefile got out of order.
This patch resorts the filename lists which makes it easier
to grasp that it is sorted and that this should be kept.

Signed-off-by: Stephan Beyer <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agoModernize t5400 test script
Junio C Hamano [Mon, 9 Feb 2009 21:39:52 +0000 (13:39 -0800)]
Modernize t5400 test script

Many tests checked for failure by hand without using test_must_fail (they
probably predate the shell function).

When we know the desired outcome, explicitly check for it, instead of
checking if the result does not match one possible incorrect outcome.
E.g. if you expect a push to be refused, you do not test if the result is
different from what was pushed.  Instead, make sure that the ref did not
before and after the push.

The test sequence chdir'ed around and any failure at one point could have
started the next test in an unexpected directory.  Fix this problem by
using subshells as necessary.

Signed-off-by: Junio C Hamano <redacted>
17 years agoDescribe notable git.el changes in the release notes
Alexandre Julliard [Mon, 9 Feb 2009 13:39:30 +0000 (14:39 +0100)]
Describe notable git.el changes in the release notes

Signed-off-by: Alexandre Julliard <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agoRevert "Merge branch 'js/notes'"
Junio C Hamano [Wed, 11 Feb 2009 05:31:33 +0000 (21:31 -0800)]
Revert "Merge branch 'js/notes'"

This reverts commit 7b75b331f6744fbf953fe8913703378ef86a2189, reversing
changes made to 5d680a67d7909c89af96eba4a2d77abed606292b.

17 years agoMerge branch 'lh/submodule-tree-traversal' (early part)
Junio C Hamano [Wed, 11 Feb 2009 05:31:19 +0000 (21:31 -0800)]
Merge branch 'lh/submodule-tree-traversal' (early part)

* 'lh/submodule-tree-traversal' (early part):
  tree.c: allow read_tree_recursive() to traverse gitlink entries

17 years agoMerge branch 'js/git-submodule-trailing-slash'
Junio C Hamano [Wed, 11 Feb 2009 05:31:08 +0000 (21:31 -0800)]
Merge branch 'js/git-submodule-trailing-slash'

* js/git-submodule-trailing-slash:
  submodule: warn about non-submodules
  Let ls-files strip trailing slashes in submodules' paths

17 years agoMerge branch 'js/maint-1.6.0-path-normalize'
Junio C Hamano [Wed, 11 Feb 2009 05:30:52 +0000 (21:30 -0800)]
Merge branch 'js/maint-1.6.0-path-normalize'

* js/maint-1.6.0-path-normalize:
  Remove unused normalize_absolute_path()
  Test and fix normalize_path_copy()
  Fix GIT_CEILING_DIRECTORIES on Windows
  Move sanitary_path_copy() to path.c and rename it to normalize_path_copy()
  Make test-path-utils more robust against incorrect use

17 years agoMerge branch 'maint'
Junio C Hamano [Wed, 11 Feb 2009 05:30:45 +0000 (21:30 -0800)]
Merge branch 'maint'

* maint:
  Clear the delta base cache during fast-import checkpoint

17 years agoMerge branch 'maint-1.6.0' into maint
Junio C Hamano [Tue, 10 Feb 2009 23:32:26 +0000 (15:32 -0800)]
Merge branch 'maint-1.6.0' into maint

* maint-1.6.0:
  Clear the delta base cache during fast-import checkpoint

17 years agoClear the delta base cache during fast-import checkpoint
Shawn O. Pearce [Tue, 10 Feb 2009 21:36:12 +0000 (13:36 -0800)]
Clear the delta base cache during fast-import checkpoint

Otherwise we may reuse the same memory address for a totally
different "struct packed_git", and a previously cached object from
the prior occupant might be returned when trying to unpack an object
from the new pack.

Found-by: Daniel Barkalow <redacted>
Signed-off-by: Shawn O. Pearce <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agolstat_cache(): print a warning if doing ping-pong between cache types
Kjetil Barvik [Mon, 9 Feb 2009 20:54:53 +0000 (21:54 +0100)]
lstat_cache(): print a warning if doing ping-pong between cache types

This is a debug patch which is only to be used while the lstat_cache()
is in the test stage, and should be removed/reverted before the final
relase.

I think it should be useful to catch these warnings, as I it could be
an indication of that the cache would not be very effective if it is
doing ping-pong by switching between different cache types too many
times.

Also, if someone is experimenting with the lstat_cache(), this patch
will maybe be useful while debugging.

If someone is able to trigger the warning, then send a mail to the GIT
mailing list, containing the first 15 lines of the warning, and a
short description of the GIT commands to trigger the warnings.

I hope someone is willing to use this patch for a while, to be able to
catch possible ping-pong's.

Signed-off-by: Kjetil Barvik <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agoshow_patch_diff(): remove a call to fstat()
Kjetil Barvik [Mon, 9 Feb 2009 20:54:52 +0000 (21:54 +0100)]
show_patch_diff(): remove a call to fstat()

Currently inside show_patch_diff() we have an fstat() call after an
ok lstat() call.  Since before the call to fstat() we have already
tested for the link case with S_ISLNK(), the fstat() can be removed.

Signed-off-by: Kjetil Barvik <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agowrite_entry(): use fstat() instead of lstat() when file is open
Kjetil Barvik [Mon, 9 Feb 2009 20:54:51 +0000 (21:54 +0100)]
write_entry(): use fstat() instead of lstat() when file is open

Currently inside write_entry() we do an lstat(path, &st) call on a
file which have just been opened inside the exact same function.  It
should be better to call fstat(fd, &st) on the file while it is open,
and it should be at least as fast as the lstat() method.

Signed-off-by: Kjetil Barvik <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agowrite_entry(): cleanup of some duplicated code
Kjetil Barvik [Mon, 9 Feb 2009 20:54:50 +0000 (21:54 +0100)]
write_entry(): cleanup of some duplicated code

The switch-cases for S_IFREG and S_IFLNK was so similar that it will
be better to do some cleanup and use the common parts of it.

And the entry.c file should now be clean for 'gcc -Wextra' warnings.

Signed-off-by: Kjetil Barvik <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agocreate_directories(): remove some memcpy() and strchr() calls
Kjetil Barvik [Mon, 9 Feb 2009 20:54:08 +0000 (21:54 +0100)]
create_directories(): remove some memcpy() and strchr() calls

Remove the call to memcpy() and strchr() for each path component
tested, and instead add each path component as we go forward inside
the while-loop.

Impact: small optimisation

Signed-off-by: Kjetil Barvik <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agounlink_entry(): introduce schedule_dir_for_removal()
Kjetil Barvik [Mon, 9 Feb 2009 20:54:07 +0000 (21:54 +0100)]
unlink_entry(): introduce schedule_dir_for_removal()

Currently inside unlink_entry() if we get a successful removal of one
file with unlink(), we try to remove the leading directories each and
every time.  So if one directory containing 200 files is moved to an
other location we get 199 failed calls to rmdir() and 1 successful
call.

To fix this and avoid some unnecessary calls to rmdir(), we schedule
each directory for removal and wait much longer before we do the real
call to rmdir().

Since the unlink_entry() function is called with alphabetically sorted
names, this new function end up being very effective to avoid
unnecessary calls to rmdir().  In some cases over 95% of all calls to
rmdir() is removed with this patch.

Signed-off-by: Kjetil Barvik <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agolstat_cache(): swap func(length, string) into func(string, length)
Kjetil Barvik [Mon, 9 Feb 2009 20:54:06 +0000 (21:54 +0100)]
lstat_cache(): swap func(length, string) into func(string, length)

Swap function argument pair (length, string) into (string, length) to
conform with the commonly used order inside the GIT source code.

Also, add a note about this fact into the coding guidelines.

Signed-off-by: Kjetil Barvik <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agolstat_cache(): generalise longest_match_lstat_cache()
Kjetil Barvik [Mon, 9 Feb 2009 20:54:05 +0000 (21:54 +0100)]
lstat_cache(): generalise longest_match_lstat_cache()

Rename the function to longst_path_match() and generalise it such that
it can also be used by other functions.

Signed-off-by: Kjetil Barvik <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agolstat_cache(): small cleanup and optimisation
Kjetil Barvik [Mon, 9 Feb 2009 20:54:04 +0000 (21:54 +0100)]
lstat_cache(): small cleanup and optimisation

Simplify the if-else test in longest_match_lstat_cache() such that we
only have one simple if test.  Instead of testing for 'i == cache.len'
or 'i == len', we transform this to a common test for 'i == max_len'.

And to further optimise we use 'i >= max_len' instead of 'i ==
max_len', the reason is that it is now the exact opposite of one part
inside the while-loop termination expression 'i < max_len && name[i]
== cache.path[i]', and then the compiler can probably reuse a test
instruction from it.

We also throw away the arguments to reset_lstat_cache(), such that all
the safeguard logic inside lstat_cache() is handled at one place.

Signed-off-by: Kjetil Barvik <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agogit-web--browse: Fix check for /bin/start
Todd Zullinger [Sun, 8 Feb 2009 23:12:43 +0000 (18:12 -0500)]
git-web--browse: Fix check for /bin/start

The previous check in git-web--browse for /bin/start used test -n
/bin/start, which was always true.  This lead to "start" being tried
first in the browser list.  On systems with upstart installed, "start"
exists and might be in the PATH, but it makes a poor choice for a web
browser.  Instead, test that /bin/start exists and is executable.

Signed-off-by: Todd Zullinger <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agoMerge branch 'maint'
Junio C Hamano [Mon, 9 Feb 2009 06:07:53 +0000 (22:07 -0800)]
Merge branch 'maint'

* maint:
  gitweb: add $prevent_xss option to prevent XSS by repository content
  rev-list: fix showing distance when using --bisect-all

17 years agocompletion: Get rid of tabbed indentation in comments. Replace with spaces.
Ted Pavlic [Fri, 6 Feb 2009 16:05:38 +0000 (11:05 -0500)]
completion: Get rid of tabbed indentation in comments. Replace with spaces.

Signed-off-by: Ted Pavlic <redacted>
Acked-by: Shawn O. Pearce <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agocompletion: Fix GIT_PS1_SHOWDIRTYSTATE to prevent unbound variable errors.
Ted Pavlic [Fri, 6 Feb 2009 16:05:37 +0000 (11:05 -0500)]
completion: Fix GIT_PS1_SHOWDIRTYSTATE to prevent unbound variable errors.

Signed-off-by: Ted Pavlic <redacted>
Acked-by: Shawn O. Pearce <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agogitweb: add $prevent_xss option to prevent XSS by repository content
Matt McCutchen [Sun, 8 Feb 2009 00:00:09 +0000 (19:00 -0500)]
gitweb: add $prevent_xss option to prevent XSS by repository content

Add a gitweb configuration variable $prevent_xss that disables features
to prevent content in repositories from launching cross-site scripting
(XSS) attacks in the gitweb domain.  Currently, this option makes gitweb
ignore README.html (a better solution may be worked out in the future)
and serve a blob_plain file of an untrusted type with
"Content-Disposition: attachment", which tells the browser not to show
the file at its original URL.

The XSS prevention is currently off by default.

Signed-off-by: Matt McCutchen <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agodoc/bundle: Use the more conventional suffix '.bundle'
Santi Béjar [Sat, 7 Feb 2009 22:21:49 +0000 (23:21 +0100)]
doc/bundle: Use the more conventional suffix '.bundle'

Although it does not matter in general it is handled different by
"git clone", as it removes it to make the "humanish" name of the
new repository.

Signed-off-by: Santi Béjar <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agoAdd two extra tests for git rebase
Johannes Schindelin [Mon, 9 Feb 2009 05:40:42 +0000 (21:40 -0800)]
Add two extra tests for git rebase

17 years agoDocumentation: clarify commits affected by gitk --merge
Sitaram Chamarty [Fri, 6 Feb 2009 04:40:53 +0000 (10:10 +0530)]
Documentation: clarify commits affected by gitk --merge

Signed-off-by: Sitaram Chamarty <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agoadd -p: get rid of Git.pm warnings about unitialized values
Stephan Beyer [Sun, 8 Feb 2009 17:40:39 +0000 (18:40 +0100)]
add -p: get rid of Git.pm warnings about unitialized values

After invoking git add -p I always got the warnings:

 Use of uninitialized value $_[3] in exec at Git.pm line 1282.
 Use of uninitialized value $args[2] in join or string at Git.pm line 1264.

A bisect showed that these warnings occur in a301973 "add -p: print errors
in separate color" the first time.

They can be reproduced by setting color.ui (or color.interactive) to "auto"
and unsetting color.interactive.help and color.interactive.error.
I am using Perl 5.10.0.

The reason of the warning is that color.interactive.error defaults to
color.interactive.help which defaults to nothing in the specific codepath.
It defaults to 'red bold' some lines above which could lead to the wrong
assumption that it always defaults to 'red bold' now.

This patch lets it default to 'red bold', blowing the warnings away.

Signed-off-by: Stephan Beyer <redacted>
Acked-By: Thomas Rast <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agoconfig: Add new option to open an editor.
Felipe Contreras [Sat, 7 Feb 2009 21:53:00 +0000 (23:53 +0200)]
config: Add new option to open an editor.

The idea was originated by discussion about usability of manually
editing the config file in 'special needs' systems such as Windows. Now
the user can forget a bit about where the config files actually are.

Signed-off-by: Felipe Contreras <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agorev-list: fix showing distance when using --bisect-all
Christian Couder [Sun, 8 Feb 2009 14:54:47 +0000 (15:54 +0100)]
rev-list: fix showing distance when using --bisect-all

Before d467a52 ("Make '--decorate' set an explicit 'show_decorations'
flag", Nov 3 2008), commit decorations were shown whenever they exist, and
distances stored in them by "git rev-list --bisect-all" were automatically
shown.  d467a52 changed the rule so that commit decorations are not shown
unless rev_info explicitly asks to, with its show_decorations bit, but
forgot that the ones "git rev-list --bisect-all" adds need to be shown.

This patch fixes this old breakage.

Signed-off-by: Christian Couder <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agoMove mailmap documentation into separate file
Marius Storm-Olsen [Sun, 8 Feb 2009 14:34:31 +0000 (15:34 +0100)]
Move mailmap documentation into separate file

Include it directly from git-shortlog.txt, and refer
to it from pretty-format.txt.

Signed-off-by: Marius Storm-Olsen <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agoChange current mailmap usage to do matching on both name and email of author/committer.
Marius Storm-Olsen [Sun, 8 Feb 2009 14:34:30 +0000 (15:34 +0100)]
Change current mailmap usage to do matching on both name and email of author/committer.

Signed-off-by: Marius Storm-Olsen <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agoAdd map_user() and clear_mailmap() to mailmap
Marius Storm-Olsen [Sun, 8 Feb 2009 14:34:29 +0000 (15:34 +0100)]
Add map_user() and clear_mailmap() to mailmap

map_user() allows to lookup and replace both email and
name of a user, based on a new style mailmap file.

The possible mailmap definitions are now:

  proper_name <commit_email>                             # Old style
  <proper_email> <commit_email>                          # New style
  proper_name <proper_email> <commit_email>              # New style
  proper_name <proper_email> commit_name <commit_email>  # New style

map_email() operates the same as before, with the
exception that it also will to try to match on a name
passed in through the name return buffer.

clear_mailmap() is needed to now clear the more complex
mailmap structure.

Signed-off-by: Marius Storm-Olsen <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agoAdd find_insert_index, insert_at_index and clear_func functions to string_list
Marius Storm-Olsen [Sun, 8 Feb 2009 14:34:28 +0000 (15:34 +0100)]
Add find_insert_index, insert_at_index and clear_func functions to string_list

string_list_find_insert_index() and string_list_insert_at_index()
enables you to see if an item is in the string_list, and to
insert at the appropriate index in the list, if not there.
This is usefull if you need to manipulate an existing item,
if present, and insert a new item if not.

Future mailmap code will use this construct to enable
complex (old_name, old_email) -> (new_name, new_email)
lookups.

The string_list_clear_func() allows to call a custom
cleanup function on each item in a string_list, which is
useful is the util member points to a complex structure.

Signed-off-by: Marius Storm-Olsen <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agoAdd mailmap.file as configurational option for mailmap location
Marius Storm-Olsen [Sun, 8 Feb 2009 14:34:27 +0000 (15:34 +0100)]
Add mailmap.file as configurational option for mailmap location

This allows us to augment the repo mailmap file, and to use
mailmap files elsewhere than the repository root. Meaning
that the entries in mailmap.file will override the entries
in "./.mailmap", should they match.

Signed-off-by: Marius Storm-Olsen <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agogit-gui: Support more git version notations.
Alexander Gavrilov [Sat, 7 Feb 2009 16:43:57 +0000 (19:43 +0300)]
git-gui: Support more git version notations.

Recently the msysgit repository has got a '1.6.1-msysgit1'
tag, which, when used to build the git version, is not
handled gracefully by the git-gui version code.

This patch changes the regular expressions to fix it, and
removes the hardcoded 'rc' string. Now git-gui can accept
a version tail like '.foo123.GIT.bar.456.7.g89ab'

Signed-off-by: Alexander Gavrilov <redacted>
Signed-off-by: Shawn O. Pearce <redacted>
17 years agogit-gui: Avoid an infinite rescan loop in handle_empty_diff.
Alexander Gavrilov [Sat, 7 Feb 2009 16:24:01 +0000 (19:24 +0300)]
git-gui: Avoid an infinite rescan loop in handle_empty_diff.

If the index update machinery and git diff happen to disagree
on whether a particular file is modified, it may cause git-gui
to enter an infinite index rescan loop, where an empty diff
starts a rescan, which finds the same set of files modified,
and tries to display the diff for the first one, which happens
to be the empty one. A current example of a possible disagreement
point is the autocrlf filter.

This patch breaks the loop by using a global counter to track
the auto-rescans. The variable is reset whenever a non-empty
diff is displayed.

Another suggested approach, which is based on giving the
--exit-code argument to git diff, cannot be used, because
diff-files seems to trust the timestamps in the index, and
returns a non-zero code even if the file is actually
unchanged, which essentially defeats the purpose of the
auto-rescan logic.

Signed-off-by: Alexander Gavrilov <redacted>
Signed-off-by: Shawn O. Pearce <redacted>
17 years agogitweb: Better regexp for SHA-1 committag match
Jakub Narebski [Fri, 6 Feb 2009 09:12:41 +0000 (10:12 +0100)]
gitweb: Better regexp for SHA-1 committag match

Make SHA-1 regexp to be turned into hyperlink (the SHA-1 committag)
to match word boundary at the beginning and the end.  This way we
reduce number of false matches, for example we now don't match
0x74a5cd01 which is hex decimal (for example memory address),
but is not SHA-1.

Suggested-by: Johannes Schindelin <redacted>
Signed-off-by: Jakub Narebski <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agosubmodule: warn about non-submodules
Johannes Schindelin [Sat, 7 Feb 2009 13:43:15 +0000 (14:43 +0100)]
submodule: warn about non-submodules

Earlier, when you called

        git submodule some/bogus/path

Git would silently ignore the path, without warning the user about the
likely mistake.  Now it does.

Signed-off-by: Johannes Schindelin <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agoLet ls-files strip trailing slashes in submodules' paths
Johannes Schindelin [Sat, 7 Feb 2009 13:43:03 +0000 (14:43 +0100)]
Let ls-files strip trailing slashes in submodules' paths

Tab completion makes it easy to add a trailing slash to a submodule path.
As it is completely clear what the user actually wanted to say, be nice
and strip that slash at the end.

Signed-off-by: Johannes Schindelin <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agoRemove unused normalize_absolute_path()
Johannes Sixt [Sat, 7 Feb 2009 15:08:31 +0000 (16:08 +0100)]
Remove unused normalize_absolute_path()

This function is now superseded by normalize_path_copy().

Signed-off-by: Johannes Sixt <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agoTest and fix normalize_path_copy()
Johannes Sixt [Sat, 7 Feb 2009 15:08:30 +0000 (16:08 +0100)]
Test and fix normalize_path_copy()

This changes the test-path-utils utility to invoke normalize_path_copy()
instead of normalize_absolute_path() because the latter is about to be
removed.

The test cases in t0060 are adjusted in two regards:

- normalize_path_copy() more often leaves a trailing slash in the result.
  This has no negative side effects because the new user of this function,
  longest_ancester_length(), already accounts for this behavior.

- The function can fail.

The tests uncover a flaw in normalize_path_copy(): If there are
sufficiently many '..' path components so that the root is reached, such as
in "/d1/s1/../../d2", then the leading slash was lost. This manifested
itself that (assuming there is a repository at /tmp/foo)

  $ git add /d1/../tmp/foo/some-file

reported 'pathspec is outside repository'. This is now fixed.

Moreover, the test case descriptions of t0060 now include the test data and
expected outcome.

Signed-off-by: Johannes Sixt <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agoFix GIT_CEILING_DIRECTORIES on Windows
René Scharfe [Sat, 7 Feb 2009 15:08:29 +0000 (16:08 +0100)]
Fix GIT_CEILING_DIRECTORIES on Windows

Using git with GIT_CEILING_DIRECTORIES crashed on Windows due to a failed
assertion in normalize_absolute_path(): This function expects absolute
paths to start with a slash, while on Windows they can start with a drive
letter or a backslash.

This fixes it by using the alternative, normalize_path_copy() instead,
which can handle Windows-style paths just fine.

Secondly, the portability macro PATH_SEP is used instead of expecting
colons to be used as path list delimiter.

The test script t1504 is also changed to help MSYS's bash recognize some
program arguments as path list. (MSYS's bash must translate POSIX-style
path lists to Windows-style path lists, and the heuristic did not catch
some cases.)

Signed-off-by: Rene Scharfe <redacted>
Signed-off-by: Johannes Sixt <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agoMove sanitary_path_copy() to path.c and rename it to normalize_path_copy()
Johannes Sixt [Sat, 7 Feb 2009 15:08:28 +0000 (16:08 +0100)]
Move sanitary_path_copy() to path.c and rename it to normalize_path_copy()

This function and normalize_absolute_path() do almost the same thing. The
former already works on Windows, but the latter crashes.

In subsequent changes we will remove normalize_absolute_path(). Here we
make the replacement function reusable. On the way we rename it to reflect
that it does some path normalization. Apart from that this is only moving
around code.

Signed-off-by: Johannes Sixt <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agoMake test-path-utils more robust against incorrect use
Johannes Sixt [Sat, 7 Feb 2009 15:08:27 +0000 (16:08 +0100)]
Make test-path-utils more robust against incorrect use

Previously, this test utility happily returned with exit code 0 if garbage
was thrown at it. Now it reports failure if an unknown function name was
given on the command line.

Signed-off-by: Johannes Sixt <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agotree.c: allow read_tree_recursive() to traverse gitlink entries
Lars Hjemli [Sun, 25 Jan 2009 00:52:05 +0000 (01:52 +0100)]
tree.c: allow read_tree_recursive() to traverse gitlink entries

When the callback function invoked from read_tree_recursive() returns
the value `READ_TREE_RECURSIVE` for a gitlink entry, the traversal will
now continue into the tree connected to the gitlinked commit. This
functionality can be used to allow inter-repository operations, but
since the current users of read_tree_recursive() does not yet support
such operations, they have been modified where necessary to make sure
that they never return READ_TREE_RECURSIVE for gitlink entries (hence
no change in behaviour should be introduces by this patch alone).

Signed-off-by: Lars Hjemli <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agoGIT 1.6.2-rc0
Junio C Hamano [Sat, 7 Feb 2009 19:06:34 +0000 (11:06 -0800)]
GIT 1.6.2-rc0

Signed-off-by: Junio C Hamano <redacted>
17 years agoMerge branch 'tr/add-p-single'
Junio C Hamano [Sat, 7 Feb 2009 19:10:16 +0000 (11:10 -0800)]
Merge branch 'tr/add-p-single'

* tr/add-p-single:
  add -p: import Term::ReadKey with 'require'
  add -p: print errors in separate color
  add -p: prompt for single characters

17 years agoMerge branch 'js/filter-branch-submodule'
Junio C Hamano [Sat, 7 Feb 2009 19:09:48 +0000 (11:09 -0800)]
Merge branch 'js/filter-branch-submodule'

* js/filter-branch-submodule:
  filter-branch: do not consider diverging submodules a 'dirty worktree'
  filter-branch: Fix fatal error on bare repositories

17 years agoMerge branch 'maint'
Junio C Hamano [Sat, 7 Feb 2009 18:44:25 +0000 (10:44 -0800)]
Merge branch 'maint'

* maint:
  GIT 1.6.1.3

Conflicts:
GIT-VERSION-GEN
RelNotes

17 years agoemacs: Remove the no longer maintained vc-git package.
Alexandre Julliard [Sat, 7 Feb 2009 13:24:54 +0000 (14:24 +0100)]
emacs: Remove the no longer maintained vc-git package.

vc-git is distributed with Emacs since version 22.2, and is maintained
in the Emacs CVS tree. This file is obsolete and causes trouble for
people who want to add contrib/emacs to their load-path.

Signed-off-by: Alexandre Julliard <redacted>
17 years agogit.el: Add some notes about Emacs versions compatibility.
Alexandre Julliard [Sat, 7 Feb 2009 13:21:58 +0000 (14:21 +0100)]
git.el: Add some notes about Emacs versions compatibility.

Signed-off-by: Alexandre Julliard <redacted>
17 years agogit.el: Use integer instead of character constants in case statement.
Alexandre Julliard [Sat, 7 Feb 2009 13:01:26 +0000 (14:01 +0100)]
git.el: Use integer instead of character constants in case statement.

This is for compatibility with XEmacs. Reported by Vassili Karpov.

Signed-off-by: Alexandre Julliard <redacted>
17 years agogit.el: Set a regexp for paragraph-separate in log-edit mode.
Alexandre Julliard [Tue, 27 Jan 2009 10:59:54 +0000 (11:59 +0100)]
git.el: Set a regexp for paragraph-separate in log-edit mode.

This allows using fill-paragraph on the log message without
interference from the various header fields.

Signed-off-by: Alexandre Julliard <redacted>
17 years agogit.el: Make git-run-command-region display the error if any.
Alexandre Julliard [Sun, 23 Nov 2008 15:12:45 +0000 (16:12 +0100)]
git.el: Make git-run-command-region display the error if any.

This makes it easier to figure out why a commit has failed.

Signed-off-by: Alexandre Julliard <redacted>
17 years agogit.el: Add commands for cherry-pick and revert.
Alexandre Julliard [Sun, 23 Nov 2008 13:34:48 +0000 (14:34 +0100)]
git.el: Add commands for cherry-pick and revert.

Support for cherry-picking and reverting commits, with automatic
formatting of the commit log message. Bound to C-c C-p and C-c C-v
respectively.

Signed-off-by: Alexandre Julliard <redacted>
17 years agogit.el: Add a command to create a new branch.
Alexandre Julliard [Sun, 23 Nov 2008 13:25:50 +0000 (14:25 +0100)]
git.el: Add a command to create a new branch.

Prompts for a branch name, create a new branch at HEAD and switch to
it. Bound to C-c C-b by default.

Based on a patch by Rémi Vanicat <redacted>.

Signed-off-by: Alexandre Julliard <redacted>
17 years agogit.el: Add a checkout command.
Alexandre Julliard [Sun, 23 Nov 2008 13:16:22 +0000 (14:16 +0100)]
git.el: Add a checkout command.

Prompts for a branch name and checks it out. Bound to C-c C-o by
default.

Based on a patch by Rémi Vanicat <redacted>.

Signed-off-by: Alexandre Julliard <redacted>
17 years agoGIT 1.6.1.3
Junio C Hamano [Sat, 7 Feb 2009 08:51:47 +0000 (00:51 -0800)]
GIT 1.6.1.3

Signed-off-by: Junio C Hamano <redacted>
17 years agogit-sh-setup: Use "cd" option, not /bin/pwd, for symlinked work tree
Marcel M. Cary [Sat, 7 Feb 2009 03:24:28 +0000 (19:24 -0800)]
git-sh-setup: Use "cd" option, not /bin/pwd, for symlinked work tree

In cd_to_toplevel, instead of 'cd $(unset PWD; /bin/pwd)/$path'
use 'cd -P $path'.  The "-P" option yields a desirable similarity to
C chdir.

While the "-P" option may be slightly less commonly supported than
/bin/pwd, it is more concise, better tested, and less error prone.
I've already added the 'unset PWD' to fix the /bin/pwd solution on
BSD; there may be more edge cases out there.

This still passes all the same test cases in t5521-pull-symlink.sh and
t2300-cd-to-toplevel.sh, even before updating them to use 'pwd -P'.

Signed-off-by: Junio C Hamano <redacted>
17 years agosubmodule: add --no-fetch parameter to update command
Fabian Franz [Thu, 5 Feb 2009 22:18:32 +0000 (20:18 -0200)]
submodule: add --no-fetch parameter to update command

git submodule update --no-fetch makes it possible to use git submodule
update in complete offline mode by not fetching new revisions.

This does make sense in the following setup:

* There is an unstable and a stable branch in the super/master repository.
* The submodules might be at different revisions in the branches.
* You are at some place without internet connection ;)

With this patch it is now possible to change branches and update
the submodules to be at the recorded revision without online access.

Another advantage is that with -N the update operation is faster, because fetch is checking for new updates even if there was no fetch/pull on the super/master repository since the last update.

Signed-off-by: Fabian Franz <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agoadd -p: import Term::ReadKey with 'require'
Thomas Rast [Fri, 6 Feb 2009 19:30:01 +0000 (20:30 +0100)]
add -p: import Term::ReadKey with 'require'

eval{use...} is no good because the 'use' is evaluated at compile
time, so manually 'require' it.  We need to forward declare the
functions we use, otherwise Perl raises a compilation error.

Signed-off-by: Thomas Rast <redacted>
Signed-off-by: Junio C Hamano <redacted>
17 years agoMerge branch 'js/maint-remote-remove-mirror'
Junio C Hamano [Fri, 6 Feb 2009 03:40:41 +0000 (19:40 -0800)]
Merge branch 'js/maint-remote-remove-mirror'

* js/maint-remote-remove-mirror:
  builtin-remote: make rm operation safer in mirrored repository
  builtin-remote: make rm() use properly named variable to hold return value

17 years agoMerge branch 'js/notes'
Junio C Hamano [Fri, 6 Feb 2009 03:40:39 +0000 (19:40 -0800)]
Merge branch 'js/notes'

* js/notes:
  git-notes: fix printing of multi-line notes
  notes: fix core.notesRef documentation
  Add an expensive test for git-notes
  Speed up git notes lookup
  Add a script to edit/inspect notes
  Introduce commit notes

Conflicts:
pretty.c

17 years agoMerge branch 'jc/refuse-push-to-current'
Junio C Hamano [Fri, 6 Feb 2009 03:40:36 +0000 (19:40 -0800)]
Merge branch 'jc/refuse-push-to-current'

* jc/refuse-push-to-current:
  receive-pack: explain what to do when push updates the current branch

17 years agoMerge branch 'rc/http-push'
Junio C Hamano [Fri, 6 Feb 2009 03:40:36 +0000 (19:40 -0800)]
Merge branch 'rc/http-push'

* rc/http-push:
  http-push: wrap signature of get_remote_object_url
  http-push: add back underscore separator before lock token
  http-push.c: get_remote_object_url() is only used under USE_CURL_MULTI
  http-push: refactor request url creation

17 years agoMerge branch 'gt/utf8-width'
Junio C Hamano [Fri, 6 Feb 2009 03:40:35 +0000 (19:40 -0800)]
Merge branch 'gt/utf8-width'

* gt/utf8-width:
  builtin-blame.c: Use utf8_strwidth for author's names
  utf8: add utf8_strwidth()

17 years agoMerge branch 'jk/head-symref'
Junio C Hamano [Fri, 6 Feb 2009 03:40:35 +0000 (19:40 -0800)]
Merge branch 'jk/head-symref'

* jk/head-symref:
  symbolic ref: refuse non-ref targets in HEAD
  validate_headref: tighten ref-matching to just branches

17 years agoMerge branch 'cb/mergetool'
Junio C Hamano [Fri, 6 Feb 2009 03:40:35 +0000 (19:40 -0800)]
Merge branch 'cb/mergetool'

* cb/mergetool:
  mergetool: fix running mergetool in sub-directories
  mergetool: Add a test for running mergetool in a sub-directory
  mergetool: respect autocrlf by using checkout-index

17 years agoMerge branch 'maint'
Junio C Hamano [Fri, 6 Feb 2009 03:40:25 +0000 (19:40 -0800)]
Merge branch 'maint'

* maint:
  Fixed broken git help -w when installing from RPM

git clone https://git.99rst.org/PROJECT