Code

git.git
14 years agorebase: replace antiquated sed invocation
Stephen Boyd [Mon, 25 Jan 2010 07:06:31 +0000 (23:06 -0800)]
rebase: replace antiquated sed invocation

Use the modern form of printing a commit subject instead of piping
the output of rev-list to sed.

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoAdd test-run-command to .gitignore
Alejandro Riveira Fernández [Mon, 25 Jan 2010 15:56:21 +0000 (16:56 +0100)]
Add test-run-command to .gitignore

Add test-run-command to .gitignore so it does not pollute
git status output.

Signed-off-by: Alejandro Riveira Fernández <ariveira@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agogit_connect: use use_shell instead of explicit "sh", "-c"
Johannes Sixt [Mon, 25 Jan 2010 12:32:44 +0000 (13:32 +0100)]
git_connect: use use_shell instead of explicit "sh", "-c"

This is a followup to ac0ba18 (run-command: convert simple callsites to
use_shell, 2009-12-30), for consistency.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agogitweb.js: Workaround for IE8 bug v1.7.0-rc0
Jakub Narebski [Sun, 24 Jan 2010 18:05:23 +0000 (19:05 +0100)]
gitweb.js: Workaround for IE8 bug

In Internet Explorer 8 (IE8) the 'blame_incremental' view, which uses
JavaScript to generate blame info using AJAX, sometimes hang at the
beginning (at 0%) of blaming, e.g. for larger files with long history
like git's own gitweb/gitweb.perl.

The error shown by JavaScript console is "Unspecified error" at char:2
of the following line in gitweb/gitweb.js:

  if (xhr.readyState === 3 && xhr.status !== 200) {

Debugging it using IE8 JScript debuger shown that the error occurs
when trying to access xhr.status (xhr is XMLHttpRequest object).
Watch for xhr object shows 'Unspecified error.' as "value" of
xhr.status, and trying to access xhr.status from console throws error.

This bug is some intermittent bug, depending on XMLHttpRequest timing,
as it doesn't occur in all cases.  It is probably caused by the fact
that handleResponse is called from timer (pollTimer), to work around
the fact that some browsers call onreadystatechange handler only once
for each state change, and not like required for 'blame_incremental'
as soon as new data is available from server.  It looks like xhr
object is not properly initialized; still it is a bug to throw an
error when accessing xhr.status (and not use 'null' or 'undefined' as
value).

Work around this bug in IE8 by using try-catch block when accessing
xhr.status.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge branch 'jc/fix-tree-walk'
Junio C Hamano [Mon, 25 Jan 2010 01:35:58 +0000 (17:35 -0800)]
Merge branch 'jc/fix-tree-walk'

* jc/fix-tree-walk:
  read-tree --debug-unpack
  unpack-trees.c: look ahead in the index
  unpack-trees.c: prepare for looking ahead in the index
  Aggressive three-way merge: fix D/F case
  traverse_trees(): handle D/F conflict case sanely
  more D/F conflict tests
  tests: move convenience regexp to match object names to test-lib.sh

Conflicts:
builtin-read-tree.c
unpack-trees.c
unpack-trees.h

14 years agoMake test numbers unique
Johannes Sixt [Sun, 24 Jan 2010 21:40:20 +0000 (22:40 +0100)]
Make test numbers unique

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge branch 'maint'
Junio C Hamano [Sun, 24 Jan 2010 19:18:05 +0000 (11:18 -0800)]
Merge branch 'maint'

* maint:
  git-gui: work from the .git dir
  git-gui: Fix applying a line when all following lines are deletions
  git-gui: Correct file_states when unstaging partly staged entry
  git-gui: Fix gitk for branch whose name matches local file
  git-gui: Keep repo_config(gui.recentrepos) and .gitconfig in sync
  git-gui: handle really long error messages in updateindex.
  git-gui: Add hotkeys for "Unstage from commit" and "Revert changes"
  git-gui: Makefile: consolidate .FORCE-* targets

14 years agoMerge branch 'maint' of git://git.spearce.org/git-gui into maint
Junio C Hamano [Sun, 24 Jan 2010 19:16:26 +0000 (11:16 -0800)]
Merge branch 'maint' of git://git.spearce.org/git-gui into maint

* 'maint' of git://git.spearce.org/git-gui:
  git-gui: work from the .git dir
  git-gui: Fix applying a line when all following lines are deletions
  git-gui: Correct file_states when unstaging partly staged entry
  git-gui: Fix gitk for branch whose name matches local file
  git-gui: Keep repo_config(gui.recentrepos) and .gitconfig in sync
  git-gui: handle really long error messages in updateindex.
  git-gui: Add hotkeys for "Unstage from commit" and "Revert changes"
  git-gui: Makefile: consolidate .FORCE-* targets

14 years agoWindows: Remove dependency on pthreadGC2.dll
Michael Lukashov [Sun, 24 Jan 2010 10:10:30 +0000 (10:10 +0000)]
Windows: Remove dependency on pthreadGC2.dll

Commit 44626dc7 (MSVC: Windows-native implementation for subset
of threads API, 2010-01-15) introduces builtin replacement of
pthreadGC2.dll functionality, thus we can completely drop
dependency on this dll.

Signed-off-by: Michael Lukashov <michael.lukashov@gmail.com>
Acked-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoDocumentation: move away misplaced 'push --upstream' description
Thomas Rast [Sat, 23 Jan 2010 22:18:23 +0000 (23:18 +0100)]
Documentation: move away misplaced 'push --upstream' description

e9fcd1e (Add push --set-upstream, 2010-01-16) inadvertently patched
the description of --upstream in the middle of that of --repo.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoDocumentation: add missing :: in config.txt
Thomas Rast [Sat, 23 Jan 2010 22:13:17 +0000 (23:13 +0100)]
Documentation: add missing :: in config.txt

bed575e (commit: support commit.status, --status, and --no-status,
2009-12-07) forgot to add the :: that sets off an item from the
paragraph that explains it, breaking the layout.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge branch 'doc-style/for-next' of git://repo.or.cz/git/trast
Junio C Hamano [Sun, 24 Jan 2010 18:58:57 +0000 (10:58 -0800)]
Merge branch 'doc-style/for-next' of git://repo.or.cz/git/trast

* 'doc-style/for-next' of git://repo.or.cz/git/trast:
  Documentation: merge: use MERGE_HEAD to refer to the remote branch
  Documentation: simplify How Merge Works
  Documentation: merge: add a section about fast-forward
  Documentation: emphasize when git merge terminates early
  Documentation: merge: add an overview
  Documentation: merge: move merge strategy list to end
  Documentation: suggest `reset --merge` in How Merge Works section
  Documentation: merge: move configuration section to end
  Documentation: emphasise 'git shortlog' in its synopsis
  Documentation: show-files is now called git-ls-files
  Documentation: tiny git config manual tweaks
  Documentation: git gc packs refs by default now

Conflicts:
Documentation/config.txt

14 years agopull: re-fix command line generation
Junio C Hamano [Sun, 24 Jan 2010 18:11:27 +0000 (10:11 -0800)]
pull: re-fix command line generation

14e5d40 (pull: Fix parsing of -X<option>, 2010-01-17) forgot that
merge_name needs to stay as a single non-interpolated string.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoDocumentation: merge: use MERGE_HEAD to refer to the remote branch
Jonathan Nieder [Sat, 23 Jan 2010 22:48:40 +0000 (16:48 -0600)]
Documentation: merge: use MERGE_HEAD to refer to the remote branch

commit 57bddb11 (Documentation/git-merge: reword references to
"remote" and "pull", 2010-01-07) fixed the manual to drop the
assumption that the other branch being merged is from a remote
repository.  Unfortunately, in a few places, to do so it
introduced the antecedentless phrase "their versions".  Worse, in
passages like the following, 'they' is playing two roles.

|   highlighting changes from both the HEAD and their versions.
|
| * Look at the diffs on their own. 'git log --merge -p <path>'

Using HEAD and MERGE_HEAD nicely assigns terminology to "our" and
"their" sides.  It also provides the reader with practice using
names that git will recognize on the command line.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
14 years agoDocumentation: simplify How Merge Works
Jonathan Nieder [Sat, 23 Jan 2010 09:48:42 +0000 (03:48 -0600)]
Documentation: simplify How Merge Works

The user most likely does not care about the exact order of
operations because he cannot see it happening anyway.  Instead,
try to explain what it means to merge two commits into a single
tree.

While at it:

 - Change the heading to TRUE MERGE.  The entire manual page is
   about how merges work.

 - Document MERGE_HEAD.  It is a useful feature, since it makes
   the parents of the intended merge commit easier to refer to.

 - Do not assume commits named on the 'git merge' command line come
   from another repository.  For simplicity, the discussion of
   conflicts still does assume that there is only one and it is a
   branch head.

 - Do not start list items with `code`.  Otherwise, a toolchain bug
   produces a line break in the generated nroff, resulting in odd
   extra space.

Suggested-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
14 years agoDocumentation: merge: add a section about fast-forward
Jonathan Nieder [Sat, 23 Jan 2010 09:45:33 +0000 (03:45 -0600)]
Documentation: merge: add a section about fast-forward

Novices sometimes find the behavior of 'git merge' in the
fast-forward case surprising.  Describe it thoroughly.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
14 years agoDocumentation: emphasize when git merge terminates early
Jonathan Nieder [Sat, 23 Jan 2010 09:44:17 +0000 (03:44 -0600)]
Documentation: emphasize when git merge terminates early

A merge-based operation in git can fail in two ways: one that
stops before touching anything, or one that goes ahead and
results in conflicts.

As the 'git merge' manual explains:

| A merge is always between the current `HEAD` and one or more
| commits (usually, branch head or tag), and the index file must
| match the tree of `HEAD` commit (i.e. the contents of the last commit)
| when it starts out.

Unfortunately, the placement of this sentence makes it easy to
skip over, and its formulation leaves the important point, that
any other attempted merge will be gracefully aborted, unspoken.

So give this point its own section and expand upon it.

Probably this could be simplified somewhat: after all, a change
registered in the index is just a special kind of local
uncommited change, so the second added paragraph is only a
special case of the first.  It seemed more helpful to be explicit
here.

Inspired by <http://gitster.livejournal.com/25801.html>.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
14 years agoDocumentation: merge: add an overview
Jonathan Nieder [Sat, 23 Jan 2010 09:42:46 +0000 (03:42 -0600)]
Documentation: merge: add an overview

The reader unfamiliar with the concepts of branching and merging
would have been completely lost.  Try to help him with a diagram.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
14 years agoDocumentation: merge: move merge strategy list to end
Jonathan Nieder [Sat, 23 Jan 2010 09:33:37 +0000 (03:33 -0600)]
Documentation: merge: move merge strategy list to end

So the section layout changes as follows:

 NAME
 SYNOPSIS
 DESCRIPTION
 OPTIONS
-MERGE STRATEGIES
 HOW MERGE WORKS
 HOW CONFLICTS ARE PRESENTED
 HOW TO RESOLVE CONFLICTS
 EXAMPLES
+MERGE STRATEGIES
 CONFIGURATION
 SEE ALSO
 AUTHOR
 DOCUMENTATION
 GIT
 NOTES

The first-time user will care more about conflicts than about
strategies other than 'recursive'.

One of the examples uses -s ours, but I do not think this hinders
readability.

Suggested-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
14 years agoDocumentation: suggest `reset --merge` in How Merge Works section
Jonathan Nieder [Sat, 23 Jan 2010 09:31:19 +0000 (03:31 -0600)]
Documentation: suggest `reset --merge` in How Merge Works section

The 'merge' manual suggests 'reset' to cancel a merge at the end
of the Merge Strategies list.  It is more logical to explain this
right before explaining how merge conflicts work, so the daunted
reader can have a way out when he or she needs it most.

While at it, make the advice more dependable and self-contained
by providing the --merge option.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
14 years agoDocumentation: merge: move configuration section to end
Jonathan Nieder [Sat, 23 Jan 2010 09:26:57 +0000 (03:26 -0600)]
Documentation: merge: move configuration section to end

Configuration and environment variables belong to the back matter
of a manual page.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
14 years agorebase -i: Export GIT_AUTHOR_* variables explicitly
Junio C Hamano [Fri, 22 Jan 2010 21:09:24 +0000 (13:09 -0800)]
rebase -i: Export GIT_AUTHOR_* variables explicitly

There is no point doing self-assignments of these variables.  Instead,
just export them to the environment, but do so in a sub-shell, because

VAR1=VAL1 VAR2=VAL2 ... command arg1 arg2...

does not mark the variables exported if command that is run
is a shell function, according to POSIX.1.

The callers of do_with_author do not rely on seeing the effect of any
shell variable assignments that may happen inside what was called through
this shell function (currently "output" is the only one), so running it in
the subshell doesn't have an adverse semantic effect.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agogit-gui: work from the .git dir
Giuseppe Bilotta [Sat, 23 Jan 2010 10:03:36 +0000 (11:03 +0100)]
git-gui: work from the .git dir

When git-gui is run from a .git dir, _gitdir would be set to "." by
rev-parse, something that confuses the worktree detection.

Fix by expanding the value of _gitdir to pwd in this special case.

Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
14 years agogit-gui: Fix applying a line when all following lines are deletions
Jeff Epler [Tue, 8 Dec 2009 00:22:42 +0000 (18:22 -0600)]
git-gui: Fix applying a line when all following lines are deletions

If a diff looked like:

 @@
  context
 -del1
 -del2

and you wanted to stage the deletion 'del1', the generated patch
wouldn't apply because it was missing the line 'del2' converted to
context, but this line was counted in the @@-line

Signed-off-by: Jeff Epler <jepler@unpythonic.net>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
14 years agogit-gui: Correct file_states when unstaging partly staged entry
Jens Lehmann [Mon, 7 Dec 2009 20:35:59 +0000 (21:35 +0100)]
git-gui: Correct file_states when unstaging partly staged entry

When unstaging a partly staged file or submodule, the file_states
list was not updated properly (unless unstaged linewise). Its
index_info part did not contain the former head_info as it should
have but kept its old value.

This seems not to have had any bad effects but diminishes the value
of the file_states list for future enhancements.

Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
14 years agogit-gui: Fix gitk for branch whose name matches local file
Peter Krefting [Thu, 21 Jan 2010 12:15:17 +0000 (13:15 +0100)]
git-gui: Fix gitk for branch whose name matches local file

When trying to run gitk on a branch name whose name matches a local
file, it will toss an error saying that the name is ambiguous. Adding
a pair of dashes will make gitk parse the options to the left of
it as branch names. Since wish eats the first pair of dashes we
throw at it, we need to add a second one to ensure they get through.

Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
14 years agogit-gui: Keep repo_config(gui.recentrepos) and .gitconfig in sync
Christopher Beelby [Sat, 23 Jan 2010 22:37:17 +0000 (14:37 -0800)]
git-gui: Keep repo_config(gui.recentrepos) and .gitconfig in sync

When the number of recent repo's gets to ten there can be a
situation where an item is removed from the .gitconfig file via
a call to git config --unset, but the internal representation of
that file (repo_config(gui.recentrepo)) is not updated.  Then a
subsequent attempt to remove an item from the list fails because
git-gui attempts to call --unset on a value that has already
been removed.  This leads to duplicates in the .gitconfig file,
which then also cause errors if the git-gui tries to --unset them
(rather than using --unset-all. --unset-all is not used because it
is not expected that duplicates should ever be allowed to exist.)

When loading the list of recent repositories (proc _get_recentrepos)
if a repo in the list is not considered a valid git reposoitory
then we should go ahead and remove it so it doesn't take up a slot
in the list (since we limit to 10 items). This will prevent a bunch
of invalid entries in the list (which are not shown) from making
valid entries dissapear off the list even when there are less than
ten valid entries.

See: http://code.google.com/p/msysgit/issues/detail?id=362
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
14 years agogit-gui: handle really long error messages in updateindex.
Pat Thoyts [Sun, 20 Dec 2009 02:02:03 +0000 (02:02 +0000)]
git-gui: handle really long error messages in updateindex.

As reported to msysGit (bug #340) it is possible to get some very
long error messages when updating the index. The use of a label to
display this prevents scrolling the output. This patch replaces the
label with a scrollable text widget configured to look like a label.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
14 years agoDocumentation: rev-list: fix synopsys for --tags and and --remotes
Christian Couder [Sat, 23 Jan 2010 07:26:26 +0000 (08:26 +0100)]
Documentation: rev-list: fix synopsys for --tags and and --remotes

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge git://git.bogomips.org/git-svn
Junio C Hamano [Sat, 23 Jan 2010 18:42:47 +0000 (10:42 -0800)]
Merge git://git.bogomips.org/git-svn

* git://git.bogomips.org/git-svn:
  git-svn: allow subset of branches/tags to be specified in glob spec
  git-svn: allow UUID to be manually remapped via rewriteUUID
  git-svn: update svn mergeinfo test suite
  git-svn: document --username/commit-url for branch/tag
  git-svn: add --username/commit-url options for branch/tag
  git-svn: respect commiturl option for branch/tag
  git-svn: fix mismatched src/dst errors for branch/tag
  git-svn: handle merge-base failures
  git-svn: ignore changeless commits when checking for a cherry-pick

14 years agogit-svn: allow subset of branches/tags to be specified in glob spec
Jay Soffian [Sat, 23 Jan 2010 08:30:01 +0000 (03:30 -0500)]
git-svn: allow subset of branches/tags to be specified in glob spec

For very large projects it is useful to be able to clone a subset of the
upstream SVN repo's branches. Allow for this by letting the left-side of
the branches and tags glob specs contain a brace-delineated comma-separated
list of names. e.g.:

branches = branches/{red,green}/src:refs/remotes/branches/*

Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
Acked-by: Eric Wong <normalperson@yhbt.net>
14 years agogit-svn: allow UUID to be manually remapped via rewriteUUID
Jay Soffian [Sat, 23 Jan 2010 08:30:00 +0000 (03:30 -0500)]
git-svn: allow UUID to be manually remapped via rewriteUUID

In certain situations it may be necessary to manually remap an svn
repostitory UUID. For example:

                  o--- [git-svn clone]
                 /
[origin svn repo]
                 \
                  o--- [svnsync clone]

Imagine that only "git-svn clone" and "svnsync clone" are made available
to external users. Furthur, "git-svn clone" contains only trunk, and for
reasons unknown, "svnsync clone" is missing the revision properties that
normally provide the origin svn repo's UUID.

A git user who has cloned the "git-svn clone" repo now wishes to use
git-svn to pull in the missing branches from the "synsync clone" repo.
In order for git-svn to get the history correct for those branches,
it needs to know the origin svn repo's UUID. Hence rewriteUUID.

Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
Acked-by: Eric Wong <normalperson@yhbt.net>
14 years agogit-svn: update svn mergeinfo test suite
Andrew Myrick [Thu, 21 Jan 2010 21:55:48 +0000 (21:55 +0000)]
git-svn: update svn mergeinfo test suite

Add a partial branch (e.g., a branch from a project subdirectory) to the
git-svn mergeinfo test repository.

Add a tag and a branch from that tag to the git-svn mergeinfo test repository.

Update the test script to expect a known failure in git-svn exposed by these
additions where merge info for partial branches is not preserved.

Signed-off-by: Andrew Myrick <amyrick@apple.com>
Acked-by: Eric Wong <normalperson@yhbt.net>
14 years agogit-svn: document --username/commit-url for branch/tag
Igor Mironov [Mon, 11 Jan 2010 16:22:27 +0000 (03:22 +1100)]
git-svn: document --username/commit-url for branch/tag

[ew: shortened subject]

Signed-off-by: Igor Mironov <igor.a.mironov@gmail.com>
Acked-by: Eric Wong <normalperson@yhbt.net>
14 years agogit-svn: add --username/commit-url options for branch/tag
Igor Mironov [Mon, 11 Jan 2010 16:21:51 +0000 (03:21 +1100)]
git-svn: add --username/commit-url options for branch/tag

Add ability to specify on the command line the username to perform the
operation as and the writable URL of the repository to perform it on.

[ew: shortened subject]

Signed-off-by: Igor Mironov <igor.a.mironov@gmail.com>
Acked-by: Eric Wong <normalperson@yhbt.net>
14 years agogit-svn: respect commiturl option for branch/tag
Igor Mironov [Mon, 11 Jan 2010 16:21:23 +0000 (03:21 +1100)]
git-svn: respect commiturl option for branch/tag

When constructing a destination URL, use the property 'commiturl' if it
is specified in the configuration file; otherwise take 'url' as usual.
This accommodates the scenario where a user only wants to involve the
writable repository in operations performing a commit and defaults
everything else to a read-only URL.

[ew: shortened subject]

Signed-off-by: Igor Mironov <igor.a.mironov@gmail.com>
Acked-by: Eric Wong <normalperson@yhbt.net>
14 years agogit-svn: fix mismatched src/dst errors for branch/tag
Igor Mironov [Mon, 11 Jan 2010 16:20:43 +0000 (03:20 +1100)]
git-svn: fix mismatched src/dst errors for branch/tag

This fixes the following issue:

$ git svn branch -t --username=svnuser \
  --commit-url=https://myproj.domain.com/svn mytag
Copying http://myproj.domain.com/svn/trunk at r26 to
https://myproj.domain.com/svn/tags/mytag...

Trying to use an unsupported feature: Source and dest appear not to be
in the same repository (src: 'http://myproj.domain.com/svn/trunk';
dst: 'https://myproj.domain.com/svn/tags/mytag')

[ew: shortened subject]

Signed-off-by: Igor Mironov <igor.a.mironov@gmail.com>
Acked-by: Eric Wong <normalperson@yhbt.net>
14 years agogit-svn: handle merge-base failures
Andrew Myrick [Thu, 7 Jan 2010 00:25:22 +0000 (16:25 -0800)]
git-svn: handle merge-base failures

Change git-svn to warn and continue when merge-base fails while processing svn
merge tickets.

merge-base can fail when a partial branch is created and merged back to trunk
in svn, because it cannot find a common ancestor between the partial branch and
trunk.

Signed-off-by: Andrew Myrick <amyrick@apple.com>
Acked-by: Sam Vilain <sam@vilain.net>
Acked-by: Eric Wong <normalperson@yhbt.net>
14 years agogit-svn: ignore changeless commits when checking for a cherry-pick
Andrew Myrick [Thu, 7 Jan 2010 00:25:21 +0000 (16:25 -0800)]
git-svn: ignore changeless commits when checking for a cherry-pick

Update git-svn to ignore commits that do not change the tree when it is
deciding if an svn merge ticket represents a real branch merge or just a
cherry-pick.

Consider the following integration model in the svn repository:

   F---G  branch1
  /     \
 D  tag1 \   E  tag2
/         \ /
A---B      C  trunk

branch1 is merged to trunk in commit C.

With this patch, git-svn will correctly identify branch1 as a proper merge
parent, instead of incorrectly ignoring it as a cherry-pick.

Signed-off-by: Andrew Myrick <amyrick@apple.com>
Acked-by: Sam Vilain <sam@vilain.net>
Acked-by: Eric Wong <normalperson@yhbt.net>
14 years agot7800-difftool.sh: Test mergetool.prompt fallback
David Aguilar [Sat, 23 Jan 2010 06:03:36 +0000 (22:03 -0800)]
t7800-difftool.sh: Test mergetool.prompt fallback

4cacc621 made difftool fall back to mergetool.prompt
when difftool.prompt is unconfigured.  This adds a test.

Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agomsvc: Add a definition of NORETURN compatible with msvc compiler
Ramsay Jones [Wed, 20 Jan 2010 19:45:12 +0000 (19:45 +0000)]
msvc: Add a definition of NORETURN compatible with msvc compiler

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Acked-by: Sebastian Schuberth <sschuberth@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoUpdate draft release notes to 1.7.0
Junio C Hamano [Sat, 23 Jan 2010 00:34:50 +0000 (16:34 -0800)]
Update draft release notes to 1.7.0

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agomsvc: Fix a compiler warning due to an incorrect pointer cast
Ramsay Jones [Wed, 20 Jan 2010 19:34:14 +0000 (19:34 +0000)]
msvc: Fix a compiler warning due to an incorrect pointer cast

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Acked-by: Sebastian Schuberth <sschuberth@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agomsvc: Fix an "unrecognized option" linker warning
Ramsay Jones [Wed, 20 Jan 2010 19:25:51 +0000 (19:25 +0000)]
msvc: Fix an "unrecognized option" linker warning

Having recently added support for building git-imap-send on
Windows, we now link against OpenSSL libraries, and the linker
issues the following warning:

    warning LNK4044: unrecognized option '/lssl'; ignored

In order to suppress the warning, we change the msvc linker
script to translate an '-lssl' parameter to the ssleay32.lib
library.

Note that the linker script was already including ssleay32.lib
(along with libeay32.lib) as part of the translation of the
'-lcrypto' library parameter.  However, libeay32.dll does not
depend on ssleay32.dll and can be used stand-alone, so we remove
ssleay32.lib from the '-lcrypto' translation.

The dependence of ssleay32.dll on libeay32.dll is represented in
the Makefile by the NEEDS_CRYPTO_WITH_SSL build variable.

Also, add the corresponding change to the buildsystem generator.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Acked-by: Sebastian Schuberth <sschuberth@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge branch 'maint'
Junio C Hamano [Sat, 23 Jan 2010 00:12:41 +0000 (16:12 -0800)]
Merge branch 'maint'

* maint:
  ignore duplicated slashes in make_relative_path()

14 years agoMerge branch 'jc/branch-d'
Junio C Hamano [Sat, 23 Jan 2010 00:08:19 +0000 (16:08 -0800)]
Merge branch 'jc/branch-d'

* jc/branch-d:
  branch -d: base the "already-merged" safety on the branch it merges with

14 years agoMerge branch 'il/rev-glob'
Junio C Hamano [Sat, 23 Jan 2010 00:08:16 +0000 (16:08 -0800)]
Merge branch 'il/rev-glob'

* il/rev-glob:
  Documentation: improve description of --glob=pattern and friends
  rev-parse --branches/--tags/--remotes=pattern
  rev-parse --glob

14 years agoMerge branch 'js/refer-upstream'
Junio C Hamano [Sat, 23 Jan 2010 00:08:13 +0000 (16:08 -0800)]
Merge branch 'js/refer-upstream'

* js/refer-upstream:
  Teach @{upstream} syntax to strbuf_branchanme()
  t1506: more test for @{upstream} syntax
  Introduce <branch>@{upstream} notation

14 years agoMerge branch 'jl/submodule-diff'
Junio C Hamano [Sat, 23 Jan 2010 00:08:10 +0000 (16:08 -0800)]
Merge branch 'jl/submodule-diff'

* jl/submodule-diff:
  Performance optimization for detection of modified submodules
  git status: Show uncommitted submodule changes too when enabled
  Teach diff that modified submodule directory is dirty
  Show submodules as modified when they contain a dirty work tree

14 years agoMerge branch 'il/remote-updates'
Junio C Hamano [Sat, 23 Jan 2010 00:08:07 +0000 (16:08 -0800)]
Merge branch 'il/remote-updates'

* il/remote-updates:
  Add git remote set-url

14 years agoMerge branch 'il/branch-set-upstream'
Junio C Hamano [Sat, 23 Jan 2010 00:08:05 +0000 (16:08 -0800)]
Merge branch 'il/branch-set-upstream'

* il/branch-set-upstream:
  branch: warn and refuse to set a branch as a tracking branch of itself.
  Add branch --set-upstream

14 years agoMerge branch 'jc/maint-limit-note-output'
Junio C Hamano [Sat, 23 Jan 2010 00:08:01 +0000 (16:08 -0800)]
Merge branch 'jc/maint-limit-note-output'

* jc/maint-limit-note-output:
  Fix "log --oneline" not to show notes
  Fix "log" family not to be too agressive about showing notes

14 years agoMerge branch 'nd/ls-files-sparse-fix'
Junio C Hamano [Sat, 23 Jan 2010 00:07:18 +0000 (16:07 -0800)]
Merge branch 'nd/ls-files-sparse-fix'

* nd/ls-files-sparse-fix:
  Fix memory corruption when .gitignore does not end by \n

14 years agoMake difftool.prompt fall back to mergetool.prompt
Sebastian Schuberth [Fri, 22 Jan 2010 16:36:36 +0000 (17:36 +0100)]
Make difftool.prompt fall back to mergetool.prompt

The documentation states that "git-difftool falls back to git-mergetool
config variables when the difftool equivalents have not been defined".
Until now, this was not the case for "difftool.prompt".

Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
Acked-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoengine.pl: Fix a recent breakage of the buildsystem generator
Ramsay Jones [Fri, 22 Jan 2010 20:00:47 +0000 (20:00 +0000)]
engine.pl: Fix a recent breakage of the buildsystem generator

Commit ade2ca0c (Do not try to remove directories when removing
old links, 2009-10-27) added an expression to a 'test' using an
'-o' or connective. This resulted in the buildsystem generator
mistaking a conditional 'rm' for a linker command. In order to
fix the breakage, we filter out all 'test' commands before then
attempting to identify the commands of interest.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Acked-by: Sebastian Schuberth <sschuberth@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoignore duplicated slashes in make_relative_path()
Junio C Hamano [Fri, 22 Jan 2010 03:05:19 +0000 (19:05 -0800)]
ignore duplicated slashes in make_relative_path()

The function takes two paths, an early part of abs is supposed to match
base; otherwise abs is not a path under base and the function returns the
full path of abs.  The caller can easily confuse the implementation by
giving duplicated and needless slashes in these path arguments.

Credit for test script, motivation and initial patch goes to Thomas Rast.
A follow-up fix (squashed) is by Hannes.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agogit-mv: fix moving more than one source to a single destination
Junio C Hamano [Fri, 22 Jan 2010 22:17:06 +0000 (14:17 -0800)]
git-mv: fix moving more than one source to a single destination

The code used as if return value from basename(3) were stable, but
often the function is implemented to return a pointer to a static
storage internal to it.

Because basename(3) is also allowed to modify its input parameter in
place, casting constness away from the strings we obtained from the
caller and giving them to basename is a no-no.

Reported, and initial fix and test supplied by David Rydh.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agorebase -i: Enclose sed command substitution in quotes
Michael Haggerty [Fri, 22 Jan 2010 09:22:30 +0000 (10:22 +0100)]
rebase -i: Enclose sed command substitution in quotes

Reported by: Johannes Sixt <j.sixt@viscovery.net>

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agorebase -i: Avoid non-portable "test X -a Y"
Michael Haggerty [Fri, 22 Jan 2010 09:22:29 +0000 (10:22 +0100)]
rebase -i: Avoid non-portable "test X -a Y"

Reported by: Eric Blake <ebb9@byu.net>

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agomake "index-pack" a built-in
Linus Torvalds [Fri, 22 Jan 2010 15:55:19 +0000 (07:55 -0800)]
make "index-pack" a built-in

This required some fairly trivial packfile function 'const' cleanup,
since the builtin commands get a const char *argv[] array.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agomake "git pack-redundant" a built-in
Linus Torvalds [Fri, 22 Jan 2010 15:42:14 +0000 (07:42 -0800)]
make "git pack-redundant" a built-in

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agomake "git unpack-file" a built-in
Linus Torvalds [Fri, 22 Jan 2010 15:38:03 +0000 (07:38 -0800)]
make "git unpack-file" a built-in

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agomake "mktag" a built-in
Linus Torvalds [Fri, 22 Jan 2010 15:34:44 +0000 (07:34 -0800)]
make "mktag" a built-in

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agomake "merge-index" a built-in
Linus Torvalds [Fri, 22 Jan 2010 15:29:21 +0000 (07:29 -0800)]
make "merge-index" a built-in

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agomerge-tree: remove unnecessary call of git_extract_argv0_path
Johannes Sixt [Fri, 22 Jan 2010 11:47:59 +0000 (12:47 +0100)]
merge-tree: remove unnecessary call of git_extract_argv0_path

This call should have been removed when the utility was made a builtin by
907a7cb.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agomake "git patch-id" a built-in
Linus Torvalds [Fri, 22 Jan 2010 04:31:25 +0000 (20:31 -0800)]
make "git patch-id" a built-in

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agomake "git var" a built-in
Linus Torvalds [Fri, 22 Jan 2010 04:21:55 +0000 (20:21 -0800)]
make "git var" a built-in

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agofix git-p4 editor invocation
Nicolas Pitre [Fri, 22 Jan 2010 05:55:15 +0000 (00:55 -0500)]
fix git-p4 editor invocation

The strip() is required to remove the trailing newline character,
as already done elsewhere.

Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoDocumentation: improve description of --glob=pattern and friends
Thomas Rast [Fri, 22 Jan 2010 00:21:38 +0000 (01:21 +0100)]
Documentation: improve description of --glob=pattern and friends

Consolidate the descriptions of --branches, --tags and --remotes a
bit, to make it less repetitive.  Improve the grammar a bit, and spell
out the meaning of the 'append /*' rule.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge branch 'maint'
Junio C Hamano [Fri, 22 Jan 2010 04:08:31 +0000 (20:08 -0800)]
Merge branch 'maint'

* maint:
  merge-recursive: do not return NULL only to cause segfault
  retry request without query when info/refs?query fails

14 years agomake "git hash-object" a built-in
Linus Torvalds [Fri, 22 Jan 2010 03:50:11 +0000 (19:50 -0800)]
make "git hash-object" a built-in

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agomake "git merge-tree" a built-in
Linus Torvalds [Fri, 22 Jan 2010 02:25:20 +0000 (18:25 -0800)]
make "git merge-tree" a built-in

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoslim down "git show-index"
Linus Torvalds [Thu, 21 Jan 2010 23:25:19 +0000 (15:25 -0800)]
slim down "git show-index"

As the documentation says, this is primarily for debugging, and
in the longer term we should rename it to test-show-index or something.

In the meantime, just avoid xmalloc (which slurps in the rest of git), and
separating out the trivial hex functions into "hex.o".

This results in

  [torvalds@nehalem git]$ size git-show-index
       text    data     bss     dec     hex filename
     222818    2276  112688  337782   52776 git-show-index (before)
       5696     624    1264    7584    1da0 git-show-index (after)

which is a whole lot better.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoRemove diff machinery dependency from read-cache
Linus Torvalds [Thu, 21 Jan 2010 19:37:38 +0000 (11:37 -0800)]
Remove diff machinery dependency from read-cache

Exal Sibeaz pointed out that some git files are way too big, and that
add_files_to_cache() brings in all the diff machinery to any git binary
that needs the basic git SHA1 object operations from read-cache.c. Which
is pretty much all of them.

It's doubly silly, since add_files_to_cache() is only used by builtin
programs (add, checkout and commit), so it's fairly easily fixed by just
moving the thing to builtin-add.c, and avoiding the dependency entirely.

I initially argued to Exal that it would probably be best to try to depend
on smart compilers and linkers, but after spending some time trying to
make -ffunction-sections work and giving up, I think Exal was right, and
the fix is to just do some trivial cleanups like this.

This trivial cleanup results in pretty stunning file size differences.
The diff machinery really is mostly used by just the builtin programs, and
you have things like these trivial before-and-after numbers:

  -rwxr-xr-x 1 torvalds torvalds 1727420 2010-01-21 10:53 git-hash-object
  -rwxrwxr-x 1 torvalds torvalds  940265 2010-01-21 11:16 git-hash-object

Now, I'm not saying that 940kB is good either, but that's mostly all the
debug information - you can see the real code with 'size':

   text    data     bss     dec     hex filename
 418675    3920  127408  550003   86473 git-hash-object (before)
 230650    2288  111728  344666   5425a git-hash-object (after)

ie we have a nice 24% size reduction from this trivial cleanup.

It's not just that one file either. I get:

[torvalds@nehalem git]$ du -s /home/torvalds/libexec/git-core
45640 /home/torvalds/libexec/git-core (before)
33508 /home/torvalds/libexec/git-core (after)

so we're talking 12MB of diskspace here.

(Of course, stripping all the binaries brings the 33MB down to 9MB, so the
whole debug information thing is still the bulk of it all, but that's a
separate issue entirely)

Now, I'm sure there are other things we should do, and changing our
compiler flags from -O2 to -Os would bring the text size down by an
additional almost 20%, but this thing Exal pointed out seems to be some
good low-hanging fruit.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agomerge-recursive: do not return NULL only to cause segfault
Junio C Hamano [Fri, 22 Jan 2010 00:38:56 +0000 (16:38 -0800)]
merge-recursive: do not return NULL only to cause segfault

merge-recursive calls write_tree_from_memory() to come up with a virtual
tree, with possible conflict markers inside the blob contents, while
merging multiple common ancestors down.  It is a bug to call the function
with unmerged entries in the index, even if the merge to come up with the
common ancestor resulted in conflicts.  Otherwise the result won't be
expressible as a tree object.

We _might_ want to suggest the user to set GIT_MERGE_VERBOSITY to 5 and
re-run the merge in the message.  At least we will know which part of
process_renames() or process_entry() functions is not correctly handling
the unmerged paths, and it might help us diagnosing the issue.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agogit-rebase.txt: Fix spelling
Horst H. von Brand [Thu, 21 Jan 2010 20:34:25 +0000 (17:34 -0300)]
git-rebase.txt: Fix spelling

Signed-off-by: Horst H. von Brand <vonbrand@inf.utfsm.cl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoretry request without query when info/refs?query fails
Tay Ray Chuan [Thu, 21 Jan 2010 14:41:00 +0000 (22:41 +0800)]
retry request without query when info/refs?query fails

When "info/refs" is a static file and not behind a CGI handler, some
servers may not handle a GET request for it with a query string
appended (eg. "?foo=bar") properly.

If such a request fails, retry it sans the query string. In addition,
ensure that the "smart" http protocol is not used (a service has to be
specified with "?service=<service name>" to be conformant).

Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Reported-and-tested-by: Yaroslav Halchenko <debian@onerussian.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoFix "log --oneline" not to show notes
Junio C Hamano [Thu, 21 Jan 2010 22:57:41 +0000 (14:57 -0800)]
Fix "log --oneline" not to show notes

This option should be treated pretty much the same as --format="%h %s".

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMake 'rerere forget' work from a subdirectory.
Johannes Sixt [Thu, 21 Jan 2010 08:23:48 +0000 (09:23 +0100)]
Make 'rerere forget' work from a subdirectory.

It forgot to apply the prefix to the paths given on the command line.

[jc: added test]

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMake test case numbers unique
Johannes Sixt [Thu, 21 Jan 2010 07:57:03 +0000 (08:57 +0100)]
Make test case numbers unique

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoconflict-marker-size: add test and docs
Junio C Hamano [Thu, 21 Jan 2010 07:49:27 +0000 (23:49 -0800)]
conflict-marker-size: add test and docs

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoUpdate draft release notes to 1.7.0
Junio C Hamano [Thu, 21 Jan 2010 07:30:45 +0000 (23:30 -0800)]
Update draft release notes to 1.7.0

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge branch 'bw/cvsimport'
Junio C Hamano [Thu, 21 Jan 2010 04:28:51 +0000 (20:28 -0800)]
Merge branch 'bw/cvsimport'

* bw/cvsimport:
  cvsimport: standarize system() calls to external git tools
  cvsimport: standarize open() calls to external git tools
  cvsimport: modernize callouts to git subcommands

14 years agoMerge branch 'jc/checkout-merge-base'
Junio C Hamano [Thu, 21 Jan 2010 04:28:51 +0000 (20:28 -0800)]
Merge branch 'jc/checkout-merge-base'

* jc/checkout-merge-base:
  Fix "checkout A..." synonym for "checkout A...HEAD" on Windows

14 years agoMerge branch 'ag/patch-header-verify'
Junio C Hamano [Thu, 21 Jan 2010 04:28:51 +0000 (20:28 -0800)]
Merge branch 'ag/patch-header-verify'

* ag/patch-header-verify:
  builtin-apply.c: fix the --- and +++ header filename consistency check

14 years agoMerge branch 'jc/conflict-marker-size'
Junio C Hamano [Thu, 21 Jan 2010 04:28:51 +0000 (20:28 -0800)]
Merge branch 'jc/conflict-marker-size'

* jc/conflict-marker-size:
  rerere: honor conflict-marker-size attribute
  rerere: prepare for customizable conflict marker length
  conflict-marker-size: new attribute
  rerere: use ll_merge() instead of using xdl_merge()
  merge-tree: use ll_merge() not xdl_merge()
  xdl_merge(): allow passing down marker_size in xmparam_t
  xdl_merge(): introduce xmparam_t for merge specific parameters
  git_attr(): fix function signature

Conflicts:
builtin-merge-file.c
ll-merge.c
xdiff/xdiff.h
xdiff/xmerge.c

14 years agoMerge branch 'ag/maint-apply-too-large-p'
Junio C Hamano [Thu, 21 Jan 2010 04:28:50 +0000 (20:28 -0800)]
Merge branch 'ag/maint-apply-too-large-p'

* ag/maint-apply-too-large-p:
  builtin-apply.c: Skip filenames without enough components

14 years agoMerge branch 'ap/merge-backend-opts'
Junio C Hamano [Thu, 21 Jan 2010 04:28:50 +0000 (20:28 -0800)]
Merge branch 'ap/merge-backend-opts'

* ap/merge-backend-opts:
  Document that merge strategies can now take their own options
  Extend merge-subtree tests to test -Xsubtree=dir.
  Make "subtree" part more orthogonal to the rest of merge-recursive.
  pull: Fix parsing of -X<option>
  Teach git-pull to pass -X<option> to git-merge
  git merge -X<option>
  git-merge-file --ours, --theirs

Conflicts:
git-compat-util.h

14 years agoMerge branch 'nd/status-partial-refresh'
Junio C Hamano [Thu, 21 Jan 2010 04:28:50 +0000 (20:28 -0800)]
Merge branch 'nd/status-partial-refresh'

* nd/status-partial-refresh:
  rm: only refresh entries that we may touch
  status: only touch path we may need to check

14 years agoMerge remote branch 'remotes/trast-doc/for-next'
Junio C Hamano [Thu, 21 Jan 2010 04:28:49 +0000 (20:28 -0800)]
Merge remote branch 'remotes/trast-doc/for-next'

* remotes/trast-doc/for-next:
  Documentation: spell 'git cmd' without dash throughout
  Documentation: format full commands in typewriter font
  Documentation: warn prominently against merging with dirty trees
  Documentation/git-merge: reword references to "remote" and "pull"

Conflicts:
Documentation/config.txt
Documentation/git-config.txt
Documentation/git-merge.txt

14 years agoMerge branch 'jh/notes' (early part)
Junio C Hamano [Thu, 21 Jan 2010 04:28:49 +0000 (20:28 -0800)]
Merge branch 'jh/notes' (early part)

* 'jh/notes' (early part):
  Add more testcases to test fast-import of notes
  Rename t9301 to t9350, to make room for more fast-import tests
  fast-import: Proper notes tree manipulation

14 years agoMerge branch 'maint'
Junio C Hamano [Thu, 21 Jan 2010 04:28:39 +0000 (20:28 -0800)]
Merge branch 'maint'

* maint:
  status: don't require the repository to be writable

Conflicts:
builtin-commit.c

14 years agoMerge branch 'jc/maint-refresh-index-is-optional-for-status' into maint
Junio C Hamano [Thu, 21 Jan 2010 04:25:11 +0000 (20:25 -0800)]
Merge branch 'jc/maint-refresh-index-is-optional-for-status' into maint

* jc/maint-refresh-index-is-optional-for-status:
  status: don't require the repository to be writable

14 years agoFix memory corruption when .gitignore does not end by \n
Nguyễn Thái Ngọc Duy [Wed, 20 Jan 2010 14:09:16 +0000 (21:09 +0700)]
Fix memory corruption when .gitignore does not end by \n

Commit b5041c5 (Avoid writing to buffer in add_excludes_from_file_1())
tried not to append '\n' at the end because the next commit
may return a buffer that does not have extra space for that.

Unfortunately it left this assignment in the loop:

  buf[i - (i && buf[i-1] == '\r')] = 0;

that can corrupt memory if "buf" is not '\n' terminated. But even if
it does not corrupt memory, the last line would not be
NULL-terminated, leading to errors later inside add_exclude().

This patch fixes it by reverting the faulty commit and make
sure "buf" is always \n terminated.

While at it, free unused memory properly.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoFix "log" family not to be too agressive about showing notes
Junio C Hamano [Wed, 20 Jan 2010 21:59:36 +0000 (13:59 -0800)]
Fix "log" family not to be too agressive about showing notes

Giving "Notes" information in the default output format of "log" and
"show" is a sensible progress (the user has asked for it by having the
notes), but for some commands (e.g. "format-patch") spewing notes into the
formatted commit log message without being asked is too aggressive.

Enable notes output only for "log", "show", "whatchanged" by default and
only when the user didn't ask any specific --pretty/--format from the
command line; users can explicitly override this default with --show-notes
and --no-notes option.

Parts of tests are taken from Jeff King's fix.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge branch 'rr/core-tutorial'
Junio C Hamano [Wed, 20 Jan 2010 23:24:42 +0000 (15:24 -0800)]
Merge branch 'rr/core-tutorial'

* rr/core-tutorial:
  Documentation: Update git core tutorial clarifying reference to scripts

14 years agoMerge branch 'jc/cache-unmerge'
Junio C Hamano [Wed, 20 Jan 2010 22:44:31 +0000 (14:44 -0800)]
Merge branch 'jc/cache-unmerge'

* jc/cache-unmerge:
  rerere forget path: forget recorded resolution
  rerere: refactor rerere logic to make it independent from I/O
  rerere: remove silly 1024-byte line limit
  resolve-undo: teach "update-index --unresolve" to use resolve-undo info
  resolve-undo: "checkout -m path" uses resolve-undo information
  resolve-undo: allow plumbing to clear the information
  resolve-undo: basic tests
  resolve-undo: record resolved conflicts in a new index extension section
  builtin-merge.c: use standard active_cache macros

Conflicts:
builtin-ls-files.c
builtin-merge.c
builtin-rerere.c

14 years agoMerge branch 'js/exec-error-report'
Junio C Hamano [Wed, 20 Jan 2010 22:44:12 +0000 (14:44 -0800)]
Merge branch 'js/exec-error-report'

* js/exec-error-report:
  Improve error message when a transport helper was not found
  start_command: detect execvp failures early
  run-command: move wait_or_whine earlier
  start_command: report child process setup errors to the parent's stderr

Conflicts:
Makefile

14 years agoMerge branch 'jc/ls-files-ignored-pathspec'
Junio C Hamano [Wed, 20 Jan 2010 22:43:54 +0000 (14:43 -0800)]
Merge branch 'jc/ls-files-ignored-pathspec'

* jc/ls-files-ignored-pathspec:
  ls-files: fix overeager pathspec optimization
  read_directory(): further split treat_path()
  read_directory_recursive(): refactor handling of a single path into a separate function
  t3001: test ls-files -o ignored/dir

14 years agoMerge branch 'jc/grep-lookahead'
Junio C Hamano [Wed, 20 Jan 2010 22:43:41 +0000 (14:43 -0800)]
Merge branch 'jc/grep-lookahead'

* jc/grep-lookahead:
  grep --no-index: allow use of "git grep" outside a git repository
  grep: prepare to run outside of a work tree
  grep: rip out pessimization to use fixmatch()
  grep: rip out support for external grep
  grep: optimize built-in grep by skipping lines that do not hit

Conflicts:
builtin-grep.c
t/t7002-grep.sh