Commit graph

2052 commits

Author SHA1 Message Date
Thomas Rast 498bcd3159 rev-list: fix --reverse interaction with --parents
--reverse did not interact well with --parents, as the included test
case shows: in a history like

  A--B.
   \   \
    `C--M--D

the command

  git rev-list --reverse --parents --full-history HEAD

erroneously lists D as having no parents at all.  (Without --reverse,
it correctly lists M.)

This is caused by the machinery driving --reverse: it first grabs all
commits through the normal routines, then runs them through the same
routines again, effectively simplifying them twice.

Fix this by moving the --reverse one level up, into get_revision().
This way we can cleanly grab all commits via the normal calls, then
just pop them off the list one by one without interfering with
get_revision_internal().

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-29 22:20:51 -07:00
Junio C Hamano d2b9dff8a0 Merge branch 'np/verify-pack' into maint
* np/verify-pack:
  discard revindex data when pack list changes
2008-08-29 21:48:02 -07:00
Junio C Hamano 445cac18c0 Merge branch 'maint'
* maint:
  tutorial: gentler illustration of Alice/Bob workflow using gitk
  pretty=format: respect date format options
  make git-shell paranoid about closed stdin/stdout/stderr
  Document gitk --argscmd flag.
  Fix '--dirstat' with cross-directory renaming
  for-each-ref: Allow a trailing slash in the patterns
2008-08-29 00:16:39 -07:00
Jeff King d36f8679e9 pretty=format: respect date format options
When running a command like:

  git log --pretty=format:%ad --date=short

the date option was ignored. This patch causes it to use whatever
format was specified by --date (or by --relative-date, etc), just
as the non-user formats would do.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-29 00:14:29 -07:00
Nguyễn Thái Ngọc Duy 6577f542b3 grep: fix worktree setup
Unless used with --cached or grepping on a tree, "git grep" will
search on working directory, so set up worktree properly

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-28 22:46:16 -07:00
Nguyễn Thái Ngọc Duy 4f38f6b5ba diff*: fix worktree setup
This fixes "git diff", "git diff-files" and "git diff-index" to work
correctly under worktree setup. Because diff* family works in many modes
and not all of them require worktree, Junio made a nice summary
(with a little modification from me):

 * diff-files is about comparing with work tree, so it obviously needs a
  work tree;

 * diff-index also does, except "diff-index --cached" or "diff --cached TREE"

 * no-index is about random files outside git context, so it obviously
   doesn't need any work tree;

 * comparing two (or more) trees doesn't;

 * comparing two blobs doesn't;

 * comparing a blob with a random file doesn't;

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-28 20:50:10 -07:00
Christian Couder c9c4e2d5a2 bisect: only check merge bases when needed
When one good revision is not an ancestor of the bad revision, the
merge bases between the good and the bad revision should be checked
to make sure that they are also good revisions.

A previous patch takes care of that, but it may check the merge bases
more often than really needed. In fact the previous patch did not try
to optimize this as much as possible because it is not so simple. So
this is the purpose of this patch.

One may think that when all the merge bases have been checked then
we can save a flag, so that we don't need to check the merge bases
again during the bisect process.

The problem is that the user may choose to checkout and test
something completely different from what the bisect process
suggested. In this case we have to check the merge bases again,
because there may be new merge bases relevant to the bisect
process.

That's why, in this patch, when we detect that the user tested
something else than what the bisect process suggested, we remove
the flag that says that we don't need to check the merge bases
again.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-27 18:08:06 -07:00
Christian Couder f821d08921 bisect: test merge base if good rev is not an ancestor of bad rev
Before this patch, "git bisect", when it was given some good revs that
are not ancestor of the bad rev, didn't check if the merge bases were
good. "git bisect" just supposed that the user knew what he was doing,
and that, when he said the revs were good, he knew that it meant that
all the revs in the history leading to the good revs were also
considered good.

But in pratice, the user may not know that a good rev is not an
ancestor of the bad rev, or he may not know/remember that all revs
leading to the good rev will be considered good. So he may give a good
rev that is a sibling, instead of an ancestor, of the bad rev, when in
fact there can be one rev becoming good in the branch of the good rev
(because the bug was already fixed there, for example) instead of one
rev becoming bad in the branch of the bad rev.

For example, if there is the following history:

    A--B--C--D
	\
	 E--F

and we launch "git bisect start D F" then only C and D would have been
considered as possible first bad commit before this patch. This could
invite user errors; F could be the commit that fixes the bug that exists
everywhere else.

The purpose of this patch is to detect when "git bisect" is passed
some good revs that are not ancestors of the bad rev, and then to first
ask the user to test the merge bases between the good and bad revs.

If the merge bases are good then all is fine, we can continue
bisecting. Otherwise, if one merge base is bad, it means that the
assumption that all revs leading to the good one are good too is
wrong and we error out. In the case where one merge base is skipped we
issue a warning and then continue bisecting anyway.

These checks will also catch the case where good and bad have been
mistaken. This means that we can remove the check that was done latter
on the output of "git rev-list --bisect-vars".

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-27 18:08:04 -07:00
Junio C Hamano a1184d85e8 Merge branch 'mv/merge-custom'
* mv/merge-custom:
  t7606: fix custom merge test
  Fix "git-merge -s bogo" help text
  Update .gitignore to ignore git-help
  Builtin git-help.
  builtin-help: always load_command_list() in cmd_help()
  Add a second testcase for handling invalid strategies in git-merge
  Add a new test for using a custom merge strategy
  builtin-merge: allow using a custom strategy
  builtin-help: make some internal functions available to other builtins

Conflicts:
	help.c
2008-08-27 17:28:31 -07:00
Junio C Hamano 88ab18dfef Merge branch 'am/cherry-pick-rerere'
* am/cherry-pick-rerere:
  Make cherry-pick use rerere for conflict resolution.
2008-08-27 16:40:09 -07:00
Junio C Hamano 5a1e8707a6 Merge branch 'np/verify-pack'
* np/verify-pack:
  discard revindex data when pack list changes
2008-08-27 16:39:46 -07:00
Junio C Hamano 0f7a8f2dba Merge branch 'maint'
* maint:
  index-pack: setup git repository
  Suppress some bash redirection error messages
  Fix a warning (on cygwin) to allow -Werror
  Fix "git log -i --grep"
2008-08-26 17:08:19 -07:00
Jeff King 68daa64df2 format-patch: use default diff format even with patch options
Previously, running "git format-patch -U5" would cause the
low-level diff machinery to change the diff output format
from "not specified" to "patch". This meant that
format-patch thought we explicitly specified a diff output
format, and would not use the default format. The resulting
message lacked both the diffstat and the summary, as well as
the separating "---".

Now format-patch explicitly checks for this condition and
uses the default. That means that "git format-patch -p" will
now have the "-p" ignored.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-26 17:08:13 -07:00
Ramsay Jones 2b84373219 Suppress some bash redirection error messages
In particular, when testing if the filesystem allows tabs in
filenames, bash issues an error something like:

./t4016-diff-quote.sh: pathname	with HT: No such file or directory

which is caused by the failure of the (stdout) redirection,
since the file cannot be created. In order to suppress the
error message, you must redirect stderr to /dev/null, *before*
the stdout redirection on the command-line.

Also, remove a redundant filesystem check from the begining of
the t3902-quoted.sh test and standardise the "test skipped"
message to 'say' on exit.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-26 16:25:30 -07:00
Jeff King 0843acfd2c Fix "git log -i --grep"
This has been broken in v1.6.0 due to the reorganization of
the revision option parsing code. The "-i" is completely
ignored, but works fine in "git log --grep -i".

What happens is that the code for "-i" looks for
revs->grep_filter; if it is NULL, we do nothing, since there
are no grep filters. But that is obviously not correct,
since we want it to influence the later --grep option. Doing
it the other way around works, since "-i" just impacts the
existing grep_filter option.

Instead, we now always initialize the grep_filter member and
just fill in options and patterns as we get them. This means
that we can no longer check grep_filter for NULL, but
instead must check the pattern list to see if we have any
actual patterns.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-24 23:28:02 -07:00
Junio C Hamano 49d3536594 Merge branch 'maint' to sync with 1.6.0.1 2008-08-24 14:50:44 -07:00
Junio C Hamano fb70928079 Merge branch 'ag/maint-combine-diff-fix' into maint
* ag/maint-combine-diff-fix:
  Respect core.autocrlf in combined diff
2008-08-24 14:32:18 -07:00
Alexander Gavrilov 5e568f9e30 Respect core.autocrlf in combined diff
Fix git-diff to make it produce useful 3-way diffs for merge conflicts in
repositories with autocrlf enabled. Otherwise it always reports that the
whole file was changed, because it uses the contents from the working tree
without necessary conversion.

Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-23 23:59:20 -07:00
Junio C Hamano e596cdddf3 t7606: fix custom merge test
Custom merge strategy does not even kick in when the merge is truly
trivial.  The test depended on the behaviour in the git-merge rewritten in
C that broke the trivial merge completely.

Make the test to work on a non-trivial merge to make sure the strategy
kicks in.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-23 19:23:22 -07:00
Junio C Hamano 446247db78 merge: fix numerus bugs around "trivial merge" area
The "trivial merge" codepath wants to optimize itself by making an
internal call to the read-tree machinery, but it does not read the index
before doing so, and the codepath is never exercised.  Incidentally, this
failure to read the index upfront means that the safety to refuse doing
anything when the index is unmerged does not kick in, either.

These two problem are fixed by using read_cache_unmerged() that does read
the index before checking if it is unmerged at the beginning of
cmd_merge().

The primary logic of the merge, however, assumes that the process never
reads the index in-core, and the call to write_cache_as_tree() it makes
from write_tree_trivial() will always read from the on-disk index that is
prepared the strategy back-ends.  This assumption is now broken by the
above fix.  To fix this issue, we now call discard_cache() before calling
write_tree_trivial() when it wants to write the on-disk index as a tree.

When multiple strategies are tried, their results are evaluated by reading
the resulting index and inspecting it.  The codepath needs to make a call
to read_cache() for each successful strategy, and for that to work, they
need to discard_cache() the one read by the previous round.

Also the "trivial merge" forgot that the current commit is one of the
parents of the resulting commit.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-23 18:17:22 -07:00
Nicolas Pitre 4b480c6716 discard revindex data when pack list changes
This is needed to fix verify-pack -v with multiple pack arguments.

Also, in theory, revindex data (if any) must be discarded whenever
reprepare_packed_git() is called. In practice this is hard to trigger
though.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-22 22:00:22 -07:00
Alex Riesen 9188ed8962 Extend "checkout --track" DWIM to support more cases
The code handles additionally "refs/remotes/<something>/name",
"remotes/<something>/name", and "refs/<namespace>/name".

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-22 17:18:26 -07:00
Johannes Sixt a9da1663df filter-branch: Grok special characters in tag names
The tag rewriting code used a 'sed' expression to substitute the new tag
name into the corresponding field of the annotated tag object. But this is
problematic if the tag name contains special characters. In particular,
if the tag name contained a slash, then the 'sed' expression had a syntax
error. We now protect against this by using 'printf' to assemble the
tag header.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-21 23:39:13 -07:00
Johannes Schindelin 5a4a088add test-lib: do not remove trash_directory if called with --debug
Sometimes you want to keep the trash directory, even if all tests
passed.  For example, when extending tests, it comes it quite handy.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-21 23:38:25 -07:00
Junio C Hamano 4a871de896 Merge branch 'jc/add-stop-at-symlink'
* jc/add-stop-at-symlink:
  add: refuse to add working tree items beyond symlinks
  update-index: refuse to add working tree items beyond symlinks
2008-08-20 23:42:18 -07:00
Junio C Hamano 22c09307bf Merge branch 'kh/diff-tree'
* kh/diff-tree:
  Add test for diff-tree --stdin with two trees
  Teach git diff-tree --stdin to diff trees
  diff-tree: Note that the commit ID is printed with --stdin
  Refactoring: Split up diff_tree_stdin
2008-08-20 23:41:59 -07:00
Junio C Hamano 99b52f2e49 Merge branch 'mg/count-objects'
* mg/count-objects:
  count-objects: Add total pack size to verbose output
2008-08-20 23:41:54 -07:00
Junio C Hamano 0569d7566e Merge branch 'cc/merge-base-many'
* cc/merge-base-many:
  git-merge-octopus: use (merge-base A (merge B C D E...)) for stepwise merge
  merge-base-many: add trivial tests based on the documentation
  documentation: merge-base: explain "git merge-base" with more than 2 args
  merge-base: teach "git merge-base" to drive underlying merge_bases_many()
2008-08-20 23:41:38 -07:00
Junio C Hamano f02fa33605 Merge branch 'jc/test-deeper'
* jc/test-deeper:
  tests: use $TEST_DIRECTORY to refer to the t/ directory
2008-08-20 23:40:59 -07:00
Junio C Hamano 6da9d5bf47 Merge branch 'js/parallel-test'
* js/parallel-test:
  Update t/.gitignore to ignore all trash directories
  Enable parallel tests
  tests: Clarify dependencies between tests, 'aggregate-results' and 'clean'
  t9700: remove useless check
2008-08-20 23:40:56 -07:00
Junio C Hamano e28a8670a6 Merge branch 'maint'
* maint:
  Update draft release notes for 1.6.0.1
  Add hints to revert documentation about other ways to undo changes
  Install templates with the user and group of the installing personality
  "git-merge": allow fast-forwarding in a stat-dirty tree
  completion: find out supported merge strategies correctly
  decorate: allow const objects to be decorated
  for-each-ref: cope with tags with incomplete lines
  diff --check: do not get confused by new blank lines in the middle
  remote.c: remove useless if-before-free test
  mailinfo: avoid violating strbuf assertion
  git format-patch: avoid underrun when format.headers is empty or all NLs
2008-08-20 16:18:16 -07:00
Junio C Hamano 9ca8f6079c "git-merge": allow fast-forwarding in a stat-dirty tree
We used to refresh the index to clear stat-dirtyness before a fast-forward
merge.  Recent C rewrite forgot to do this.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-20 15:49:21 -07:00
Junio C Hamano e276c26b4b for-each-ref: cope with tags with incomplete lines
If you have a tag with a single, incomplete line as its payload, asking
git-for-each-ref for its %(body) element accessed a NULL pointer.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-20 13:29:30 -07:00
Junio C Hamano c35539eb10 diff --check: do not get confused by new blank lines in the middle
The code remembered that the last diff output it saw was an empty line,
and tried to reset that state whenever it sees a context line, a non-blank
new line, or a new hunk.  However, this codepath asks the underlying diff
engine to feed diff without any context, and the "just saw an empty line"
state was not reset if you added a new blank line in the last hunk of your
patch, even if it is not the last line of the file.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-20 13:28:19 -07:00
Junio C Hamano d8eec50468 Merge branch 'dp/hash-literally'
* dp/hash-literally:
  add --no-filters option to git hash-object
  add --path option to git hash-object
  use parse_options() in git hash-object
  correct usage help string for git-hash-object
  correct argument checking test for git hash-object
  teach index_fd to work with pipes
2008-08-19 21:43:25 -07:00
Junio C Hamano 614eef259f Merge branch 'js/checkout-dwim-local'
* js/checkout-dwim-local:
  checkout --track: make up a sensible branch name if '-b' was omitted
2008-08-19 21:43:04 -07:00
Jeff King e9d7d10a7f mailinfo: avoid violating strbuf assertion
In handle_from, we calculate the end boundary of a section
to remove from a strbuf using strcspn like this:

  el = strcspn(buf, set_of_end_boundaries);
  strbuf_remove(&sb, start, el + 1);

This works fine if "el" is the offset of the boundary
character, meaning we remove up to and including that
character. But if the end boundary didn't match (that is, we
hit the end of the string as the boundary instead) then we
want just "el". Asking for "el+1" caught an out-of-bounds
assertion in the strbuf library.

This manifested itself when we got a 'From' header that had
just an email address with nothing else in it (the end of
the string was the end of the address, rather than, e.g., a
trailing '>' character), causing git-mailinfo to barf.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-19 19:36:56 -07:00
Jim Meyering a624eaa782 add boolean diff.suppress-blank-empty config option
GNU diff's --suppress-blank-empty option makes it so that diff no
longer outputs trailing white space unless the input data has it.
With this option, empty context lines are now empty also in diff -u output.
Before, they would have a single trailing space.

 * diff.c (diff_suppress_blank_empty): New global.
   (git_diff_basic_config): Set it.
   (fn_out_consume): Honor it.
 * t/t4029-diff-trailing-space.sh: New file.
 * Documentation/config.txt: Document it.

Signed-off-by: Jim Meyering <meyering@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-19 18:09:37 -07:00
Brandon Casey 26e08a0190 t1002-read-tree-m-u-2way.sh: use 'git diff -U0' rather than 'diff -U0'
Some old platforms have an old diff which doesn't have the -U option.
'git diff' can be used in its place. Adjust the comparison function to
strip git's additional header lines to make this possible.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-18 23:27:14 -07:00
Marcus Griep 54514f1f14 Update t/.gitignore to ignore all trash directories
The current .gitignore only ignores the old "trash directory" and
not the new "trash directory.[test]".  This ignores both forms.

Signed-off-by: Marcus Griep <marcus@griep.us>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-18 22:43:31 -07:00
Don Zickus 289796dd29 mailinfo: re-fix MIME multipart boundary parsing
Recent changes to is_multipart_boundary() caused git-mailinfo to segfault.
The reason was after handling the end of the boundary the code tried to look
for another boundary.  Because the boundary list was empty, dereferencing
the pointer to the top of the boundary caused the program to go boom.

The fix is to check to see if the list is empty and if so go on its merry
way instead of looking for another boundary.

I also fixed a couple of increments and decrements that didn't look correct
relating to content_top.

The boundary test case was updated to catch future problems like this again.

Signed-off-by: Don Zickus <dzickus@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-18 22:05:02 -07:00
Marcus Griep f223824943 count-objects: Add total pack size to verbose output
Adds the total pack size (including indexes) the verbose count-objects
output, floored to the nearest kilobyte.

Updates documentation to match this addition.

Signed-off-by: Marcus Griep <marcus@griep.us>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-17 01:01:42 -07:00
Junio C Hamano bfdbee9810 tests: use $TEST_DIRECTORY to refer to the t/ directory
Many test scripts assumed that they will start in a 'trash' subdirectory
that is a single level down from the t/ directory, and referred to their
test vector files by asking for files like "../t9999/expect".  This will
break if we move the 'trash' subdirectory elsewhere.

To solve this, we earlier introduced "$TEST_DIRECTORY" so that they can
refer to t/ directory reliably.  This finally makes all the tests use
it to refer to the outside environment.

With this patch, and a one-liner not included here (because it would
contradict with what Dscho really wants to do):

| diff --git a/t/test-lib.sh b/t/test-lib.sh
| index 70ea7e0..60e69e4 100644
| --- a/t/test-lib.sh
| +++ b/t/test-lib.sh
| @@ -485,7 +485,7 @@ fi
|  . ../GIT-BUILD-OPTIONS
|
|  # Test repository
| -test="trash directory"
| +test="trash directory/another level/yet another"
|  rm -fr "$test" || {
|         trap - exit
|         echo >&5 "FATAL: Cannot prepare test area"

all the tests still pass, but we would want extra sets of eyeballs on this
type of change to really make sure.

[jc: with help from Stephan Beyer on http-push tests I do not run myself;
 credits for locating silly quoting errors go to Olivier Marin.]

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-17 00:41:52 -07:00
Miklos Vajna 20a55f4b2e t9300: replace '!' with test_must_fail
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-16 23:21:18 -07:00
Stephan Beyer cb3a160d60 git-am: ignore --binary option
The git-apply documentation says that --binary is a historical option.
This patch lets git-am ignore --binary and removes advertisements of this
option.

Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-16 02:32:36 -07:00
Alex Riesen 8134a003e0 Fix t3700 on filesystems which do not support question marks in names
Use square brackets instead.

And the prominent example of the deficiency are, as usual, the filesystems
of Microsoft house.

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-15 01:38:37 -07:00
Junio C Hamano a0653d5505 Merge branch 'maint'
* maint:
  t5304-prune: adjust file mtime based on system time rather than file mtime
  Fix escaping of glob special characters in pathspecs
2008-08-13 19:22:29 -07:00
Brandon Casey 21926fe885 t5304-prune: adjust file mtime based on system time rather than file mtime
test-chmtime can adjust the mtime of a file based on the file's mtime, or
based on the system time. For files accessed over NFS, the file's mtime is
set by the NFS server, and as such may vary a great deal from the NFS
client's system time if the clocks of the client and server are out of
sync. Since these tests are testing the expire feature of git-prune, an
incorrect mtime could cause a file to be expired or not expired incorrectly
and produce a test failure.

Avoid this NFS pitfall by modifying the calls to test-chmtime so that the
mtime is adjusted based on the system time, rather than the file's mtime.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-13 18:18:23 -07:00
Kevin Ballard ea335b56d4 Fix escaping of glob special characters in pathspecs
match_one implements an optimized pathspec match where it only uses
fnmatch if it detects glob special characters in the pattern. Unfortunately
it didn't treat \ as a special character, so attempts to escape a glob
special character would fail even though fnmatch() supports it.

Signed-off-by: Kevin Ballard <kevin@sb.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-13 17:11:03 -07:00
Thomas Rast a96dc01e21 rebase -i -p: fix parent rewriting
The existing parent rewriting did not handle the case where a previous
commit was amended (via edit or squash).  Fix by always putting the
new sha1 of the last commit into the $REWRITTEN map.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
2008-08-13 15:17:10 -07:00
Thomas Rast 71d9451e06 rebase -i -p: handle index and workdir correctly
'git rebase -i -p' forgot to update the index and working directory
during fast forwards.  Fix this.  Makes 'GIT_EDITOR=true rebase -i -p
<ancestor>' a no-op again.

Also, it attempted to do a fast forward even if it was instructed not
to commit (via -n).  Fall back to the cherry-pick code path and let
that handle the issue for us.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
2008-08-13 15:17:09 -07:00
Junio C Hamano 5b2eeed1ba Merge branch 'jc/post-simplify' into tr/filter-branch
* jc/post-simplify:
  Topo-sort before --simplify-merges
  revision traversal: show full history with merge simplification
  revision.c: whitespace fix
2008-08-12 17:27:28 -07:00
Thomas Rast a0e46390d3 filter-branch: fix ref rewriting with --subdirectory-filter
The previous ancestor discovery code failed on any refs that are
(pre-rewrite) ancestors of commits marked for rewriting.  This means
that in a situation

   A -- B(topic) -- C(master)

where B is dropped by --subdirectory-filter pruning, the 'topic' was
not moved up to A as intended, but left unrewritten because we asked
about 'git rev-list ^master topic', which does not return anything.

Instead, we use the straightforward

   git rev-list -1 $ref -- $filter_subdir

to find the right ancestor.  To justify this, note that the nearest
ancestor is unique: We use the output of

  git rev-list --parents -- $filter_subdir

to rewrite commits in the first pass, before any ref rewriting.  If B
is a non-merge commit, the only candidate is its parent.  If it is a
merge, there are two cases:

- All sides of the merge bring the same subdirectory contents.  Then
  rev-list already pruned away the merge in favour for just one of its
  parents, so there is only one candidate.

- Some merge sides, or the merge outcome, differ.  Then the merge is
  not pruned and can be rewritten directly.

So it is always safe to use rev-list -1.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-12 17:27:17 -07:00
Thomas Rast 6e84b71237 filter-branch: Extend test to show rewriting bug
This extends the --subdirectory-filter test in t7003 to demonstrate a
rewriting bug: when rewriting two refs A and B such that B is an
ancestor of A, it fails to rewrite B.

The underlying issue is that the rev-list invocation at
git-filter-branch.sh:332 more or less boils down to

  git rev-list B --boundary ^A

which outputs nothing because B is an ancestor of A.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-12 17:27:07 -07:00
Shawn O. Pearce 6d6f9cddbe pack-objects: Allow missing base objects when creating thin packs
If we are building a thin pack and one of the base objects we would
consider for deltification is missing its OK, the other side already
has that base object.  We may be able to get a delta from another
object, or we can simply send the new object whole (no delta).

This change allows a shallow clone to store only the objects which
are unique to it, as well as the boundary commit and its trees, but
avoids storing the boundary blobs.  This special form of a shallow
clone is able to represent just the difference between two trees.

Pack objects change suggested by Nicolas Pitre.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Acked-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-12 15:39:46 -07:00
Junio C Hamano 04c6e9e9ca diff --check: do not unconditionally complain about trailing empty lines
Recently "git diff --check" learned to detect new trailing blank lines
just like "git apply --whitespace" does.  However this check should not
trigger unconditionally.  This patch makes it honor the whitespace
settings from core.whitespace and gitattributes.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-11 22:15:28 -07:00
Petr Baudis 7dce9918c7 Adjust for the new way of enabling the default post-update hook
The post-update hook, which is required to be enabled in order for
the repository to be accessible over HTTP, is not enabled by
chmod a+x anymore, but instead by dropping the .sample suffix.

This patch emphasizes this change in the release notes (since
I believe this is rather noticeable backwards-incompatible change).
It also adjusts the documentation which still described the old way
and fixes t/t5540-http-push.sh, which was broken for 1.5 month
but apparently noone ever runs this test.

Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-11 17:07:17 -07:00
Abhijit Menon-Sen aa1a0111cc Make cherry-pick use rerere for conflict resolution.
Cherry-picking can be helped by reusing previous confliction
resolution by invoking rerere automatically.

Signed-off-by: Abhijit Menon-Sen <ams@toroid.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-11 16:42:49 -07:00
Johannes Schindelin bb0ceb6264 checkout --track: make up a sensible branch name if '-b' was omitted
What does the user most likely want with this command?

	$ git checkout --track origin/next

Exactly.  A branch called 'next', that tracks origin's branch 'next'.
Make it so.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-11 16:37:28 -07:00
Karl Hasselström 5bf707cde1 Add test for diff-tree --stdin with two trees
Signed-off-by: Karl Hasselström <kha@treskal.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-11 01:35:47 -07:00
Junio C Hamano 10d9d887ec Merge branch 'maint'
* maint:
  Documentation: fix invalid reference to 'mybranch' in user manual
  Fix deleting reflog entries from HEAD reflog
  reflog test: add more tests for 'reflog delete'
  Documentation: rev-list-options: Fix -g paragraph formatting

Conflicts:
	Documentation/user-manual.txt
2008-08-11 00:53:31 -07:00
Junio C Hamano 55beff4f53 Fix deleting reflog entries from HEAD reflog
dwim_ref() used to resolve HEAD symbolic ref to its target (i.e. current
branch).  This incorrectly removed the reflog entry from the current
branch when 'git reflog delete HEAD@{1}' was asked for.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-10 23:21:25 -07:00
Pieter de Bie 38881a9066 reflog test: add more tests for 'reflog delete'
This adds more tests for 'reflog delete' and marks it as
broken, as currently a call to 'git reflog delete HEAD@{1}'
deletes entries in the currently checked out branch's log,
not the HEAD log.

Noticed by John Wiegley

Signed-off-by: Pieter de Bie <pdebie@ai.rug.nl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-10 23:15:44 -07:00
Junio C Hamano a9fd1383a7 mailinfo: fix MIME multi-part message boundary handling
After finding a MIME multi-part message boundary line, the handle_body()
function is supposed to first flush any accumulated contents from the
previous part to the output stream.  However, the code mistakenly output
the boundary line it found.

The old code that used one global, fixed-length buffer line[] used an
alternate static buffer newline[] for keeping track of this accumulated
contents and flushed newline[] upon seeing the boundary; when 3b6121f
(git-mailinfo: use strbuf's instead of fixed buffers, 2008-07-13)
converted a fixed-length buffer in this program to use strbuf,these two
buffers were converted to "line" and "prev" (the latter of which now has a
much more sensible name) strbufs, but the code mistakenly flushed "line"
(which contains the boundary we have just found), instead of "prev".

This resulted in the first boundary to be output in front of the first
line of the message.

The rewritten implementation of handle_boundary() lost the terminating
newline; this would then result in the second line of the message to be
stuck with the first line.

The is_multipart_boundary() was designed to catch both the internal
boundary and the terminating one (the one with trailing "--"); this also
was broken with the rewrite, and the code in the handle_boundary() to
handle the terminating boundary was never triggered.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-09 01:26:35 -07:00
Johannes Schindelin abc5d372ec Enable parallel tests
On multiprocessor machines, or with I/O heavy tests (that leave the
CPU waiting a lot), it makes sense to parallelize the tests.

However, care has to be taken that the different jobs use different
trash directories.

This commit does so, by creating the trash directories with a suffix
that is unique with regard to the test, as it is the test's base name.

Further, the trash directory is removed in the test itself if
everything went fine, so that the trash directories do not
pile up only to be removed at the very end.

If a test failed, the trash directory is not removed.  Chances are
that the exact error message is lost in the clutter, but you can still
see what test failed from the name of the trash directory, and repeat
the test (without -j).

If all was good, you will see the aggregated results.

Suggestions to simplify this commit came from Junio and René.

There still is an issue with tests that want to run a server process and
listen to a fixed port (http and svn) --- they cannot run in parallel but
this patch does not address this issue.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-08 22:24:28 -07:00
Johannes Schindelin e3df89a4b1 tests: Clarify dependencies between tests, 'aggregate-results' and 'clean'
The Makefile targets 'aggregate-results' and 'clean' pretended to be
independent.  This is not true, of course, since aggregate-results
needs the results _before_ they are removed.

Likewise, the tests should have been run already when the results are
to be aggregated.

However, as it is legitimate to run only a few tests, and then aggregate
just those results, so another target is introduced, that depends on all
tests, then aggregates the results, and only then removes the results.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-08 18:52:28 -07:00
Johannes Schindelin ff30fff38c t9700: remove useless check
t9700 used to check if the basename of the current directory is
'trash directory', the expensive way.

However, there is absolutely no good reason why this test should not
run in, say 'life is good' or 'i love tests'.  So remove the check
altogether.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-08 18:52:20 -07:00
Marcus Griep 570d35c26d git-svn: Allow deep branch names by supporting multi-globs
Some repositories use a deep branching strategy, such as:

    branches/1.0/1.0.rc1
    branches/1.0/1.0.rc2
    branches/1.0/1.0.rtm
    branches/1.0/1.0.gold

Only allowing a single glob stiffles this.

This change allows for a single glob 'set' to accept this deep
branching strategy.

The ref glob depth must match the branch glob depth.  When using
the -b or -t options for init or clone, this is automatically
done.

For example, using the above branches:

  svn-remote.svn.branches = branches/*/*:refs/remote/*/*

gives the following branch names:

  1.0/1.0.rc1
  1.0/1.0.rc2
  1.0/1.0.rtm
  1.0/1.0.gold

[ew:
  * removed unrelated line-wrapping changes
  * fixed line-wrapping in a few more places
  * removed trailing whitespace
  * fixed bashism in test
  * removed unnecessary httpd startup in test
  * changed copyright on tests to 2008 Marcus Griep
  * added executable permissions to new tests
]

Signed-off-by: Marcus Griep <marcus@griep.us>
Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-08 16:29:56 -07:00
Marcus Griep b47ddefe02 Fix multi-glob assertion in git-svn
Fixes bad regex match check for multiple globs (would always return
one glob regardless of actual number).

[ew: fixed a bashism in the test and some minor line-wrapping]

Signed-off-by: Marcus Griep <marcus@griep.us>
Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-08 16:23:32 -07:00
Johannes Schindelin 468386a956 clone --mirror: avoid storing repeated tags
With --mirror, clone asks for refs/* already, so it does not need to
ask for ref/tags/*, too.

Noticed by Cesar Eduardo Barros.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-07 21:25:27 -07:00
Junio C Hamano f44bc33c72 Sync with 1.5.6.5 2008-08-06 13:50:48 -07:00
Junio C Hamano dbd0f5c769 Files given on the command line are relative to $cwd
When running "git commit -F file" and "git tag -F file" from a
subdirectory, we should take it as relative to the directory we started
from, not relative to the top-level directory.

This adds a helper function "parse_options_fix_filename()" to make it more
convenient to fix this class of issues.  Ideally, parse_options() should
support a new type of option, "OPT_FILENAME", to do this uniformly, but
this patch is meant to go to 'maint' to fix it minimally.

One thing to note is that value for "commit template file" that comes from
the command line is taken as relative to $cwd just like other parameters,
but when it comes from the configuration varilable 'commit.template', it
is taken as relative to the working tree root as before.  I think this
difference actually is sensible (not that I particularly think
commit.template itself is sensible).

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-06 13:38:18 -07:00
Eric Wong 80828488cc t9119: conditionally re-enable test depending on svn(1) version
I've tested this with svn 1.4.4

This also adds quoting to make it work odd characters
in the trash path.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-05 21:21:19 -07:00
David D. Kilzer d9042a0ac4 Fix race condition in t9119-git-svn-info.sh
Changed the ptouch bash function to use the "Text Last Updated"
date reported by 'svn info' when changing the modified time
(mtime) of the file/symlink/directory in the git working
directory.  Previously it used the mtime of the item in the
svn working directory, which caused the race condition.

[ew: swapped argument order of ptouch() to minimize diff]

From: David D. Kilzer <ddkilzer@kilzer.net>

Signed-off-by: David D. Kilzer <ddkilzer@kilzer.net>
Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-05 21:21:19 -07:00
Junio C Hamano 725b06050a add: refuse to add working tree items beyond symlinks
This is the same fix for the issue of adding "sym/path" when "sym" is a
symblic link that points at a directory "dir" with "path" in it.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-04 23:31:23 -07:00
Junio C Hamano 806d13b1cc update-index: refuse to add working tree items beyond symlinks
When "sym" is a symbolic link that is inside the working tree, and it
points at a directory "dir" that has "path" in it, "update-index --add
sym/path" used to mistakenly add "sym/path" as if "sym" were a normal
directory.

"git apply", "git diff" and "git merge" have been taught about this issue
some time ago, but "update-index" and "add" have been left ignorant for
too long.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-04 23:31:23 -07:00
Dmitry Potapov fba5279db9 correct access right for git-svn-dcommit test
The tests requires anonymous write access. Therefore, "anon-access =
write" is added to conf/svnserve.conf. But because it was added to
the end of the file, it is impossible to guarantee in what section
it will be located. It turned out that on SVN 1.5, it was placed in
the wrong section and as result the test failed.

Signed-off-by: Dmitry Potapov <dpotapov@gmail.com>
Tested-by: Brad King <brad.king@kitware.com>
Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-04 21:53:45 -07:00
Anders Melchiorsen 2c3766f06a Flush output in start_async
This prevents double output in case stdout is redirected.

Signed-off-by: Anders Melchiorsen <mail@cup.kalibalik.dk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-03 17:55:40 -07:00
Junio C Hamano 6534703059 Topo-sort before --simplify-merges
This makes the algorithm more honest about what it is doing.

We start from an already limited, topo-sorted list, and postprocess
it by simplifying the irrelevant merges away.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-03 17:47:16 -07:00
Johannes Schindelin 6612f877cc clone --bare: Add ".git" suffix to the directory name to clone into
We have a tradition that bare repositories live in directories ending
in ".git".  To make this more a convention than just a tradition, teach
"git clone --bare" to add a ".git" suffix to the directory name.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-03 14:05:55 -07:00
Dmitry Potapov 4a3d85dcf6 add --no-filters option to git hash-object
The new option allows the contents to be hashed as is, ignoring any input
filter that would have been chosen by the attributes mechanism.

This option is incompatible with --path and --stdin-paths options.

Signed-off-by: Dmitry Potapov <dpotapov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-03 13:38:22 -07:00
Dmitry Potapov 3970243150 add --path option to git hash-object
The --path option allows us to pretend as if the contents being hashed
came from the specified path, and affects which input filter is used via
the attributes mechanism.  This is useful for hashing a temporary file
whose name is different from the path that is meant to have the hashed
contents.

Signed-off-by: Dmitry Potapov <dpotapov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-03 13:33:06 -07:00
Dmitry Potapov 81014073f2 correct argument checking test for git hash-object
Because the file name given to stdin did not exist, git hash-object
fails to open it and exits with non-zero error code.

Thus the test may pass even if there is an error in argument checking.

Signed-off-by: Dmitry Potapov <dpotapov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-03 13:22:57 -07:00
Johannes Schindelin bc699afcce clone: Add an option to set up a mirror
The command line

	$ git clone --mirror $URL

is now a short-hand for

	$ git clone --bare $URL
	$ (cd $(basename $URL) && git remote add --mirror origin $URL)

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-02 15:21:59 -07:00
Brandon Casey 734a6ffafb t/t4202-log.sh: add newline at end of file
Some shells hang when parsing the script if the last statement is not
followed by a newline. So add one.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-01 23:15:02 -07:00
Johannes Schindelin 11ee57bc4c sort_in_topological_order(): avoid setting a commit flag
We used to set the TOPOSORT flag of commits during the topological
sorting, but we can just as well use the member "indegree" for it:
indegree is now incremented by 1 in the cases where the commit used
to have the TOPOSORT flag.

This is the same behavior as before, since indegree could not be
non-zero when TOPOSORT was unset.

Incidentally, this fixes the bug in show-branch where the 8th column
was not shown: show-branch sorts the commits in topological order,
assuming that all the commit flags are available for show-branch's
private matters.

But this was not true: TOPOSORT was identical to the flag corresponding
to the 8th ref.  So the flags for the 8th column were unset by the
topological sorting.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-01 23:14:22 -07:00
Steve Haslam 31f4e768a4 Propagate -u/--upload-pack option of "git clone" to transport.
The -u option to override the remote system's path to git-upload-pack was
being ignored by "git clone"; caused by a missing call to
transport_set_option to set TRANS_OPT_UPLOADPACK. Presumably this crept in
when git-clone was converted from shell to C.

Signed-off-by: Steve Haslam <shaslam@lastminute.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-01 22:49:25 -07:00
Junio C Hamano b2a5627651 make sure parsed wildcard refspec ends with slash
A wildcard refspec is internally parsed into a refspec structure with src
and dst strings.  Many parts of the code assumed that these do not include
the trailing "/*" when matching the wildcard pattern with an actual ref we
see at the remote.  What this meant was that we needed to make sure not
just that the prefix matched, and also that a slash followed the part that
matched.

But a codepath that scans the result from ls-remote and finds matching
refs forgot to check the "matching part must be followed by a slash" rule.
This resulted in "refs/heads/b1" from the remote side to mistakenly match
the source side of "refs/heads/b/*:refs/remotes/b/*" refspec.

Worse, the refspec crafted internally by "git-clone", and a hardcoded
preparsed refspec that is used to implement "git-fetch --tags", violated
this "parsed widcard refspec does not end with slash" rule; simply adding
the "matching part must be followed by a slash" rule then would have
broken codepaths that use these refspecs.

This commit changes the rule to require a trailing slash to parsed
wildcard refspecs.  IOW, "refs/heads/b/*:refs/remotes/b/*" is parsed as
src = "refs/heads/b/" and dst = "refs/remotes/b/".  This allows us to
simplify the matching logic because we only need to do a prefixcmp() to
notice "refs/heads/b/one" matches and "refs/heads/b1" does not.

Acked-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-01 22:41:15 -07:00
Jeff King d65d2b2fb4 init: handle empty "template" parameter
If a user passes "--template=", then our template parameter
is blank. Unfortunately, copy_templates() assumes it has at
least one character, and does all sorts of bad things like
reading from template[-1] and then proceeding to link all of
'/' into the .git directory.

This patch just checks for that condition in copy_templates
and aborts. As a side effect, this means that --template=
now has the meaning "don't copy any templates."

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-01 22:41:07 -07:00
Jeff King fdc7c81111 Compact commit template message
We recently let the user know explicitly that an empty
commit message will abort the commit. However, this adds yet
another line to the template; let's rephrase and re-wrap so
that this fits back on two lines.

This patch also makes the "fatal: empty commit message?"
warning a bit less scary, since this is now a "feature"
instead of an error. However, we retain the non-zero exit
status to indicate to callers that nothing was committed.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-31 11:20:13 -07:00
Junio C Hamano c4aca9ccda Fix test-parse-options "integer" test
OPT_INTEGER() works on an integer, not on an unsigned long.  On a big
endian architecture with long larger than int, integer test gives bogus
results because of this bug.

Reported by H.Merijn Brand in HP-UX 64-bit environment.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-30 12:53:45 -07:00
Anders Melchiorsen bd2574ca69 Advertise the ability to abort a commit
This treats aborting a commit more like a feature.

Signed-off-by: Anders Melchiorsen <mail@cup.kalibalik.dk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-30 00:00:02 -07:00
Alexander Gavrilov ae7c5dcef9 Support copy and rename detection in fast-export.
Although it does not matter for Git itself, tools that
export to systems that explicitly track copies and
renames can benefit from such information.

This patch makes fast-export output correct action
logs when -M or -C are enabled.

Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-29 23:57:51 -07:00
Junio C Hamano a7a6692177 merge-base-many: add trivial tests based on the documentation
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-29 23:51:41 -07:00
Miklos Vajna dce61e728b Add a second testcase for handling invalid strategies in git-merge
This one tests '-s index' which is interesting because git-merge-index
is an existing git command but it is not a valid strategy.

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-29 23:21:36 -07:00
Miklos Vajna 1b1d78fe77 Add a new test for using a custom merge strategy
Testing is done by creating a simple git-merge-theirs strategy which is
the opposite of ours. Using this in real merges is not recommended but
it's perfect for our testing needs.

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-29 23:21:36 -07:00
Kevin Ballard 6b2fbaaffc format-patch: Produce better output with --inline or --attach
This patch makes two small changes to improve the output of --inline
and --attach.

The first is to write a newline preceding the boundary. This is needed because
MIME defines the encapsulation boundary as including the preceding CRLF (or in
this case, just LF), so we should be writing one. Without this, the last
newline in the pre-diff content is consumed instead.

The second change is to always write the line termination character
(default: newline) even when using --inline or --attach. This is simply to
improve the aesthetics of the resulting message. When using --inline an email
client should render the resulting message identically to the non-inline
version. And when using --attach this adds a blank line preceding the
attachment in the email, which is visually attractive.

Signed-off-by: Kevin Ballard <kevin@sb.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-29 23:18:15 -07:00
Junio C Hamano 65c35b2256 t7001: fix "git mv" test
The test assumed that we can keep the cached stat information fresh across
rename(2); many filesystems however update st_ctime (and POSIX allows them
to do so), and that assumption does not hold.

We can explicitly refresh the index for the purpose of these tests.  The
only thing we are interested in is the staged contents and the mode bits
are preserved across "git mv".

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-28 23:02:12 -07:00
Jeff King 172035f044 init: handle empty "template" parameter
If a user passes "--template=", then our template parameter
is blank. Unfortunately, copy_templates() assumes it has at
least one character, and does all sorts of bad things like
reading from template[-1] and then proceeding to link all of
'/' into the .git directory.

This patch just checks for that condition in copy_templates
and aborts. As a side effect, this means that --template=
now has the meaning "don't copy any templates."

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-27 23:14:03 -07:00
Petr Baudis 81dc2307d0 git-mv: Keep moved index entries inact
The rewrite of git-mv from a shell script to a builtin was perhaps
a little too straightforward: the git add and git rm queues were
emulated directly, which resulted in a rather complicated code and
caused an inconsistent behaviour when moving dirty index entries;
git mv would update the entry based on working tree state,
except in case of overwrites, where the new entry would still have
sha1 of the old file.

This patch introduces rename_index_entry_at() into the index toolkit,
which will rename an entry while removing any entries the new entry
might render duplicate. This is then used in git mv instead
of all the file queues, resulting in a major simplification
of the code and an inevitable change in git mv -n output format.

Also the code used to refuse renaming overwriting symlink with a regular
file and vice versa; there is no need for that.

A few new tests have been added to the testsuite to reflect this change.

Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-27 15:05:19 -07:00
Björn Steinbrink 2122f8b963 rev-parse: Add support for the ^! and ^@ syntax
Those shorthands are explained in the rev-parse documentation but were not
actually supported by rev-parse itself.

gitk internally uses rev-parse to interpret its command line arguments, and
being able to use these "limit with parents" syntax is handy there.

Signed-off-by: Björn Steinbrink <B.Steinbrink@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-27 14:14:01 -07:00
Junio C Hamano 47c6ef1c8d make sure parsed wildcard refspec ends with slash
A wildcard refspec is internally parsed into a refspec structure with src
and dst strings.  Many parts of the code assumed that these do not include
the trailing "/*" when matching the wildcard pattern with an actual ref we
see at the remote.  What this meant was that we needed to make sure not
just that the prefix matched, and also that a slash followed the part that
matched.

But a codepath that scans the result from ls-remote and finds matching
refs forgot to check the "matching part must be followed by a slash" rule.
This resulted in "refs/heads/b1" from the remote side to mistakenly match
the source side of "refs/heads/b/*:refs/remotes/b/*" refspec.

Worse, the refspec crafted internally by "git-clone", and a hardcoded
preparsed refspec that is used to implement "git-fetch --tags", violated
this "parsed widcard refspec does not end with slash" rule; simply adding
the "matching part must be followed by a slash" rule then would have
broken codepaths that use these refspecs.

This commit changes the rule to require a trailing slash to parsed
wildcard refspecs.  IOW, "refs/heads/b/*:refs/remotes/b/*" is parsed as
src = "refs/heads/b/" and dst = "refs/remotes/b/".  This allows us to
simplify the matching logic because we only need to do a prefixcmp() to
notice "refs/heads/b/one" matches and "refs/heads/b1" does not.

Acked-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-27 14:14:01 -07:00
Jonathan Nieder b890fa33a4 t6030 (bisect): work around Mac OS X "ls"
t6030-bisect-porcelain.sh relies on "ls" exiting with nonzero
status when asked to list nonexistent files.  Unfortunately,
/bin/ls on Mac OS X 10.3 exits with exit code 0.  So look at
its output instead.

Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
Acked-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-27 14:14:01 -07:00
Brad King 128de65767 git-svn: teach dcommit about svn auto-props
Subversion repositories often require files to have properties such as
svn:mime-type and svn:eol-style set when they are added.  Users
typically set these properties automatically using the SVN auto-props
feature with 'svn add'.  This commit teaches dcommit to look at the user
SVN configuration and apply matching auto-props entries for files added
by a diff as it is applied to the SVN remote.

Signed-off-by: Brad King <brad.king@kitware.com>
Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-25 17:54:19 -07:00
Steve Haslam 837c876713 Propagate -u/--upload-pack option of "git clone" to transport.
The -u option to override the remote system's path to git-upload-pack was
being ignored by "git clone"; caused by a missing call to
transport_set_option to set TRANS_OPT_UPLOADPACK. Presumably this crept in
when git-clone was converted from shell to C.

Signed-off-by: Steve Haslam <shaslam@lastminute.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-25 17:10:14 -07:00
Junio C Hamano d9d9e6ee63 Merge branch 'maint'
* maint:
  Makefile: fix shell quoting
  tests: propagate $(TAR) down from the toplevel Makefile
  index-pack.c: correctly initialize appended objects
  send-email: find body-encoding correctly
2008-07-25 13:56:36 -07:00
Junio C Hamano bfce5087ee Makefile: fix shell quoting
Makefile records paths to a few programs in GIT-BUILD-OPTIONS file.  These
paths need to be quoted twice: once to protect specials from the shell
that runs the generated GIT-BUILD-OPTIONS file, and again to protect them
(and the first level of quoting itself) from the shell that runs the
"echo" inside the Makefile.

You can test this by trying:

    $ ln -s /bin/tar "$HOME/Tes' program/tar"
    $ make TAR="$HOME/Tes' program/tar" test

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-25 12:36:16 -07:00
Junio C Hamano c30e699fc5 tests: propagate $(TAR) down from the toplevel Makefile
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-25 11:09:48 -07:00
Junio C Hamano 99ea66ec47 Merge branch 'ph/checkout'
* ph/checkout:
  git-checkout: improve error messages, detect ambiguities.
  git-checkout: fix command line parsing.
2008-07-24 23:24:17 -07:00
Pierre Habouzit 859fdabaed git-checkout: improve error messages, detect ambiguities.
The patch is twofold: it moves the option consistency checks just under
the parse_options call so that it doesn't get in the way of the tree
reference vs. pathspecs desambiguation.

The other part rewrites the way to understand arguments so that when
git-checkout fails it does with an understandable message. Compared to the
previous behavior we now have:

  - a better error message when doing:

        git checkout <blob reference> --

    now complains about the reference not pointing to a tree, instead of
    things like:

        error: pathspec <blob reference> did not match any file(s) known to git.
        error: pathspec '--' did not match any file(s) known to git.

  - a better error message when doing:

        git checkout <path> --

    It now complains about <path> not being a reference instead of the
    completely obscure:

        error: pathspec '--' did not match any file(s) known to git.

  - an error when -- wasn't used, and the first argument is ambiguous
    (i.e. can be interpreted as both ref and as path).

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-24 23:24:00 -07:00
Olivier Marin 9944d1a0e4 update test case to protect am --skip behaviour
Signed-off-by: Olivier Marin <dkr@freesurf.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-24 23:09:09 -07:00
Petr Baudis a4661b018d git-filter-branch.sh: Allow running in bare repositories
Commit 46eb449c restricted git-filter-branch to non-bare repositories
unnecessarily; git-filter-branch can work on bare repositories just
fine.

Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-23 16:57:04 -07:00
Stephan Beyer c8fe1980b2 git-am: Add colon before the subject that is printed out as being applied
git-am output can be confusing, because the subject of the applied
patch can look like the rest of a sentence starting with "Applying".
The added colon should make this clearer.

Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-23 12:31:37 -07:00
Johannes Schindelin e358f3c31e sort_in_topological_order(): avoid setting a commit flag
We used to set the TOPOSORT flag of commits during the topological
sorting, but we can just as well use the member "indegree" for it:
indegree is now incremented by 1 in the cases where the commit used
to have the TOPOSORT flag.

This is the same behavior as before, since indegree could not be
non-zero when TOPOSORT was unset.

Incidentally, this fixes the bug in show-branch where the 8th column
was not shown: show-branch sorts the commits in topological order,
assuming that all the commit flags are available for show-branch's
private matters.

But this was not true: TOPOSORT was identical to the flag corresponding
to the 8th ref.  So the flags for the 8th column were unset by the
topological sorting.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-23 12:00:21 -07:00
Johannes Schindelin ce567d1867 Add test to show that show-branch misses out the 8th column
Noticed by Pasky.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-23 11:52:21 -07:00
Brandon Casey c65233fe2c t/t4202-log.sh: add newline at end of file
Some shells hang when parsing the script if the last statement is not
followed by a newline. So add one.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-23 11:36:41 -07:00
Brandon Casey 09b78bc1fc t7502-commit.sh: rearrange test to make more portable
Some shells have problems with one-shot environment variable export
and function calls. The sequence is rearranged to avoid the one-shot
and to allow the test script to be linked together with '&&'.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-23 11:36:31 -07:00
Brandon Casey 03b9dfb18b t3200,t7201: replace '!' with test_must_fail
Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-23 11:35:23 -07:00
Brandon Casey 9a885fac0d t4116-apply-reverse.sh: use $TAR rather than tar
Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-23 11:35:16 -07:00
Brandon Casey 2b14d07237 t/: Replace diff [-u|-U0] with test_cmp to allow compilation with old diff
Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-23 11:35:01 -07:00
Miklos Vajna 4d175ef71d t7601: extend the 'merge picks up the best result' test
The test only checked if the best result picking code works if there are
multiple strategies set in the config. Add a similar one that tests if
the same true if the -s option of git merge was used multiple times.

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-23 11:33:40 -07:00
Olivier Marin 95f8ebbfc7 git am --skip: clean the index while preserving local changes
In 3-way merge, "am" will let the index with unmerged path waiting
for us to resolve conflicts and continue. But if we want to --skip
instead, "am" refuses to continue because of the dirty index.

With this patch, "am" will clean the index without touching files
locally modified, before continuing.

Signed-off-by: Olivier Marin <dkr@freesurf.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-22 00:06:04 -07:00
Miklos Vajna 1719b5e446 builtin-merge: give a proper error message for invalid strategies in config
'git merge -s foobar' diagnosed invalid "foobar" strategy and errored out
with a message, but foobar in pull.twohead or pull.octopus was just
silently ignored.  This makes invalid strategy both on the command line
and in the configuration file to trigger the same error.

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-21 22:29:46 -07:00
Junio C Hamano ac2e28c0a4 tests: do not rely on external "patch"
Some of our tests assumed a working "patch" command to produce expected
results when checking "git-apply", but some systems have broken "patch".

We can compare our output with expected output that is precomputed
instead to sidestep this issue.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-21 21:33:16 -07:00
Olivier Marin d5d745f90b parse-options: fix segmentation fault when a required value is missing
p->argc represent the number of arguments that have not been parsed yet,
_including_ the one we are currently parsing. If it is not greater than
one then there is no more argument.

Signed-off-by: Olivier Marin <dkr@freesurf.fr>
Acked-by: Pierre Habouzit <madcoder@debian.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-21 21:20:04 -07:00
Johannes Schindelin 51ef1daa4a Rename .git/rebase to .git/rebase-apply
With git-am, it sounds awkward to have the patches in ".git/rebase/",
but for technical reasons, we have to keep the same directory name
for git-am and git-rebase. ".git/rebase-apply" seems to be a good
compromise.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-21 18:51:47 -07:00
Junio C Hamano 245648dede Merge branch 'ns/am-abort'
* ns/am-abort:
  git am --abort
2008-07-20 18:00:13 -07:00
Junio C Hamano 378335b37c Merge branch 'jc/add-addremove'
* jc/add-addremove:
  git-add --all: documentation
  git-add --all: tests
  git-add --all: add all files
  builtin-add.c: restructure the code for maintainability

Conflicts:
	builtin-add.c
2008-07-20 17:53:17 -07:00
Junio C Hamano d14e7407b3 "needs update" considered harmful
"git update-index --refresh", "git reset" and "git add --refresh" have
reported paths that have local modifications as "needs update" since the
beginning of git.

Although this is logically correct in that you need to update the index at
that path before you can commit that change, it is now becoming more and
more clear, especially with the continuous push for user friendliness
since 1.5.0 series, that the message is suboptimal.  After all, the change
may be something the user might want to get rid of, and "updating" would
be absolutely a wrong thing to do if that is the case.

I prepared two alternatives to solve this.  Both aim to reword the message
to more neutral "locally modified".

This patch is a more intrusive variant that changes the message for only
Porcelain commands ("add" and "reset") while keeping the plumbing
"update-index" intact.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-20 17:21:32 -07:00
Junio C Hamano fa4946b553 Merge branch 'maint'
* maint:
  fix usage string for git grep
  refresh-index: fix bitmask assignment

Conflicts:
	builtin-grep.c
2008-07-20 17:16:29 -07:00
Michele Ballabio 74f5b7fba4 builtin-merge.c: Fix option parsing
Now "git merge -m" needs a message, and errors out with the usage
text if none is given.
This way, t7600-merge.sh is fixed.

Signed-off-by: Michele Ballabio <barra_cuda@katamail.com>
Acked-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-20 13:37:26 -07:00
Lars Noschinski b0f2ecf593 cvsserver: Add testsuite for packed refs
Check that req_update shows refs, even if all refs are packed.

Signed-off-by: Lars Noschinski <lars@public.noschinski.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-20 11:24:44 -07:00
Junio C Hamano 3f1b7b607a refresh-index: fix bitmask assignment
5fdeacb (Teach update-index about --ignore-submodules, 2008-05-14) added a
new refresh option flag but did not assign a unique bit for it correctly,
and broke "update-index --ignore-missing".

This fixes it.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-20 00:00:46 -07:00
Junio C Hamano 340ce9e25f git-add --all: tests
And here is a small test script that makes sure that:

 - both modified and new files are included,
 - removed file is noticed, and
 - no ignored file is included.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-19 23:08:58 -07:00
Nanako Shiraishi 3e5057a8b4 git am --abort
After failing to apply patches in the middle of a series, "git am --abort"
lets you go back to the original commit.

[jc: doc/help update from Olivier, and fixups for "am -3" squashed in]

Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
Signed-off-by: Olivier Marin <dkr@freesurf.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-19 15:26:28 -07:00
Junio C Hamano 679639904d Merge branch 'maint'
* maint:
  GIT 1.5.6.4
  builtin-rm: fix index lock file path
  http-fetch: do not SEGV after fetching a bad pack idx file
  rev-list: honor --quiet option
  api-run-command.txt: typofix
2008-07-19 11:28:06 -07:00
Alexander Gavrilov 03db4525d3 Support gitlinks in fast-import.
Currently fast-import/export cannot be used for
repositories with submodules. This patch extends
the relevant programs to make them correctly
process gitlinks.

Links can be represented by two forms of the
Modify command:

M 160000 SHA1 some/path

which sets the link target explicitly, or

M 160000 :mark some/path

where the mark refers to a commit. The latter
form can be used by importing tools to build
all submodules simultaneously in one physical
repository, and then simply fetch them apart.

Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-19 11:25:51 -07:00
Fabian Emmes 42f7a2dae8 testsuite for cvs co -c
Check that all branches are displayed.

Signed-off-by: Fabian Emmes <fabian.emmes@rwth-aachen.de>
Signed-off-by: Lars Noschinski <lars@public.noschinski.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-19 11:17:43 -07:00
Fabian Emmes 374488f31d Testsuite: Unset CVS_SERVER
The CVS_SERVER environment variable can cause some of the cvsimport tests
to fail. So unset this variable at the beginning of the test script.

Signed-off-by: Fabian Emmes <fabian.emmes@rwth-aachen.de>
Signed-off-by: Lars Noschinski <lars@public.noschinski.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-19 11:17:42 -07:00
Junio C Hamano bb3e4f03be t9001 (send-email): Do not use hardcoded /bin/sh in test
Scriptlets used form inside this test began with hardcoded "#!/bin/sh".
By setting SHELL_PATH the user is already telling us that what the vendor
has in /bin/sh isn't POSIX enough, and we really should try to honor that
request.

Originally noticed by SungHyun Nam who later tested this patch and
verified that it fixes the issue on Solaris 9.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-19 11:17:42 -07:00
Olivier Marin 4d26467279 builtin-rm: fix index lock file path
When hold_locked_index() is called with a relative git_dir and you are
outside the work tree, the lock file become relative to the current
directory. So when later setup_work_tree() change the current directory
it breaks lock file path and commit_locked_index() fails.

This patch move index locking code after setup_work_tree() call to make
lock file relative to the working tree as it should be and add a test
case.

Noticed by Nick Andrew.

Signed-off-by: Olivier Marin <dkr@freesurf.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-19 10:41:17 -07:00
Junio C Hamano 1f8dc67155 Merge branch 'mv/dashless'
* mv/dashless:
  make remove-dashes: apply to scripts and programs as well, not just to builtins
  git-bisect: use dash-less form on git bisect log
  t1007-hash-object.sh: use quotes for the test description
  t0001-init.sh: change confusing directory name
2008-07-16 17:49:59 -07:00
Junio C Hamano 588c038ac6 Merge branch 'sb/dashless'
* sb/dashless:
  Make usage strings dash-less
  t/: Use "test_must_fail git" instead of "! git"
  t/test-lib.sh: exit with small negagive int is ok with test_must_fail

Conflicts:
	builtin-blame.c
	builtin-mailinfo.c
	builtin-mailsplit.c
	builtin-shortlog.c
	git-am.sh
	t/t4150-am.sh
	t/t4200-rerere.sh
2008-07-16 17:22:50 -07:00
Junio C Hamano 88bbda08d7 Merge branch 'maint'
* maint:
  Start preparing 1.5.6.4 release notes
  git fetch-pack: do not complain about "no common commits" in an empty repo
  rebase-i: keep old parents when preserving merges
  t7600-merge: Use test_expect_failure to test option parsing
  Fix buffer overflow in prepare_attr_stack
  Fix buffer overflow in git diff
  Fix buffer overflow in git-grep
  git-cvsserver: fix call to nonexistant cleanupWorkDir()
  Documentation/git-cherry-pick.txt et al.: Fix misleading -n description

Conflicts:
	RelNotes
2008-07-16 17:10:28 -07:00
Junio C Hamano 614de95c76 Merge branch 'ls/maint-mailinfo-patch-label' into maint
* ls/maint-mailinfo-patch-label:
  git-mailinfo: Fix getting the subject from the in-body [PATCH] line
2008-07-16 15:23:19 -07:00
Johannes Sixt 01941bd543 t7600-merge: Use test_expect_failure to test option parsing
It used plain 'if git merge ...', which hides a segfault. The test does not pass.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-16 14:27:09 -07:00
SungHyun Nam dd33927ccd t/Makefile: use specified shell when running aggregation script
Signed-off-by: SungHyun Nam <goweol@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-16 08:59:14 -07:00
Junio C Hamano 300072f486 t/aggregate-results: whitespace fix
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-16 08:42:52 -07:00
Eric Wong 3901a8c866 t/lib-git-svn: fix SVN_HTTPD tests to work with "trash directory"
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-16 08:11:15 -07:00
Junio C Hamano fcab40a389 Merge branch 'mv/merge-in-c'
* mv/merge-in-c:
  reduce_heads(): protect from duplicate input
  reduce_heads(): thinkofix
  Add a new test for git-merge-resolve
  t6021: add a new test for git-merge-resolve
  Teach merge.log to "git-merge" again
  Build in merge
  Fix t7601-merge-pull-config.sh on AIX
  git-commit-tree: make it usable from other builtins
  Add new test case to ensure git-merge prepends the custom merge message
  Add new test case to ensure git-merge reduces octopus parents when possible
  Introduce reduce_heads()
  Introduce get_merge_bases_many()
  Add new test to ensure git-merge handles more than 25 refs.
  Introduce get_octopus_merge_bases() in commit.c
  git-fmt-merge-msg: make it usable from other builtins
  Move read_cache_unmerged() to read-cache.c
  Add new test to ensure git-merge handles pull.twohead and pull.octopus
  Move parse-options's skip_prefix() to git-compat-util.h
  Move commit_list_count() to commit.c
  Move split_cmdline() to alias.c

Conflicts:
	Makefile
	parse-options.c
2008-07-15 19:09:46 -07:00