1
0
mirror of https://github.com/git/git.git synced 2024-10-05 18:32:06 +02:00
Commit Graph

347 Commits

Author SHA1 Message Date
Junio C Hamano
5afa69b415 t4103: fix binary patch application test.
The generated binary patch was _not_ binary -- earlier I made
the --full-index flag to imply binary patch generation to the diff
machinery, but later we made it independent from --binary (although
the latter implies the former).

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-28 12:23:28 -07:00
Johannes Schindelin
e5a94313c0 Teach git-apply about '-R'
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-28 11:18:02 -07:00
Johannes Schindelin
a1dad607fa t7001: add test for git-mv dir1 dir2/
If dir2 already exists, git-mv should move dir1 _into_dir2/.
Noticed by Jon Smirl.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-26 12:24:49 -07:00
Junio C Hamano
b7a036bb5f t4112: simplify the test and remove unneeded working tree file.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-26 11:05:44 -07:00
Josef Weidendorfer
afd222967c Extend testing git-mv for renaming of subdirectories
Signed-off-by: Josef Weidendorfer <Josef.Weidendorfer@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-26 11:05:44 -07:00
Junio C Hamano
a8861ea81b Merge branch 'ew/apply'
* ew/apply:
  Fix t4114 on cygwin
  apply: handle type-changing patch correctly.
  apply: split out removal and creation into different phases.
  apply: check D/F conflicts more carefully.
  typechange tests for git apply (currently failing)
2006-07-25 12:50:23 -07:00
Alex Riesen
57c7d9a775 Trivial path optimization test
Linus:
    get_pathspec() does turn '.' into an empty string (which is
    correct - git internally does _not_ ever understand the notion of
    "." as the current working directory), but it doesn't ever do the
    optimization of noticing that a pathspec that consists solely of
    an empty string is "equivalent" to an empty pathspec.

The test is to ensure that this behaviour stays.

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-24 17:32:22 -07:00
Eric Wong
8641fb24ee typechange tests for git apply (currently failing)
I've found that git apply is incapable of handling patches
involving object type changes to the same path.

Of course git itself is perfectly capable of making commits that
generate these changes, as it only tracks trees states.  It's
just that the diffs between them are less useful if they can't
be applied.

Some of these are rare, but I've hit one of them (file becoming
a symlink) recently in real-world usage, and was inspired to
find more potential breakages :)

I'm not sure when I'll have time to fix these myself and I'm not
very familiar with the apply code.   So if someone could get
some or all of these cases working, they would be my hero :)

Some of these are what I would refer to as corner-cases from
hell.  Most (if not all) other systems fail some of these.  In
fact, they aren't even capable of representing most of these
changes in their histories; much less being able to handle
patches to that effect.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-16 22:15:21 -07:00
Junio C Hamano
855409296d Adjust t4013 tests to corrected format-patch.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-13 21:40:44 -07:00
Junio C Hamano
a40d384cac t4013 diff format tests update
This changes one test commit in the sequence to have more than
one lines of commit log.  A few output formats (--pretty=email
aka format-patch and --pretty=oneline) need to behave
differently on single and multi-line log, and this change will
help catching breakages.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-13 21:40:43 -07:00
Junio C Hamano
d3ba675aae Merge branch 'ml/trace'
* ml/trace:
  test-lib: unset GIT_TRACE
  GIT_TRACE: fix a mixed declarations and code warning
  GIT_TRACE: show which built-in/external commands are executed
2006-07-12 23:09:10 -07:00
Junio C Hamano
1d0361e806 test-lib: unset GIT_TRACE
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-12 23:09:00 -07:00
Junio C Hamano
e40e0135f2 Merge branch 'js/merge-base'
* js/merge-base:
  Additional merge-base tests (revised)
  merge-base: update the clean-up postprocessing
2006-07-12 22:44:59 -07:00
Eric Wong
8ff99e7417 tests: Set EDITOR=: and VISUAL=: globally
This way we don't have to remember to set it for each test; and
if we forget, we won't cause interactive editors to be spawned
for non-interactive tests.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-11 12:32:54 -07:00
Shawn Pearce
a3a733e63b Record the type of commit operation in the reflog.
If committing a merge (.git/MERGE_HEAD exists), an initial tree
(no HEAD) or using --amend to amend the prior commit then denote
the subtype of commit in the reflog.  This helps to distinguish
amended or merge commits from normal commits.

In the case of --amend the prior sha1 is probably the commit which
is being thrown away in favor of the new commit.  Since it is likely
that the old commit doesn't have any ref pointing to it anymore
it can be interesting to know why that the commit was replaced
and orphaned.

In the case of a merge the prior sha1 is probably the first parent
of the new merge commit.  Consequently having its prior sha1 in the
reflog is slightly less interesting but its still informative to
know the commit was the result of a merge which had to be completed
by hand.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-10 21:21:16 -07:00
Pavel Roskin
82e5a82fd7 Fix more typos, primarily in the code
The only visible change is that git-blame doesn't understand
"--compability" anymore, but it does accept "--compatibility" instead,
which is already documented.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-10 00:36:44 -07:00
A Large Angry SCM
cd6f207a44 Additional merge-base tests (revised)
Signed-off-by: A Large Angry SCM <gitzilla@gmail.com>
2006-07-09 03:38:12 -07:00
Junio C Hamano
4b832e819d git-svn: migrate out of contrib (follow-up)
Check for SVN::Core so test 910[45] don't fail if the user
doesn't have those installed.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-07 03:17:59 -07:00
Eric Wong
60d02ccc18 git-svn: migrate out of contrib
Allow NO_SVN_TESTS to be defined to skip git-svn tests.  These
tests are time-consuming due to SVN being slow, and even more so
if SVN Perl libraries are not available.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-06 17:02:47 -07:00
Junio C Hamano
a3d470c2d5 Merge branch 'jc/fmt-merge-msg-test'
* jc/fmt-merge-msg-test:
  t6200: fmt-merge-msg test.
2006-07-05 16:36:46 -07:00
Junio C Hamano
49b2788539 Merge branch 'jc/diff-test'
* jc/diff-test:
  t4013: add "diff" UI program tests.
2006-07-05 16:33:50 -07:00
Junio C Hamano
0c926a3d9c Merge branch 'th/diff'
* th/diff:
  builtin-diff: turn recursive on when defaulting to --patch format.
  t4013: note improvements brought by the new output code.
  t4013: add format-patch tests.
  format-patch: fix diff format option implementation
  combine-diff.c: type sanity.
  t4013 test updates for new output code.
  Fix some more diff options changes.
  Fix diff-tree -s
  log --raw: Don't descend into subdirectories by default
  diff-tree: Use ---\n as a message separator
  Print empty line between raw, stat, summary and patch
  t4013: add more tests around -c and --cc
  whatchanged: Default to DIFF_FORMAT_RAW
  Don't xcalloc() struct diffstat_t
  Add msg_sep to diff_options
  DIFF_FORMAT_RAW is not default anymore
  Set default diff output format after parsing command line
  Make --raw option available for all diff commands
  Merge with_raw, with_stat and summary variables to output_format
  t4013: add tests for diff/log family output options.
2006-07-05 16:31:24 -07:00
Eric Wong
4d62eaabeb t8001-annotate: fix a bash-ism in this test
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-04 02:55:52 -07:00
Junio C Hamano
30a95f3073 t6200: fmt-merge-msg test.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-03 19:12:43 -07:00
Junio C Hamano
280242d1cc send-email: do not barf when Term::ReadLine does not like your terminal
As long as we do not need to readline from the terminal, we
should not barf when starting up the program.  Without this
patch, t9001 test on Cygwin occasionally died with the following
error message:

Unable to get Terminal Size. The TIOCGWINSZ ioctl didn't work. The COLUMNS and LINES environment variables didn't work. The resize program didn't work. at /usr/lib/perl5/vendor_perl/5.8/cygwin/Term/ReadKey.pm line 362.
Compilation failed in require at /usr/lib/perl5/vendor_perl/5.8/Term/ReadLine/Perl.pm line 58.

Acked-by: Ryan Anderson <ryan@michonline.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-03 19:04:46 -07:00
Ryan Anderson
f560069bc5 annotate: Support annotation of files on other revisions.
This is a bug fix, and cleans up one or two other things spotted during the
course of tracking down the main bug here.

Also, the test-suite is updated to reflect this case.

Signed-off-by: Ryan Anderson <ryan@michonline.com>
(cherry picked from 2f7554b4db3ab2c2d3866b160245c91c9236fc9a commit)
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-03 18:41:58 -07:00
Junio C Hamano
b319b02e2a t4013: add "diff" UI program tests.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-01 22:02:17 -07:00
Junio C Hamano
026625e78e t4013: note improvements brought by the new output code.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-29 12:07:27 -07:00
Junio C Hamano
6adc876016 Merge branch 'jc/diff-test' into jc/diff-test-updates
* jc/diff-test:
  t4013: add format-patch tests.
2006-06-29 11:52:33 -07:00
Junio C Hamano
d410e43b35 t4013: add format-patch tests.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-29 00:28:30 -07:00
Junio C Hamano
f38c2a9c99 Merge branch 'js/patch'
* js/patch:
  diff.c: fix get_patch_id()
  t4014: fix test commit labels.
  format-patch: use clear_commit_marks() instead of some ad-hockery
  t4014: fix for whitespace from "wc -l"
  t4014: add format-patch --ignore-if-in-upstream test
  format-patch: introduce "--ignore-if-in-upstream"
  add diff_flush_patch_id() to calculate the patch id
2006-06-28 23:42:40 -07:00
Junio C Hamano
982b64e4cc t4014: fix test commit labels.
The commit tag and commit comments used in the test claimed that
the #1 commit was merged upstream where the test actually let the
upstream merge #2 commit.  Fix them.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-28 22:48:34 -07:00
Junio C Hamano
abc0267016 checkout -m: fix read-tree invocation
When we updated "read-tree -m -u" to be careful about not
removing untracked working tree files, we broke "checkout -m" to
switch between branches.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-28 19:30:51 -07:00
Junio C Hamano
8f4a9b62ee t/README: start testing porcelainish
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-28 11:45:52 -07:00
Junio C Hamano
9e76bab14e t4013 test updates for new output code.
These are updates to the test vector that shows the "incompatibility" of
the new output code.  The changes are actually the good ones, so instead
of keeping the older output we adjust the test to the new code.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-27 15:36:19 -07:00
Johannes Schindelin
8780bd8fd2 t4014: fix for whitespace from "wc -l"
Some "wc" insist on putting a TAB in front of the number.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-27 10:55:33 -07:00
Junio C Hamano
47979d5d5b t4013: add more tests around -c and --cc
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-26 23:29:11 -07:00
Junio C Hamano
ece3c67f9c t4014: add format-patch --ignore-if-in-upstream test
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-26 15:40:09 -07:00
Junio C Hamano
3c2f75b590 t4013: add tests for diff/log family output options.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-26 14:36:40 -07:00
Eric Wong
d5e673b60b rebase: allow --skip to work with --merge
Now that we control the merge base selection, we won't be forced
into rolling things in that we wanted to skip beforehand.

Also, add a test to ensure this all works as intended.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-25 00:38:34 -07:00
Eric Wong
9a99c087da rebase: allow --merge option to handle patches merged upstream
Enhance t3401-rebase-partial to test with --merge as well as
the standard am -3 strategy.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-25 00:38:34 -07:00
Junio C Hamano
160a59f326 Merge branch 'ew/rebase' into next
* ew/rebase:
  rebase: error out for NO_PYTHON if they use recursive merge
  Add renaming-rebase test.
  rebase: Allow merge strategies to be used when rebasing
  object-refs: avoid division by zero
2006-06-21 03:56:41 -07:00
Eric Wong
693c15dc28 rebase: error out for NO_PYTHON if they use recursive merge
recursive merge relies on Python, and we can't perform
rename-aware merges without the recursive merge.  So bail out
before trying it.

The test won't work w/o recursive merge, either, so skip that,
too.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-21 03:56:30 -07:00
Junio C Hamano
c3fb0e358e Add renaming-rebase test.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-21 03:56:29 -07:00
Junio C Hamano
b19beecd94 Merge branch 'lt/objlist' into next
* lt/objlist:
  Add "named object array" concept
  xdiff: minor changes to match libxdiff-0.21
  fix rfc2047 formatter.
  Fix t8001-annotate and t8002-blame for ActiveState Perl
  Add specialized object allocator
2006-06-19 18:47:29 -07:00
Dennis Stosberg
0e26f7a1c3 Fix t8001-annotate and t8002-blame for ActiveState Perl
There seems to be at least one implementation of Perl which requires the
user to specify an extension for backup files.

Reported by Alex Riesen.

Signed-off-by: Dennis Stosberg <dennis@stosberg.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-19 18:43:20 -07:00
Johannes Schindelin
9c3796fc04 Fix setting config variables with an alternative GIT_CONFIG
When setting a config variable, git_config_set() ignored the variables
GIT_CONFIG and GIT_CONFIG_LOCAL. Now, when GIT_CONFIG_LOCAL is set, it
will write to that file. If not, GIT_CONFIG is checked, and only as a
fallback, the change is written to $GIT_DIR/config.

Add a test for it, and also future-proof the test for the upcoming
$HOME/.gitconfig support.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-19 17:30:34 -07:00
Dennis Stosberg
476a4dfc05 Make t8001-annotate and t8002-blame more portable
These two tests assume that "sed" will not modify the final line of a
stream if it does not end with a newline character.  The assumption is
not true at least for FreeBSD and Solaris 9.  FreeBSD's "sed" appends
a newline character; "sed" in Solaris 9 even removes the incomplete
final line.  This patch makes the test use perl instead.

Signed-off-by: Dennis Stosberg <dennis@stosberg.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-18 13:58:20 -07:00
Junio C Hamano
75c3a5ccdf Merge branch 'jc/rw-prefix'
* jc/rw-prefix:
  read-tree: reorganize bind_merge code.
  write-tree: --prefix=<path>
  read-tree: --prefix=<path>/ option.
2006-06-17 17:56:52 -07:00
Junio C Hamano
4839c0b5fa t5100: mailinfo and mailsplit tests.
Currently the test passes with 1.3.3 but not with the tip of
"master".  This is to verify the fixes from Eric W Biedermann.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-17 16:26:20 -07:00