git
18 years agoMerge branch 'ew/rerere'
Junio C Hamano [Wed, 13 Dec 2006 19:08:35 +0000 (11:08 -0800)] 
Merge branch 'ew/rerere'

* ew/rerere:
  rerere: record (or avoid misrecording) resolved, skipped or aborted rebase/am
  git-rerere: add 'gc' command.
  rerere: add clear, diff, and status commands

18 years agoMerge branch 'np/addcommit'
Junio C Hamano [Wed, 13 Dec 2006 19:08:20 +0000 (11:08 -0800)] 
Merge branch 'np/addcommit'

* np/addcommit:
  git-commit: allow --only to lose what was staged earlier.
  Documentation/git-commit: rewrite to make it more end-user friendly.
  make 'git add' a first class user friendly interface to the index

18 years agoMerge branch 'lh/branch-rename'
Junio C Hamano [Wed, 13 Dec 2006 19:07:51 +0000 (11:07 -0800)] 
Merge branch 'lh/branch-rename'

* lh/branch-rename:
  git-branch: let caller specify logmsg
  rename_ref: use lstat(2) when testing for symlink
  git-branch: add options and tests for branch renaming

Conflicts:

builtin-branch.c

18 years agoMerge branch 'jc/commit-careful'
Junio C Hamano [Wed, 13 Dec 2006 19:03:46 +0000 (11:03 -0800)] 
Merge branch 'jc/commit-careful'

* jc/commit-careful:
  git-commit: show --summary after successful commit.

18 years agoMerge branch 'ap/clone-origin'
Junio C Hamano [Wed, 13 Dec 2006 19:03:33 +0000 (11:03 -0800)] 
Merge branch 'ap/clone-origin'

* ap/clone-origin:
  Explicitly add the default "git pull" behaviour to .git/config on clone

18 years agoMerge branch 'jc/numstat'
Junio C Hamano [Wed, 13 Dec 2006 19:00:32 +0000 (11:00 -0800)] 
Merge branch 'jc/numstat'

* jc/numstat:
  diff --numstat: show binary with '-' to match "apply --numstat"

18 years agoMerge branch 'rr/cvsexportcommit'
Junio C Hamano [Wed, 13 Dec 2006 19:00:27 +0000 (11:00 -0800)] 
Merge branch 'rr/cvsexportcommit'

* rr/cvsexportcommit:
  Make cvsexportcommit work with filenames with spaces and non-ascii characters.

18 years agoMerge branch 'ap/branch'
Junio C Hamano [Wed, 13 Dec 2006 18:57:02 +0000 (10:57 -0800)] 
Merge branch 'ap/branch'

* ap/branch:
  branch --color: change default color selection.
  Colourise git-branch output

18 years agobranch --color: change default color selection.
Junio C Hamano [Wed, 13 Dec 2006 18:55:21 +0000 (10:55 -0800)] 
branch --color: change default color selection.

Showing local and remote branches in green and red was simply
overkill, as all we wanted was to make it easy to tell them
apart (local ones can be built on top by committing, but the
remote tracking ones can't).

Use plain coloring for local branches and paint remotes in red.

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoMerge branch 'js/merge'
Junio C Hamano [Wed, 13 Dec 2006 18:46:23 +0000 (10:46 -0800)] 
Merge branch 'js/merge'

* js/merge:
  merge-recursive: add/add really is modify/modify with an empty base
  Get rid of the dependency on RCS' merge program
  merge-file: support -p and -q; fix compile warnings
  Add builtin merge-file, a minimal replacement for RCS merge
  xdl_merge(): fix and simplify conflict handling
  xdl_merge(): fix thinko
  xdl_merge(): fix an off-by-one bug
  merge-recursive: use xdl_merge().
  xmerge: make return value from xdl_merge() more usable.
  xdiff: add xdl_merge()

18 years agosend-pack: tighten checks for remote names
Junio C Hamano [Wed, 13 Dec 2006 18:30:11 +0000 (10:30 -0800)] 
send-pack: tighten checks for remote names

"git push $URL HEAD~6" created a bogus ref HEAD~6 immediately
under $GIT_DIR of the remote repository.  While we should keep
refspecs that have arbitrary extended SHA-1 expression on the
source side working (e.g. "HEAD~6:refs/tags/yesterday"), we
should not create bogus ref on the other end.

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agogit-push: accept tag <tag> as advertised.
Junio C Hamano [Wed, 13 Dec 2006 18:03:39 +0000 (10:03 -0800)] 
git-push: accept tag <tag> as advertised.

The documentation talked about "git push $URL tag <tag>" as a short-hand
for refs/tags/<tag>:refs/tags/<tag> for a long time but that was never
the case (the short-hand was for "git fetch").  Instead of fixing the
documentation, just add a bit of code to match it since it is easy to do
and would make it more consistent.

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agospurious .sp in manpages
Junio C Hamano [Wed, 13 Dec 2006 08:58:28 +0000 (00:58 -0800)] 
spurious .sp in manpages

This is just a random hack to work around problems people seem
to be seeing in manpage backend of xmlto (it appears we are
getting ".sp" at the end of line without line break).

Could people test this out?

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agogit merge: reword failure message.
Junio C Hamano [Wed, 13 Dec 2006 17:32:40 +0000 (09:32 -0800)] 
git merge: reword failure message.

99.9999% of the time, the command is used with a single
strategy; after a merge failure, saying "No strategy handled the
merge" is technically correct, but there is no point stressing
we tried and failed all the possibilities the user has given.

Just say that it failed.

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoRemove uncontested renamed files during merge.
Shawn Pearce [Wed, 13 Dec 2006 10:42:44 +0000 (05:42 -0500)] 
Remove uncontested renamed files during merge.

Prior to 65ac6e9c3f47807cb603af07a6a9e1a43bc119ae we deleted a file
from the working directory during a merge if the file existed before
the merge started but was renamed by the branch being merged in.
This broke in 65ac6e as git-merge-recursive did not actually update
the working directory on an uncontested rename.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoMerge branch 'maint'
Junio C Hamano [Wed, 13 Dec 2006 10:00:39 +0000 (02:00 -0800)] 
Merge branch 'maint'

* maint:
  git-svn: correctly display fatal() error messages
  git-svn: exit with status 1 for test failures

Conflicts:

git-svn.perl

nothing to commit

18 years agogit-svn: correctly display fatal() error messages
Eric Wong [Tue, 12 Dec 2006 22:47:02 +0000 (14:47 -0800)] 
git-svn: correctly display fatal() error messages

If I wanted to print $@, I'd pass $@ to fatal().  This looks like
a stupid typo on my part.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agogit-svn: exit with status 1 for test failures
Eric Wong [Sat, 25 Nov 2006 06:38:18 +0000 (22:38 -0800)] 
git-svn: exit with status 1 for test failures

Some versions of the SVN libraries cause die() to exit with 255,
and 40cf043389ef4cdf3e56e7c4268d6f302e387fa0 tightened up
test_expect_failure to reject return values >128.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoAllow subcommand.color and color.subcommand color configuration
Andy Parkins [Wed, 13 Dec 2006 09:13:28 +0000 (09:13 +0000)] 
Allow subcommand.color and color.subcommand color configuration

While adding colour to the branch command it was pointed out that a
config option like "branch.color" conflicts with the pre-existing
"branch.something" namespace used for specifying default merge urls and
branches.  The suggested solution was to flip the order of the
components to "color.branch", which I did for colourising branch.

This patch does the same thing for
  - git-log (color.diff)
  - git-status (color.status)
  - git-diff (color.diff)
  - pager (color.pager)

I haven't removed the old config options; but they should probably be
deprecated and eventually removed to prevent future namespace
collisions.  I've done this deprecation by changing the documentation
for the config file to match the new names; and adding the "color.XXX"
options to contrib/completion/git-completion.bash.

Unfortunately git-svn reads "diff.color" and "pager.color"; which I
don't like to change unilaterally.

Signed-off-by: Andy Parkins <andyparkins@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agogit-push: document removal of remote ref with :<dst> pathspec
Junio C Hamano [Wed, 13 Dec 2006 08:59:58 +0000 (00:59 -0800)] 
git-push: document removal of remote ref with :<dst> pathspec

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agomerge-recursive: add/add really is modify/modify with an empty base
Johannes Schindelin [Wed, 13 Dec 2006 03:05:39 +0000 (04:05 +0100)] 
merge-recursive: add/add really is modify/modify with an empty base

Unify the handling for cases C (add/add) and D (modify/modify).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoMerge branch 'master' into js/merge
Junio C Hamano [Wed, 13 Dec 2006 05:52:19 +0000 (21:52 -0800)] 
Merge branch 'master' into js/merge

* master: (42 commits)
  git-svn: correctly handle packed-refs in refs/remotes/
  add test case for recursive merge
  git-svn: correctly display fatal() error messages
  git-svn: allow dcommit to take an alternate head
  git-svn: enable logging of information not supported by git
  Clarify fetch error for missing objects.
  Move Fink and Ports check to after config file
  shortlog: fix segfault on empty authorname
  shortlog: remove "[PATCH]" prefix from shortlog output
  Make sure the empty tree exists when needed in merge-recursive.
  Don't use memcpy when source and dest. buffers may overlap
  no need to install manpages as executable
  Documentation: simpler shared repository creation
  shortlog: fix segfault on empty authorname
  Add branch.*.merge warning and documentation update
  Fix perl/ build.
  git-svn: use do_switch for --follow-parent if the SVN library supports it
  Fix documentation copy&paste typo
  git-svn: extra error check to ensure we open a file correctly
  Documentation: update git-clone man page with new behavior
  ...

18 years agoGet rid of the dependency on RCS' merge program
Johannes Schindelin [Tue, 12 Dec 2006 23:01:41 +0000 (00:01 +0100)] 
Get rid of the dependency on RCS' merge program

Now that we have git-merge-file, an RCS merge lookalike, we no longer
need it. So long, merge, and thanks for all the fish!

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agogit-svn: correctly handle packed-refs in refs/remotes/
Eric Wong [Wed, 13 Dec 2006 00:45:00 +0000 (16:45 -0800)] 
git-svn: correctly handle packed-refs in refs/remotes/

We now use git-rev-parse universally to read refs, instead
of our own file_to_s function (which I plan on removing).

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoMerge branch 'maint'
Junio C Hamano [Wed, 13 Dec 2006 01:07:33 +0000 (17:07 -0800)] 
Merge branch 'maint'

* maint:
  Clarify fetch error for missing objects.
  Move Fink and Ports check to after config file

Conflicts:

Makefile

18 years agoadd test case for recursive merge
Junio C Hamano [Wed, 13 Dec 2006 00:36:16 +0000 (16:36 -0800)] 
add test case for recursive merge

This test case is based on the bug report by Shawn Pearce.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agogit-svn: correctly display fatal() error messages
Eric Wong [Tue, 12 Dec 2006 22:47:02 +0000 (14:47 -0800)] 
git-svn: correctly display fatal() error messages

If I wanted to print $@, I'd pass $@ to fatal().  This looks like
a stupid typo on my part.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agogit-svn: allow dcommit to take an alternate head
Eric Wong [Tue, 12 Dec 2006 22:47:01 +0000 (14:47 -0800)] 
git-svn: allow dcommit to take an alternate head

Previously dcommit would unconditionally commit all patches
up-to and including the current HEAD.  Now if an optional
command-line argument is specified, it will only commit
up to the specified revision.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agogit-svn: enable logging of information not supported by git
Eric Wong [Tue, 12 Dec 2006 22:47:00 +0000 (14:47 -0800)] 
git-svn: enable logging of information not supported by git

The changes are now tracked in
  $GIT_DIR/svn/$GIT_SVN_ID/untracked.log

Information in the untracked.log include:
  * the addition and removal of empty directories
    (changes of these will also warn the user)
  * file and directory property changes, including (but not
    limited to) svk:merge and svn:externals
  * revision properties (revprops) are also tracked
  * users will be warned of 'absent' file and directories
    (if users are forbidden access)

Fields in entries are separated by spaces; "unsafe" characters
are URI-encoded so that each entry takes exactly one line.

There is currently no automated parser for dealing with the data
in untracked.log, but it should be possible to write one to
create empty directories on checkout and manage
externals/subprojects.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoClarify fetch error for missing objects.
Alex Riesen [Tue, 12 Dec 2006 17:34:02 +0000 (18:34 +0100)] 
Clarify fetch error for missing objects.

Otherwise there're such things like:

    Cannot obtain needed none 9a6e87b60dbd2305c95cecce7d9d60f849a0658d
    while processing commit 0000000000000000000000000000000000000000.

which while looks weird. What is the none needed for?

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoMove Fink and Ports check to after config file
Brian Gernhardt [Tue, 12 Dec 2006 17:01:47 +0000 (12:01 -0500)] 
Move Fink and Ports check to after config file

Putting NO_FINK or NO_DARWIN_PORTS in config.mak is ignored because the
checks are done before the config is included.

Signed-off-by: Brian Gernhardt <benji@silverinsanity.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoColourise git-branch output
Andy Parkins [Tue, 12 Dec 2006 06:41:52 +0000 (06:41 +0000)] 
Colourise git-branch output

I wanted to have a visual indication of which branches are local and
which are remote in git-branch -a output; however Junio was concerned
that someone might be using the output in a script.  This patch
addresses the problem by colouring the git-branch output - which in
"auto" mode won't be activated.

I've based it off the colouring code for builtin-diff.c; which means
there is a branch color configuration variable that needs setting to
something before the color will appear.

The colour parameter is "color.branch" rather than "branch.color" to
avoid clashing with the default namespace for default branch merge
definitions.

This patch chooses green for local, red for remote and bold green for
current.

Signed-off-by: Andy Parkins <andyparkins@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agodiff --numstat: show binary with '-' to match "apply --numstat"
Junio C Hamano [Sun, 10 Dec 2006 21:50:59 +0000 (13:50 -0800)] 
diff --numstat: show binary with '-' to match "apply --numstat"

This changes the --numstat output for binary files from "0 0" to
"- -" to match what "apply --numstat" does.

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoMake cvsexportcommit work with filenames with spaces and non-ascii characters.
Robin Rosenberg [Sun, 10 Dec 2006 23:30:06 +0000 (00:30 +0100)] 
Make cvsexportcommit work with filenames with spaces and non-ascii characters.

This patch uses git-apply to do the patching which simplifies the code a lot
and also uses one pass to git-diff. git-apply gives information on added,
removed files as well as which files are binary.

Removed the test for checking for matching binary files when deleting them
since git-apply happily deletes the file. This is matter of taste since we
allow some fuzz for text patches also.

Error handling was cleaned up, but not much tested.

Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoshortlog: fix segfault on empty authorname
Junio C Hamano [Sun, 10 Dec 2006 23:51:54 +0000 (15:51 -0800)] 
shortlog: fix segfault on empty authorname

The old code looked backwards from the email address to parse
the name, allowing an arbitrary number of spaces between the
two. However, in the case of no name, we looked back too far to
the 'author' (or 'Author:') header.

The bug was triggered by commit febf7ea4bed from linux-2.6.

Jeff King originally fixed it by looking back only one
character; Johannes Schindelin pointed out that we could try
harder while at it to cope with commits with broken headers.

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoshortlog: remove "[PATCH]" prefix from shortlog output
Junio C Hamano [Sun, 10 Dec 2006 23:55:07 +0000 (15:55 -0800)] 
shortlog: remove "[PATCH]" prefix from shortlog output

Originally noticed by Nicolas Pitre; the real cause was the code
was prepared to deal with [PATCH] (and [PATCH n/m whatever])
prefixes but forgot that the string can be indented while acting
as a filter.

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoMerge branch 'maint'
Junio C Hamano [Mon, 11 Dec 2006 22:12:12 +0000 (14:12 -0800)] 
Merge branch 'maint'

* maint:
  Make sure the empty tree exists when needed in merge-recursive.
  Don't use memcpy when source and dest. buffers may overlap
  no need to install manpages as executable

18 years agoMake sure the empty tree exists when needed in merge-recursive.
Shawn O. Pearce [Thu, 7 Dec 2006 10:17:07 +0000 (05:17 -0500)] 
Make sure the empty tree exists when needed in merge-recursive.

There are some baseless merge cases where git-merge-recursive will
try to compare one of the branches against the empty tree.  However
most projects won't have the empty tree object in their object database
as Git does not normally create empty tree objects.  If the empty tree
object is missing then the merge process will die, as it cannot load the
object from the database.  The error message may make the user think that
their database is corrupt when its actually not.

So instead we should just create the empty tree object whenever it is
needed.  If the object already exists as a loose object then no harm
done.  Otherwise that loose object will be pruned away later by either
git-prune or git-prune-packed.

Thanks goes to Junio for suggesting this fix.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoDon't use memcpy when source and dest. buffers may overlap
Jim Meyering [Mon, 11 Dec 2006 18:06:34 +0000 (19:06 +0100)] 
Don't use memcpy when source and dest. buffers may overlap

git-index-pack can call memcpy with overlapping source and destination
buffers.  The patch below makes it use memmove instead.

If you want to demonstrate a failure, add the following two lines

+               if (input_offset < input_len)
+                 abort ();

before the existing memcpy call (shown in the patch below),
and then run this:

  (cd t; sh ./t5500-fetch-pack.sh)

Signed-off-by: Jim Meyering <jim@meyering.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agono need to install manpages as executable
Chris Wright [Mon, 11 Dec 2006 07:39:32 +0000 (23:39 -0800)] 
no need to install manpages as executable

No need to install manpages as executable.  Noticed by Ville Skytt\e,Ad\e(B.

Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agogit-commit: allow --only to lose what was staged earlier.
Junio C Hamano [Sun, 10 Dec 2006 06:32:43 +0000 (22:32 -0800)] 
git-commit: allow --only to lose what was staged earlier.

The command used to have a safety valve to prevent this sequence:

edit foo
git update-index foo
edit foo
git diff foo
git commit --only foo

The reason for this was because an inexperienced user might
mistakenly think what is shown with the last-minute diff
contains all the change that is being committed (instead, what
the user asked to check was an incremental diff since what has
been staged so far).  However, this turns out to only annoy
people who know what they are doing.  Inexperienced people
would not be using the first "update-index" anyway, in which
case they would see the full changes in the "git diff".

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoDocumentation/git-commit: rewrite to make it more end-user friendly.
Junio C Hamano [Sat, 9 Dec 2006 05:48:07 +0000 (21:48 -0800)] 
Documentation/git-commit: rewrite to make it more end-user friendly.

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agorerere: record (or avoid misrecording) resolved, skipped or aborted rebase/am
Eric Wong [Fri, 8 Dec 2006 21:29:56 +0000 (13:29 -0800)] 
rerere: record (or avoid misrecording) resolved, skipped or aborted rebase/am

Data in rr-cache isn't valid after a patch application is
skipped or and aborted, so our next commit could be misrecorded
as a resolution of that skipped/failed commit, which is wrong.

git-am --skip, git-rebase --skip/--abort will automatically
invoke git-rerere clear to avoid this.

Also, since git-am --resolved indicates a resolution was
succesful, remember to run git-rerere to record the resolution
(and not surprise the user when the next commit is made).

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agogit-rerere: add 'gc' command.
Junio C Hamano [Fri, 8 Dec 2006 21:03:12 +0000 (13:03 -0800)] 
git-rerere: add 'gc' command.

Over time, unresolved rr-cache entries are accumulated and they
tend to get less and less likely to be useful as the tips of
branches advance.

Reorder documentation page to show the subcommand section earlier
than the discussion section.

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agorerere: add clear, diff, and status commands
Eric Wong [Fri, 8 Dec 2006 21:29:55 +0000 (13:29 -0800)] 
rerere: add clear, diff, and status commands

git-am and git-rebase will be updated to use 'clear', and
diff/status can be used to aid the user in tracking progress in
the resolution process.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoDocumentation: simpler shared repository creation
J. Bruce Fields [Sat, 9 Dec 2006 03:58:50 +0000 (22:58 -0500)] 
Documentation: simpler shared repository creation

Take Johannes Schindelin's suggestions for a further simplification of
the shared repository creation using git --bare init-db --shared, and
for a simplified cvsimport using an existing CVS working directory.

Also insert more man page references.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
 cvs-migration.txt |   27 ++++++++++++++-------------
 1 file changed, 14 insertions(+), 13 deletions(-)
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoshortlog: fix segfault on empty authorname
Jeff King [Sat, 9 Dec 2006 04:04:21 +0000 (23:04 -0500)] 
shortlog: fix segfault on empty authorname

The old code looked backwards from the email address to parse the name,
allowing an arbitrary number of spaces between the two. However, in the case
of no name, we looked back too far to the 'author' (or 'Author:') header.
Instead, remove at most one space between name and address.

The bug was triggered by commit febf7ea4bed from linux-2.6.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoAdd branch.*.merge warning and documentation update
Josef Weidendorfer [Sat, 9 Dec 2006 01:28:26 +0000 (02:28 +0100)] 
Add branch.*.merge warning and documentation update

This patch clarifies the meaning of the branch.*.merge option.
Previously, if branch.*.merge was specified but did not match any
ref, the message "No changes." was not really helpful regarding
the misconfiguration. This patch adds a warning for this.

Signed-off-by: Josef Weidendorfer <Josef.Weidendorfer@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoFix perl/ build.
Junio C Hamano [Fri, 8 Dec 2006 22:07:45 +0000 (14:07 -0800)] 
Fix perl/ build.

An earlier commit f848718a broke the build in perl/ directory by
allowing the Makefile.PL to overwrite the now-tracked Makefile.
Fix this by forcing Makefile.PL to produce its output in
perl.mak as the broken commit originally intended.

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agogit-svn: use do_switch for --follow-parent if the SVN library supports it
Eric Wong [Fri, 8 Dec 2006 10:20:17 +0000 (02:20 -0800)] 
git-svn: use do_switch for --follow-parent if the SVN library supports it

do_switch works with the SVN Perl bindings after r22312 in the
Subversion trunk.  Since no released version of SVN currently
supports it; we'll just autodetect it and enable its usage
when a user has a recent-enough version of SVN.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoFix documentation copy&paste typo
Uwe Zeisberger [Fri, 8 Dec 2006 11:44:31 +0000 (12:44 +0100)] 
Fix documentation copy&paste typo

This was introduced in 45a3b12cfd3eaa05bbb0954790d5be5b8240a7b5

Signed-off-by: Uwe Kleine-K\e,AC6\e(Bnig <zeisberg@informatik.uni-freiburg.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agogit-svn: extra error check to ensure we open a file correctly
Eric Wong [Fri, 8 Dec 2006 09:55:19 +0000 (01:55 -0800)] 
git-svn: extra error check to ensure we open a file correctly

This may be an issue with repositories imported with commit
27a1a8014b842c0d70fdc91c68dd361ca2dfb34c or later, but before
commit dad73c0bb9f33323ec1aacf560a6263f1d85f81a.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoDocumentation: update git-clone man page with new behavior
J. Bruce Fields [Fri, 8 Dec 2006 06:27:21 +0000 (01:27 -0500)] 
Documentation: update git-clone man page with new behavior

Update git-clone man page to reflect recent changes
(--use-separate-remote default and use of .git/config instead of
remotes files), and rewrite introduction.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoMerge branch 'maint'
Junio C Hamano [Thu, 7 Dec 2006 05:53:32 +0000 (21:53 -0800)] 
Merge branch 'maint'

* maint:
  cvsserver: Avoid miscounting bytes in Perl v5.8.x

18 years agocvsserver: Avoid miscounting bytes in Perl v5.8.x
Martin Langhoff [Thu, 7 Dec 2006 03:38:50 +0000 (16:38 +1300)] 
cvsserver: Avoid miscounting bytes in Perl v5.8.x

At some point between v5.6 and 5.8 Perl started to assume its input,
output and filehandles are UTF-8. This breaks the counting of bytes
for the CVS protocol, resulting in the client expecting less data
than we actually send, and storing truncated files.

Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agochange the unpack limit treshold to a saner value
Nicolas Pitre [Thu, 7 Dec 2006 04:01:00 +0000 (23:01 -0500)] 
change the unpack limit treshold to a saner value

Currently the treshold is 5000.  The likelihood of this value to ever be
crossed for a single push is really small making it not really useful.

The optimal treshold for a pure space saving on a filesystem with 4kb
blocks is 3.  However this is likely to create many small packs
concentrating a large number of files in a single directory compared to
the same objects which are spread over 256 directories when loose.  This
means we would need 512 objects per pack on average to approximagte the
same directory cost (a pack has 2 files because of the index).

But 512 is a really high value just like 5000 since most pushes are
unlikely to have that many objects.  So let's try with a value of 100
which should have a good balance between small pushes going to be
exploded into loose objects and large pushes kept as whole packs.

This is not a replacement for periodic repacks of course.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoDocumentation: reorganize cvs-migration.txt
J. Bruce Fields [Thu, 7 Dec 2006 04:18:05 +0000 (23:18 -0500)] 
Documentation: reorganize cvs-migration.txt

Modify cvs-migration.txt so it explains first how to develop against a
shared repository, then how to set up a shared repository, then how to
import a repository from cvs.  Though this seems chronologically
backwards, it's still readable in this order, and it puts the more
commonly needed material closer to the front.

Remove the annotate/pickaxe section; perhaps it can find a place elsewhere
in the future.  Remove most of the "why git is better than cvs" stuff from
the introduction.

Add some minor clarifications, including two that have come up several
times on the mailing list:

1. Recommend committing any changes before running pull.
2. Note that changes must be commited before they can be pushed.

Update the clone discussion to reflect the new --use-separate-remotes
default, and add a brief mention of git-cvsserver.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoExplicitly add the default "git pull" behaviour to .git/config on clone
Andy Parkins [Wed, 6 Dec 2006 12:07:23 +0000 (12:07 +0000)] 
Explicitly add the default "git pull" behaviour to .git/config on clone

Without any specification in the .git/config file, git-pull will execute
"git-pull origin"; which in turn defaults to pull from the first "pull"
definition for the remote, "origin".

This is a difficult set of defaults to track for a new user, and it's
difficult to see what tells git to do this (especially when it is
actually hard-coded behaviour).  To ameliorate this slightly, this patch
explicitly specifies the default behaviour during a clone using the
"branch" section of the config.

For example, a clone of a typical repository would create a .git/config
containing:
  [remote "origin"]
  url = proto://host/repo.git
  fetch = refs/heads/master:refs/remotes/origin/master
  [branch "master"]
  remote = origin
  merge = refs/heads/master

The [branch "master"] section is such that there is no change to the
functionality of git-pull, but that functionality is now explicitly
documented.

Signed-off-by: Andy Parkins <andyparkins@gmail.com>
18 years agogit-merge: fix "fix confusion between tag and branch" for real
Junio C Hamano [Wed, 6 Dec 2006 19:22:55 +0000 (11:22 -0800)] 
git-merge: fix "fix confusion between tag and branch" for real

An earlier commit 3683dc5a broke the merge message generation with
a careless use of && where it was not needed, breaking the merge
message for cases where non branches are given.

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agogit-svn: avoid network timeouts for long-running fetches
Eric Wong [Mon, 4 Dec 2006 08:51:16 +0000 (00:51 -0800)] 
git-svn: avoid network timeouts for long-running fetches

Long-running fetches run inside children to avoid memory leaks.
When we refork, the connection in the parent can be idle for a
long time; attempting to reuse it in the next child can result
in timeouts.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agogitweb: Allow PNG, GIF, JPEG images to be displayed in "blob" view
Jakub Narebski [Mon, 4 Dec 2006 22:47:22 +0000 (23:47 +0100)] 
gitweb: Allow PNG, GIF, JPEG images to be displayed in "blob" view

Allow images in one of web formats (PNG, GIF, JPEG) - actually files
with mimetype of image/png, image/git, image/jpeg - to be displayed in
"blob" view using <img /> element, instead of using "blob_plain" view
for them, like for all other files except also text/* mimetype files.

This makes possible to easily go to file history, to HEAD version of
the file, to appropriate commit etc; all of those are not available
in "blob_plain" (raw) view.

Only text files can have "blame" view link in the formats part of
navbar.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agogit-merge: squelch needless error message.
Junio C Hamano [Wed, 6 Dec 2006 18:52:04 +0000 (10:52 -0800)] 
git-merge: squelch needless error message.

While deciding if the new style command line argument is a tag
or a branch, we checked it with "git show-ref -s --verify" to
see if results in an error, but when it is not a branch, the
check leaked the error message out, which was not needed to be
shown to the end user.

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoMerge
Junio C Hamano [Wed, 6 Dec 2006 18:48:08 +0000 (10:48 -0800)] 
Merge

18 years agoMerge branch 'maint'
Junio C Hamano [Wed, 6 Dec 2006 18:47:37 +0000 (10:47 -0800)] 
Merge branch 'maint'

* maint:
  git-reset to remove "$GIT_DIR/MERGE_MSG"
  unpack-trees: make sure "df_conflict_entry.name" is NUL terminated.

18 years agogit-reset to remove "$GIT_DIR/MERGE_MSG" v1.4.4.2
Junio C Hamano [Tue, 5 Dec 2006 03:44:40 +0000 (19:44 -0800)] 
git-reset to remove "$GIT_DIR/MERGE_MSG"

An earlier commit a9cb3c6e changed git-commit to use the
contents of MERGE_MSG even when we do not have MERGE_HEAD (the
rationale is in its log message).

However, the change tricks the following sequence to include a
merge message in a completely unrelated commit:

$ git pull somewhere
: oops, the conflicts are too much.  forget it.
        $ git reset --hard
        : work work work
        $ git commit

To fix this confusion, this patch makes "git reset" to remove
the leftover MERGE_MSG that was prepared when the user abandoned
the merge.

Signed-off-by: Junio C Hamano <junkio@cox.net>
Acked-by: Luben Tuikov <ltuikov@yahoo.com
18 years agomerge-file: support -p and -q; fix compile warnings
Johannes Schindelin [Wed, 6 Dec 2006 15:45:42 +0000 (16:45 +0100)] 
merge-file: support -p and -q; fix compile warnings

Now merge-file also understands --stdout and --quiet options. While
at it, two compile warnings were fixed.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoAdd builtin merge-file, a minimal replacement for RCS merge
Johannes Schindelin [Wed, 6 Dec 2006 15:26:06 +0000 (16:26 +0100)] 
Add builtin merge-file, a minimal replacement for RCS merge

merge-file has the same syntax as RCS merge, but supports only the
"-L" option.

For good measure, a test is added, which is quite minimal, though.

[jc: further fix for compliation errors included.]

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agocvs-migration: improved section titles, better push/commit explanation
J. Bruce Fields [Wed, 6 Dec 2006 17:19:50 +0000 (12:19 -0500)] 
cvs-migration: improved section titles, better push/commit explanation

Rename the section titles to make the "how-to" content of the section
obvious.  Also clarify that changes have to be commited before they can
be pushed.

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agocvs-migration document: make the need for "push" more obvious
Johannes Schindelin [Wed, 6 Dec 2006 12:27:40 +0000 (13:27 +0100)] 
cvs-migration document: make the need for "push" more obvious

It really is an important concept to grasp for people coming
from CVS. Even if it is briefly mentioned, it is not obvious
enough to sink in.

[jc: with wording updates from J. Bruce Fields]

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agogit-branch: let caller specify logmsg
Lars Hjemli [Thu, 30 Nov 2006 02:16:56 +0000 (03:16 +0100)] 
git-branch: let caller specify logmsg

This changes the signature of rename_ref() in refs.[hc] to include a
logmessage for the reflogs.

Also, builtin-branch.c is modified to provide a proper logmessage + call
setup_ident() before any logmessages are written.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agorename_ref: use lstat(2) when testing for symlink
Lars Hjemli [Wed, 29 Nov 2006 20:44:56 +0000 (21:44 +0100)] 
rename_ref: use lstat(2) when testing for symlink

The current check for symlinked reflogs was based on stat(2), which is
utterly embarrassing.

Fix it, and add a matching testcase.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agogit-branch: add options and tests for branch renaming
Lars Hjemli [Tue, 28 Nov 2006 14:47:40 +0000 (15:47 +0100)] 
git-branch: add options and tests for branch renaming

Extend git-branch with the following options:

  git-branch -m|-M [<oldbranch>] newbranch

The -M variation is required to force renaming over an exsisting
branchname.

This also indroduces $GIT_DIR/RENAME_REF which is a "metabranch"
used when renaming branches. It will always hold the original sha1
for the latest renamed branch.

Additionally, if $GIT_DIR/logs/RENAME_REF exists, all branch rename
events are logged there.

Finally, some testcases are added to verify the new options.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoxdl_merge(): fix and simplify conflict handling
Johannes Schindelin [Tue, 5 Dec 2006 21:15:35 +0000 (22:15 +0100)] 
xdl_merge(): fix and simplify conflict handling

Suppose you have changes in new1 to the original lines 10-20,
and changes in new2 to the original lines 15-25, then the
changes to 10-25 conflict. But it is possible that the next
changes in new1 still overlap with this change to new2.

So, in the next iteration we have to look at the same change
to new2 again.

The old code tried to be a bit too clever. The new code is
shorter and more to the point: do not fiddle with the ranges
at all.

Also, xdl_append_merge() tries harder to combine conflicts.
This is necessary, because with the above simplification,
some conflicts would not be recognized as conflicts otherwise:

In the above scenario, it is possible that there is no other
change to new1. Absent the combine logic, the change in new2
would be recorded _again_, but as a non-conflict.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
18 years agomake 'git add' a first class user friendly interface to the index
Nicolas Pitre [Mon, 4 Dec 2006 16:13:39 +0000 (11:13 -0500)] 
make 'git add' a first class user friendly interface to the index

This brings the power of the index up front using a proper mental model
without talking about the index at all. See for example how all the
technical discussion has been evacuated from the git-add man page.

   Any content to be committed must be added together.  Whether that
   content comes from new files or modified files doesn't matter.  You
   just need to "add" it, either with git-add, or by providing
   git-commit with -a (for already known files only of course).

No need for a separate command to distinguish new vs modified files
please. That would only screw the mental model everybody should have
when using GIT.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoDocument git-diff whitespace flags -b and -w
Jakub Narebski [Sun, 3 Dec 2006 16:24:41 +0000 (17:24 +0100)] 
Document git-diff whitespace flags -b and -w

Document git diff options -b / --ignore-space-change and
-w / --ignore-all-space, introduced by Johannes Schindelin
in commit 0d21efa5, "Teach diff about -b and -w flags".

The description of options is taken from GNU diff man page and
GNU Diffutils info documentation.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agodiff -b: ignore whitespace at end of line
Johannes Schindelin [Sun, 3 Dec 2006 18:25:34 +0000 (19:25 +0100)] 
diff -b: ignore whitespace at end of line

This is _not_ the same as "treat eol as whitespace", since that would mean
that multiple empty lines would be treated as equal to e.g. a space.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoMerge branch 'maint'
Junio C Hamano [Tue, 5 Dec 2006 00:30:00 +0000 (16:30 -0800)] 
Merge branch 'maint'

* maint:
  receive-pack: do not insist on fast-forward outside refs/heads/
  git-mv: search more precisely for source directory in index

Conflicts:

receive-pack.c

18 years agounpack-trees: make sure "df_conflict_entry.name" is NUL terminated.
Junio C Hamano [Mon, 4 Dec 2006 10:11:39 +0000 (02:11 -0800)] 
unpack-trees: make sure "df_conflict_entry.name" is NUL terminated.

The structure that ends with a flexible array member (or 0
length array with older GCC) "char name[FLEX_ARRAY]" is
allocated on the stack and we use it after clearing its entire
size with memset.  That does not guarantee that "name" is
properly NUL terminated as we intended on platforms with more
forgiving structure alignment requirements.

Reported breakage on m68k by Roman Zippel.

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoreceive-pack: do not insist on fast-forward outside refs/heads/
Junio C Hamano [Mon, 4 Dec 2006 22:24:12 +0000 (14:24 -0800)] 
receive-pack: do not insist on fast-forward outside refs/heads/

Especially refs/tags/ hierarchy should match what git-fetch
checks.

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agogit-fetch: ignore dereferenced tags in expand_refs_wildcard
Michael Loeffler [Mon, 4 Dec 2006 19:34:34 +0000 (20:34 +0100)] 
git-fetch: ignore dereferenced tags in expand_refs_wildcard

There was a little bug in the brace expansion which should remove
the ^{} from the tagname. It used ${name#'^{}'} instead of $(name%'^{}'},
the difference is that '#' will remove the given pattern only from the
beginning of a string and '%' only from the end of a string.

Signed-off-by: Michael Loeffler <zvpunry@zvpunry.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agogit-clone: Rename --use-immingled-remote option to --no-separate-remote
Jakub Narebski [Mon, 4 Dec 2006 13:29:09 +0000 (14:29 +0100)] 
git-clone: Rename --use-immingled-remote option to --no-separate-remote

With making --use-separate-remote default when creating non-bare
clone, there was need for the flag which would turn off this behavior.
It was called --use-immingled-remote.

Immingle means to blend, to combine into one, to intermingle, but it
is a bit obscure word. I think it would be better to use simply
--no-separate-remote as the opposite to --use-separate-remote
option to git clone.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agogitweb: Fix Atom feed <logo>: it is $logo, not $logo_url
Jakub Narebski [Mon, 4 Dec 2006 13:09:43 +0000 (14:09 +0100)] 
gitweb: Fix Atom feed <logo>: it is $logo, not $logo_url

Fix contents of Atom feed <logo> element; it should be URL
of $logo, not URL pointed by logo link.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoMake perl/ build procedure ActiveState friendly.
Alex Riesen [Mon, 4 Dec 2006 09:50:04 +0000 (10:50 +0100)] 
Make perl/ build procedure ActiveState friendly.

On Cygwin + ActivateState Perl, Makefile generated with
MakeMaker is not usable because of line-endings and
back-slashes.

This teaches perl/Makefile to write a handcrafted equivalent
perl.mak file with 'make NO_PERL_MAKEMAKER=NoThanks'.

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoPass -M to diff in request-pull
David Miller [Mon, 4 Dec 2006 07:17:00 +0000 (23:17 -0800)] 
Pass -M to diff in request-pull

Linus recommended this, otherwise any renames cause the
diffstat output to be ridiculous in some circumstances.

Because the corresponding "git-pull" done when the requestee
actually makes pull shows the stat with rename detection
enabled, it makes sense to match what the request message
includes to that output, to make the result easier to verify.

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoSet permissions of each new file before "cvs add"ing it.
Jim Meyering [Mon, 4 Dec 2006 07:44:08 +0000 (08:44 +0100)] 
Set permissions of each new file before "cvs add"ing it.

Otherwise, an executable script in git would end up being
checked into the CVS repository without the execute bit.

[jc: with an additional test script from Robin Rosenberg.]

Signed-off-by: Jim Meyering <jim@meyering.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agogit-mv: search more precisely for source directory in index
Johannes Schindelin [Sun, 3 Dec 2006 19:42:47 +0000 (20:42 +0100)] 
git-mv: search more precisely for source directory in index

A move of a directory should find the entries in the index by
searching for the name _including_ the slash. Otherwise, the
directory can be shadowed by a file when it matches the prefix
and is lexicographically smaller, e.g. "ab.c" shadows "ab/".

Noticed by Sergey Vlasov.

[jc: added Sergey's original reproduction recipe as a test case
 at the end of t7001.]

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoxdl_merge(): fix thinko
Johannes Schindelin [Wed, 29 Nov 2006 23:25:11 +0000 (00:25 +0100)] 
xdl_merge(): fix thinko

If one side's block (of changed lines) ends later than the other
side's block, the former should be tested against the next block
of the other side, not vice versa.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoxdl_merge(): fix an off-by-one bug
Johannes Schindelin [Wed, 29 Nov 2006 23:24:32 +0000 (00:24 +0100)] 
xdl_merge(): fix an off-by-one bug

The line range is i1 .. (i1 + chg1 - 1), not i1 .. (i1 + chg1).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agomerge-recursive: use xdl_merge().
Junio C Hamano [Wed, 29 Nov 2006 20:07:37 +0000 (12:07 -0800)] 
merge-recursive: use xdl_merge().

This seem to pass the existing tests already.

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoxmerge: make return value from xdl_merge() more usable.
Junio C Hamano [Wed, 29 Nov 2006 20:06:49 +0000 (12:06 -0800)] 
xmerge: make return value from xdl_merge() more usable.

The callers would want to know if the resulting merge is clean;
do not discard that information away after calling xdl_do_merge().

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoxdiff: add xdl_merge()
Johannes Schindelin [Tue, 21 Nov 2006 22:24:34 +0000 (23:24 +0100)] 
xdiff: add xdl_merge()

This new function implements the functionality of RCS merge, but
in-memory. It returns < 0 on error, otherwise the number of conflicts.

Finding the conflicting lines can be a very expensive task. You can
control the eagerness of this algorithm:

- a level value of 0 means that all overlapping changes are treated
  as conflicts,
- a value of 1 means that if the overlapping changes are identical,
  it is not treated as a conflict.
- If you set level to 2, overlapping changes will be analyzed, so that
  almost identical changes will not result in huge conflicts. Rather,
  only the conflicting lines will be shown inside conflict markers.

With each increasing level, the algorithm gets slower, but more accurate.
Note that the code for level 2 depends on the simple definition of
mmfile_t specific to git, and therefore it will be harder to port that
to LibXDiff.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoMerge branch 'maint'
Junio C Hamano [Sun, 3 Dec 2006 01:26:58 +0000 (17:26 -0800)] 
Merge branch 'maint'

* maint:
  git-svn: avoid fetching files twice in the same revision

18 years agogit-svn: avoid fetching files twice in the same revision
Eric Wong [Sun, 3 Dec 2006 00:19:31 +0000 (16:19 -0800)] 
git-svn: avoid fetching files twice in the same revision

SVN is not entirely consistent in returning log information and
sometimes returns file information when adding subdirectories,
and sometimes it does not (only returning information about the
directory that was added).  This caused git-svn to occasionally
add a file to the list of files to be fetched twice.  Now we
change the data structure to be hash to avoid repeated fetches.

As of now (in master), this only affects repositories fetched
without deltas enabled (file://, and when manually overriden
with GIT_SVN_DELTA_FETCH=0); so this bug mainly affects users of
1.4.4.1 and maint.

Thanks to Florian Weimer for reporting this bug.

[jc: backported for maint]

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agogit-merge: fix confusion between tag and branch
Junio C Hamano [Sun, 3 Dec 2006 00:58:30 +0000 (16:58 -0800)] 
git-merge: fix confusion between tag and branch

In a repository with core.warnambiguousrefs turned off, and with
a branch and a tag that have the same name 'frotz',

git merge frotz

would merge the commit pointed at by the tag 'frotz' but
incorrectly would identify what was merged as 'branch frotz' in
the merge message.

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoDe-emphasise the symbolic link documentation.
Andy Parkins [Thu, 30 Nov 2006 10:50:28 +0000 (10:50 +0000)] 
De-emphasise the symbolic link documentation.

The fact that git has previously used symbolic links for representing
symbolic refs doesn't seem relevant to the current function of
git-symbolic-ref.  This patch makes less of a big deal about the
symbolic link history and instead focuses on what git does now.

Signed-off-by: Andy Parkins <andyparkins@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agogit-diff: Introduce --index and deprecate --cached.
Andreas Ericsson [Thu, 30 Nov 2006 11:43:13 +0000 (12:43 +0100)] 
git-diff: Introduce --index and deprecate --cached.

'git diff --cached' still works, but its use is discouraged
in the documentation. 'git diff --index' does the same thing
and is consistent with how 'git apply --index' works.

Signed-off-by: Andreas Ericsson <ae@op5.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agols-files: Give hints when errors happen.
Andreas Ericsson [Thu, 30 Nov 2006 11:28:28 +0000 (12:28 +0100)] 
ls-files: Give hints when errors happen.

Without this patch "git commit file.c file2.c" produces the not
so stellar output:

error: pathspec 'file.c' did not match any.
error: pathspec 'file2.c' did not match any.

With this patch, the output is changed to:

error: pathspec 'file.c' did not match any file(s) known to git.
error: pathspec 'file2.c' did not match any file(s) known to git.
Did you forget to 'git add'?

Signed-off-by: Andreas Ericsson <ae@op5.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agopack-objects: remove redundent status information
Nicolas Pitre [Wed, 29 Nov 2006 22:15:48 +0000 (17:15 -0500)] 
pack-objects: remove redundent status information

The final 'nr_result' and 'written' values must always be the same
otherwise we're in deep trouble.  So let's remove a redundent report.

And for paranoia sake let's make sure those two variables are actually
equal after all objects are written (one never knows).

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoMerge master.kernel.org:/pub/scm/gitk/gitk
Junio C Hamano [Wed, 29 Nov 2006 22:24:51 +0000 (14:24 -0800)] 
Merge master.kernel.org:/pub/scm/gitk/gitk

* master.kernel.org:/pub/scm/gitk/gitk:
  gitk: Fix enabling/disabling of menu items on Mac OS X

18 years agoMerge branch 'maint'
Junio C Hamano [Wed, 29 Nov 2006 20:16:55 +0000 (12:16 -0800)] 
Merge branch 'maint'

* branch 'maint':
  Document git-repo-config --bool/--int options.
  tutorial: talk about user.name early and don't start with commit -a
  git-blame: fix rev parameter handling.