summaryrefslogtreecommitdiff
path: root/t
AgeCommit message (Collapse)Author
2006-10-27tests: merge-recursive is usable without PythonJunio C Hamano
Many tests still protected themselves with $no_python; there is no need to do so anymore. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-25Merge branch 'maint'Junio C Hamano
* maint: xdiff: Match GNU diff behaviour when deciding hunk comment worthiness of lines Update cherry documentation. Refer to git-rev-parse:Specifying Revisions from git.txt git-fetch.sh printed protocol fix RPM package re-classification. Documentation: note about contrib/. git-svn: fix symlink-to-file changes when using command-line svn 1.4.0 Set $HOME for selftests
2006-10-24Set $HOME for selftestsGerrit Pape
Set HOME environment variable to test trash directory and export for selftests. This fixes the git-svn selftests with nonexistent or not readable home, as found in at least one automated build system: http://buildd.debian.org/fetch.cgi?&pkg=git-core&ver=1%3A1.4.2.3-2&arch=alpha&stamp=1161537466&file=log Signed-off-by: Gerrit Pape <pape@smarden.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-20Merge branch 'maint'Junio C Hamano
* maint: git-apply: prepare for upcoming GNU diff -u format change.
2006-10-20git-apply: prepare for upcoming GNU diff -u format change.Linus Torvalds
The latest GNU diff from CVS emits an empty line to express an empty context line, instead of more traditional "single white space followed by a newline". Do not get broken by it. Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-19Merge branch 'js/diff'Junio C Hamano
* js/diff: Turn on recursive with --summary
2006-10-19Merge branch 'rs/zip'Junio C Hamano
* rs/zip: git-archive --format=zip: add symlink support git-archive --format=zip: use default version ID
2006-10-15clone: the given repository dir should be relative to $PWDYasushi SHOJI
the repository argument for git-clone should be relative to $PWD instead of the given target directory. The old behavior gave us surprising success and you need a few minute to know why it worked. GIT_DIR is already exported so no need to cd into $D. And this makes $PWD for git-fetch-pack, which is the actual command to take the given repository dir, the same as git-clone. Signed-off-by: Yasushi SHOJI <yashi@atmark-techno.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-13t4015: work-around here document problem on Cygwin.Junio C Hamano
Signed-off-by: Junio C Hamano <junio@twinsun.com>
2006-10-12diff: fix 2 whitespace issuesJohannes Schindelin
When whitespace or whitespace change was ignored, the function xdl_recmatch() returned memcmp() style differences, which is wrong, since it should return 0 on non-match. Also, there were three horrible off-by-one bugs, even leading to wrong hashes in the whitespace special handling. The issue was noticed by Ray Lehtiniemi. For good measure, this commit adds a test. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-08git-archive --format=zip: add symlink supportRene Scharfe
Add symlink support to ZIP file creation, and a few tests. This implementation sets the "version made by" field (creator_version) to Unix for symlinks, only; regular files and directories are still marked as originating from FAT/VFAT/NTFS. Also set "external file attributes" (attr2) to 0 for regular files and 16 for directories (FAT attribute), and to the file mode for symlinks. We could always set the creator_version to Unix and include the mode, but then Info-ZIP unzip would set the mode of the extracted files to *exactly* the value stored in attr2. The FAT trick makes it apply the umask instead. Note: FAT has no executable bit, so this information is not stored in the ZIP file. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-08test-lib: separate individual test better in verbose mode.Martin Waitz
When running tests with --verbose it is difficult to see where one test starts and where it ends because everything is printed in one big lump. Fix that by printing one single newline between each test. Signed-off-by: Martin Waitz <tali@admingilde.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-05Turn on recursive with --summaryJohannes Schindelin
This makes "git log/diff --summary" imply recursive behaviour, whose effect is summarized in one test output: --- a/t/t4013/diff.diff-tree_--pretty_--root_--summary_initial +++ b/t/t4013/diff.diff-tree_--pretty_--root_--summary_initial @@ -5,7 +5,7 @@ Date: Mon Jun 26 00:00:00 2006 +0000 Initial - create mode 040000 dir + create mode 100644 dir/sub create mode 100644 file0 create mode 100644 file2 $ When a file is created in a subdirectory, we used to say just the directory name only when that directory also was created, which did not make sense from two reasons. It is not any more significant to create a new file in a new directory than to create a new file in an existing directory, and even if it were, reportinging the new directory name without saying the actual filename is not useful. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-03Error in test description of t1200-tutorialRobin Rosenberg
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-02Merge branch 'maint'Junio C Hamano
* maint: git-push: .git/remotes/ file does not require SP after colon git-mv: invalidate the removed path properly in cache-tree
2006-10-02git-mv: invalidate the removed path properly in cache-treeJunio C Hamano
The command updated the cache without invalidating the cache tree entries while removing an existing entry. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-01Merge branch 'jc/gitpm'Junio C Hamano
* jc/gitpm: (52 commits) Remove -fPIC which was only needed for Git.xs Git.pm: Kill Git.xs for now Revert "Make it possible to set up libgit directly (instead of from the environment)" Revert "Git.pm: Introduce fast get_object() method" Revert "Convert git-annotate to use Git.pm" Fix compilation with Sun CC pass DESTDIR to the generated perl/Makefile Eliminate Scalar::Util usage from private-Error.pm Convert git-annotate to use Git.pm Git.pm: Introduce fast get_object() method Make it possible to set up libgit directly (instead of from the environment) Work around sed and make interactions on the backslash at the end of line. Git.pm: Introduce ident() and ident_person() methods Convert git-send-email to use Git.pm Git.pm: Add config() method Use $GITPERLLIB instead of $RUNNING_GIT_TESTS and centralize @INC munging INSTALL: a tip for running after building but without installing. Perly Git: make sure we do test the freshly built one. Git.pm: Don't #define around die Git.xs: older perl do not know const char * ...
2006-09-28Merge branch 'cc/branch-test'Junio C Hamano
* cc/branch-test: Remove empty ref directories that prevent creating a ref.
2006-09-28Merge branch 'sp/void'Junio C Hamano
* sp/void: Allow git-checkout when on a non-existant branch.
2006-09-28Merge branch 'jc/deprecate-recursive'Junio C Hamano
* jc/deprecate-recursive: Deprecate merge-recursive.py
2006-09-27Corrected copy-and-paste thinko in ignore executable bit test case.Shawn Pearce
This test should be testing update-index --add, not git-add as the latter is implemented in terms of the former. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-27An illustration of rev-list --parents --pretty=rawJunio C Hamano
This script creates two separate histories, A and B, each of which does: (A0, B0): create fileA and subdir/fileB (A1, B1): modify fileA (A2, B2): modify subdir/fileB and then grafts them together to make B0 a child of A2. So the final history looks like (time flows from top to bottom): true parent touches subdir? A0 none yes (creates it) A1 A0 no A2 A1 yes B0 none yes (different from what's in A2) B1 B0 no B2 B1 yes "git rev-list --parents --pretty=raw B2" would give "fake" parents on the "commit " header lines while "parent " header lines show the parent as recorded in the commit object (i.e. B0 appears to have A2 as its parent on "commit " header but there is no "parent A2" header line in it). When you have path limiters, we simplify history to omit commits that do not affect the specified paths. So "git rev-list --parents --pretty=raw B2 subdir" would return "B2 B0 A2 A0" (because B1 and A1 do not touch the path). When it does so, the "commit " header lines have "fake" parents (i.e. B2 appears to have B0 as its parent on "commit " header), but you can still get the true parents by looking at "parent " header. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-27Allow git-checkout when on a non-existant branch.Shawn Pearce
I've seen some users get into situtations where their HEAD symbolic-ref is pointing at a non-existant ref. (Sometimes this happens during clone when the remote repository lacks a 'master' branch.) If this happens the user is unable to use git-checkout to switch branches as there is no prior commit to merge from. So instead of giving the user low-level errors about how HEAD can't be resolved and how not a single revision was given change the type of checkout to be a force and go through with the user's request anyway. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-27Ignore executable bit when adding files if filemode=0.Shawn Pearce
If the user has configured core.filemode=0 then we shouldn't set the execute bit in the index when adding a new file as the user has indicated that the local filesystem can't be trusted. This means that when adding files that should be marked executable in a repository with core.filemode=0 the user must perform a 'git update-index --chmod=+x' on the file before committing the addition. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-26Remove empty ref directories that prevent creating a ref.Christian Couder
This patch also adds test cases from Linus and Junio. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-25Deprecate merge-recursive.pyJunio C Hamano
This renames merge-recursive written in Python to merge-recursive-old, and makes merge-recur as a synonym to merge-recursive. We do not remove merge-recur yet, but we will remove merge-recur and merge-recursive-old in a few releases down the road. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-24Add test for the default merges in fetch.Santi Béjar
[jc: with minor fix-ups] Signed-off-by: Santi Béjar <sbejar@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-24Add t5510 to test per branch configuration affecting git-fetch.Junio C Hamano
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-23Quote arguments to tr in test-libRobin Rosenberg
When there are single-character filenames in the test directory, the shell tries to expand regexps meant for tr. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-21Document receive.denyNonFastforwardsJohannes Schindelin
[jc: with a fix to config handling in t5400 test, which took annoyingly long to diagnose.] Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-17apply --unidiff-zero: loosen sanity checks for --unidiff=0 patchesJunio C Hamano
In "git-apply", we have a few sanity checks and heuristics that expects that the patch fed to us is a unified diff with at least one line of context. * When there is no leading context line in a hunk, the hunk must apply at the beginning of the preimage. Similarly, no trailing context means that the hunk is anchored at the end. * We learn a patch deletes the file from a hunk that has no resulting line (i.e. all lines are prefixed with '-') if it has not otherwise been known if the patch deletes the file. Similarly, no old line means the file is being created. And we declare an error condition when the file created by a creation patch already exists, and/or when a deletion patch still leaves content in the file. These sanity checks are good safety measures, but breaks down when people feed a diff generated with --unified=0. This was recently noticed first by Matthew Wilcox and Gerrit Pape. This adds a new flag, --unified-zero, to allow bypassing these checks. If you are in control of the patch generation process, you should not use --unified=0 patch and fix it up with this flag; rather you should try work with a patch with context. But if all you have to work with is a patch without context, this flag may come handy as the last resort. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-16t1400: make test debuggable.Junio C Hamano
I had a hard time figuring out why this test was failing with the packed-refs update without running it under "sh -x". This makes output from "sh t1400-update-ref.sh -v" more descriptive. Updating other tests would be a good janitorial task. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-07Make apply --binary a no-op.Junio C Hamano
Historically we did not allow binary patch applied without an explicit permission from the user, and this flag was the way to do so. This makes the flag a no-op by always allowing binary patch application. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-02Trace into a file or an open fd and refactor tracing code.Christian Couder
If GIT_TRACE is set to an absolute path (starting with a '/' character), we interpret this as a file path and we trace into it. Also if GIT_TRACE is set to an integer value greater than 1 and lower than 10, we interpret this as an open fd value and we trace into it. Note that this behavior is not compatible with the previous one. We also trace whole messages using one write(2) call to make sure messages from processes do net get mixed up in the middle. This patch makes it possible to get trace information when running "make test". Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-31t5710: fix two thinkos.Junio C Hamano
The intention of the test seems to be to build a long chain of clones that locally borrow objects from their parents and see the system give up dereferencing long chains. There were two problems: (1) it did not test the right repository; (2) it did not build a chain long enough to trigger the limitation. I do not think it is a good test to make sure the limitation the current implementation happens to have still exists, but that is a topic at a totally different level. At least this fixes the broken test. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-28Merge branch 'jc/apply'Junio C Hamano
* jc/apply: git-apply --reject: finishing touches. apply --reject: count hunks starting from 1, not 0 git-apply --verbose git-apply --reject: send rejects to .rej files. git-apply --reject apply --reverse: tie it all together. diff.c: make binary patch reversible. builtin-apply --reverse: two bugfixes.
2006-08-21Merge branch 'maint'Junio C Hamano
* maint: builtin-mv: readability patch git-mv: fix off-by-one error git-mv: special case destination "."
2006-08-21git-mv: special case destination "."Johannes Schindelin
Since the normalized basename of "." is "", the check for directory failed erroneously. Noticed by Fredrik Kuivinen. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-18git-apply --verboseJunio C Hamano
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-18git-apply --reject: send rejects to .rej files.Junio C Hamano
... just like everybody else does, instead of sending it to the standard output, which was just silly. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-17git-apply --rejectJunio C Hamano
With the new flag "--reject", hunks that do not apply are sent to the standard output, and the usable hunks are applied. The command itself exits with non-zero status when this happens, so that the user or wrapper can take notice and sort the remaining mess out. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-17apply --reverse: tie it all together.Junio C Hamano
Add a few tests, usage string, and documentation. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-16Merge branch 'maint'Junio C Hamano
* maint: finish_connect(): thinkofix git-mv: succeed even if source is a prefix of destination Solaris does not support C99 format strings before version 10
2006-08-16git-mv: succeed even if source is a prefix of destinationJohannes Schindelin
As noted by Fredrik Kuivinen, without this patch, git-mv fails on git-mv README README-renamed because "README" is a prefix of "README-renamed". Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-15Merge branch 'master' into pb/gitpmJunio C Hamano
* master: (166 commits) git-apply --binary: clean up and prepare for --reverse Fix detection of ipv6 on Solaris Look for sockaddr_storage in sys/socket.h Solaris has strlcpy() at least since version 8 git-apply --reverse: simplify reverse option. t4116 apply --reverse test Make sha1flush void and remove conditional return. Make upload_pack void and remove conditional return. Make track_tree_refs void. Make pack_objects void. Make fsck_dir void. Make checkout_all void. Make show_entry void Make pprint_tag void and cleans up call in cmd_cat_file. Remove combine-diff.c::uninteresting() read-cache.c cleanup http-push.c cleanup diff.c cleanup builtin-push.c cleanup builtin-grep.c cleanup ...
2006-08-15t4116 apply --reverse testJunio C Hamano
The binary patch test needs to be made more careful not to have the postimage blob in the repository in which the patch is applied Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-13Merge branch 'jc/grep'Junio C Hamano
2006-08-13t/t4013: fix futzing with the version string.Junio C Hamano
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-12git-grep: show pathnames relative to the current directoryJunio C Hamano
By default, the command shows pathnames relative to the current directory. Use --full-name (the same flag to do so in ls-files) if you want to see the full pathname relative to the project root. This makes it very pleasant to run in Emacs compilation (or "grep-find") buffer. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-10git-apply: applying a patch to make a symlink shorter.Junio C Hamano
The internal representation of the result is counted string (i.e. char *buf and ulong size), which is fine for writing out to regular file, but throwing the buf at symlink(2) was a no-no. Reported by Willy Tarreau. Signed-off-by: Junio C Hamano <junkio@cox.net>