summaryrefslogtreecommitdiff
path: root/t
AgeCommit message (Collapse)AuthorFilesLines
2009-11-20Merge branch 'jp/fetch-cull-many-refs'Libravatar Junio C Hamano1-0/+11
* jp/fetch-cull-many-refs: remote: fix use-after-free error detected by glibc in ref_remove_duplicates fetch: Speed up fetch of large numbers of refs remote: Make ref_remove_duplicates faster for large numbers of refs
2009-11-20describe: do not use unannotated tag even if exact matchLibravatar Thomas Rast1-0/+6
4d23660 (describe: when failing, tell the user about options that work, 2009-10-28) forgot to update the shortcut path where the code detected and used a possible exact match. This means that an unannotated tag on HEAD would be used by 'git describe'. Guard this code path against the new circumstances, where unannotated tags can be present in ->util even if we're not actually planning to use them. While there, also add some tests for --all. Reported by 'yashi' on IRC. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-17Merge branch 'sb/tutorial-test'Libravatar Junio C Hamano1-61/+159
* sb/tutorial-test: t1200: prepare for merging with Fast-forward bikeshedding t1200: further modernize test script style t1200: Make documentation and test agree t1200: cleanup and modernize test style
2009-11-17Merge git://git.bogomips.org/git-svnLibravatar Junio C Hamano6-60/+476
* git://git.bogomips.org/git-svn: Document git-svn's first-parent rule git svn: attempt to create empty dirs on clone+rebase git svn: add authorsfile test case for ~/.gitconfig git svn: read global+system config for clone+init git svn: handle SVN merges from revisions past the tip of the branch
2009-11-15git svn: attempt to create empty dirs on clone+rebaseLibravatar Eric Wong2-2/+87
We parse unhandled.log files for empty_dir statements and make a best effort attempt to recreate empty directories on fresh clones and rebase. This should cover the majority of cases where users work off a single branch or for projects where branches do not differ in empty directories. Since this cannot affect "normal" git commands like "checkout" or "reset", so users switching between branches in a single working directory should use the new "git svn mkdirs" command after switching branches. Signed-off-by: Eric Wong <normalperson@yhbt.net>
2009-11-15Merge branch 'js/maint-diff-color-words'Libravatar Junio C Hamano1-0/+20
* js/maint-diff-color-words: diff --color-words: bit of clean-up diff --color-words -U0: fix the location of hunk headers t4034-diff-words: add a test for word diff without context Conflicts: diff.c
2009-11-15Merge branch 'fc/doc-fast-forward'Libravatar Junio C Hamano4-6/+6
* fc/doc-fast-forward: Use 'fast-forward' all over the place Conflicts: builtin-merge.c
2009-11-15Merge branch 'jk/maint-add-p-empty'Libravatar Junio C Hamano1-0/+17
* jk/maint-add-p-empty: add-interactive: handle deletion of empty files
2009-11-14remote: fix use-after-free error detected by glibc in ref_remove_duplicatesLibravatar Julian Phillips1-0/+11
In ref_remove_duplicates, when we encounter a duplicate and remove it from the list we need to make sure that the prev pointer stays pointing at the last entry and also skip over adding the just freed entry to the string_list. Previously fetch could crash with: *** glibc detected *** git: corrupted double-linked list: ... Also add a test to try and catch problems with duplicate removal in the future. Acked-by: Nicolas Pitre <nico@fluxnic.net> Signed-off-by: Julian Phillips <julian@quantumfyre.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-14git svn: add authorsfile test case for ~/.gitconfigLibravatar Eric Wong1-0/+23
The commit for: git svn: read global+system config for clone+init Initially lacked a test case because the author was unable to reproduce it under his test environment, this adds it. Signed-off-by: Eric Wong <normalperson@yhbt.net>
2009-11-14git svn: handle SVN merges from revisions past the tip of the branchLibravatar Toby Allsopp3-58/+366
When recording the revisions that it has merged, SVN sets the top revision to be the latest revision in the repository, which is not necessarily a revision on the branch that is being merged from. When it is not on the branch, git-svn fails to add the extra parent to represent the merge because it relies on finding the commit on the branch that corresponds to the top of the SVN merge range. In order to correctly handle this case, we look for the maximum revision less than or equal to the top of the SVN merge range that is actually on the branch being merged from. [ew: This includes the following (squashed) commit to prevent errors during bisect:] Author: Toby Allsopp <toby.allsopp@navman.co.nz> Date: Fri Nov 13 09:48:39 2009 +1300 git-svn: add (failing) test for SVN 1.5+ merge with intervening commit This test exposes a bug in git-svn's handling of SVN 1.5+ mergeinfo properties. The problematic case is when there is some commit on an unrelated branch after the last commit on the merged-from branch. When SVN records the mergeinfo property, it records the latest revision in the whole repository, which, in the problematic case, is not on the branch it is merging from. To trigger the git-svn bug, we modify t9151 to include two SVN merges, the second of which has an intervening commit. The SVN dump was generated using SVN 1.6.6 (on Debian squeeze amd64). Signed-off-by: Toby Allsopp <toby.allsopp@navman.co.nz> Acked-by: Eric Wong <normalperson@yhbt.net>
2009-11-10Merge branch 'jk/maint-format-patch-p-suppress-stat'Libravatar Junio C Hamano1-0/+21
* jk/maint-format-patch-p-suppress-stat: format-patch: make "-p" suppress diffstat
2009-11-10Merge branch 'jk/maint-1.6.3-ls-files-i'Libravatar Junio C Hamano1-0/+8
* jk/maint-1.6.3-ls-files-i: ls-files: unbreak "ls-files -i"
2009-11-10Merge branch 'bg/merge-ff-only'Libravatar Junio C Hamano1-0/+41
* bg/merge-ff-only: Teach 'git merge' and 'git pull' the option --ff-only
2009-11-10Merge branch 'jp/dirty-describe'Libravatar Junio C Hamano1-0/+14
* jp/dirty-describe: Teach "git describe" --dirty option
2009-11-08format-patch: make "-p" suppress diffstatLibravatar Jeff King1-0/+21
Once upon a time, format-patch would use its default stat plus patch format only when no diff format was given on the command line. This meant that "format-patch -p" would suppress the stat and show just the patch. Commit 68daa64 changed this to keep the stat format when we had an "implicit" patch format, like "-U5". As a side effect, this meant that an explicit patch format was now ignored (because cmd_format_patch didn't know the reason that the format was set way down in diff_opt_parse). This patch unbreaks what 68daa64 did (while still preserving what 68daa64 was trying to do), reinstating "-p" to suppress the default behavior. We do this by parsing "-p" ourselves in format-patch, and noting whether it was used explicitly. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-06Merge branch 'jc/commit-s-subject-is-not-a-footer'Libravatar Junio C Hamano1-0/+9
* jc/commit-s-subject-is-not-a-footer: builtin-commit.c: fix logic to omit empty line before existing footers
2009-11-06builtin-commit.c: fix logic to omit empty line before existing footersLibravatar Junio C Hamano1-0/+9
"commit -s" used to add an empty line before adding S-o-b line only when the last line of the existing log message is not another S-o-b line, but c1e01b0 (commit: More generous accepting of RFC-2822 footer lines., 2009-10-28) introduced logic to omit this empty line when the message ends with a run of "footer" lines, to cover S-o-b's friends, e.g. Acked-by. However, the logic was overzealous and missed one corner case. A message that consists of a single line that begins with Token + colon, it can be mistaken as a S-o-b's friend. We do want an empty line in such a case. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-06t1200: prepare for merging with Fast-forward bikesheddingLibravatar Junio C Hamano1-2/+3
A tree-wide bikeshedding to replace "fast forward" into "fast-forward" is in 'master'. Since we want to keep this "test modernization" series mergeable also to the maintenance track, we would need to tweak the test to accept both old spellings and new spellings. Sigh... This kind of headache is the primary reason we try not to allow such a tree-wide bike-shedding, but the damage has already been done. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-06t1200: further modernize test script styleLibravatar Junio C Hamano1-18/+18
Instead of using bare "cmp", use "test_cmp". Output when the test is run with a -v option becomes easier to diagnose when something goes wrong because on saner platforms test_cmp uses "diff -u". There is no need to put an extra backslash to a line that ends with a '|' (i.e. the upstream of a pipe). Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-06t1200: Make documentation and test agreeLibravatar Stephen Boyd1-9/+88
There were some differences between t1200 and the gitcore-tutorial. Add missing tests for manually merging two branches, and use the same commands in both files. Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-06t1200: cleanup and modernize test styleLibravatar Stephen Boyd1-58/+76
Many parts of the tests in t1200 are run outside the test harness, circumventing the usefulness of -v and spewing messages to stdout when -v isn't used. Fix these problems by modernizing the test a bit. An extra test_done has existed since commit 6a74642 (git-commit --amend: two fixes., 2006-04-20) leading to the last 6 tests never being run. Remove it and teach the resolve merge test about fast-forward merges. Also fix the last test's incorrect find command and prune before checking for unpacked objects so we remove the unreachable conflict-marked blob. Finally, we remove the TODO notes, because fetch, push, and clone have their own tests since t1200 was introduced and we're not going to add them here 4 years later. Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-02Merge branch 'jn/show-normalized-refs'Libravatar Junio C Hamano1-0/+0
* jn/show-normalized-refs: t1402: Make test executable
2009-11-02t1402: Make test executableLibravatar Stephen Boyd1-0/+0
Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-30fixup tr/stash-format mergeLibravatar Junio C Hamano1-0/+18
2009-10-30Merge branch 'js/diff-verbose-submodule'Libravatar Junio C Hamano1-0/+260
* js/diff-verbose-submodule: add tests for git diff --submodule Add the --submodule option to the diff option family
2009-10-30Merge branch 'jn/show-normalized-refs'Libravatar Junio C Hamano1-0/+61
* jn/show-normalized-refs: check-ref-format: simplify --print implementation git check-ref-format --print Add tests for git check-ref-format Conflicts: Documentation/git-check-ref-format.txt
2009-10-30Teach 'git merge' and 'git pull' the option --ff-onlyLibravatar Björn Gustavsson1-0/+41
For convenience in scripts and aliases, add the option --ff-only to only allow fast-forwards (and up-to-date, despite the name). Disallow combining --ff-only and --no-ff, since they flatly contradict each other. Allow all other options to be combined with --ff-only (i.e. do not add any code to handle them specially), including the following options: * --strategy (one or more): As long as the chosen merge strategy results in up-to-date or fast-forward, the command will succeed. * --squash: I cannot imagine why anyone would want to squash commits only if fast-forward is possible, but I also see no reason why it should not be allowed. * --message: The message will always be ignored, but I see no need to explicitly disallow providing a redundant message. Acknowledgements: I did look at Yuval Kogman's earlier patch (107768 in gmane), mainly as shortcut to find my way in the code, but I did not copy anything directly. Signed-off-by: Björn Gustavsson <bgustavsson@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-30t915{0,1}: use $TEST_DIRECTORYLibravatar Jeff King2-2/+4
Because --root can put our trash directories elsewhere, using ".." may not always work. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-30Make t9150 and t9151 test scripts executableLibravatar Michael J Gruber2-0/+0
so that they can be run individually as (cd t && ./t9150-svk-mergetickets.sh) etc. just like all other test scripts. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-30ls-files: unbreak "ls-files -i"Libravatar Jeff King1-0/+8
Commit b5227d8 changed the behavior of "ls-files" with respect to includes, but accidentally broke the "-i" option The original behavior was: 1. if no "-i" is given, cull all results according to --exclude* 2. if "-i" is given, show the inverse of (1) The broken behavior was: 1. if no "-i" is given: a. for "-o", cull results according to --exclude* b. for index files, always show all 2. if "-i" is given: a. for "-o", shows the inverse of (1a) b. for index files, always show all The fixed behavior keeps the new (1b) behavior introduced by b5227d8, but fixes the (2b) behavior to show only ignored files, not all files. This patch also tweaks the documentation. The original text was somewhat obscure in the first place, but it is also now inaccurate (the relationship between (1b) and (2b) is not quite a "reverse"). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-30diff --color-words -U0: fix the location of hunk headersLibravatar Johannes Schindelin1-1/+1
Colored word diff without context lines firstly printed all the hunk headers among each other and then printed the diff. This was due to the code relying on getting at least one context line at the end of each hunk, where the colored words would be flushed (it is done that way to be able to ignore rewrapped lines). Noticed by Markus Heidelberg. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-30t4034-diff-words: add a test for word diff without contextLibravatar Markus Heidelberg1-0/+20
Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-28commit: More generous accepting of RFC-2822 footer lines.Libravatar David Brown1-0/+41
'git commit -s' will insert a blank line before the Signed-off-by line at the end of the message, unless this last line is a Signed-off-by line itself. Common use has other trailing lines at the ends of commit text, in the style of RFC2822 headers. Be more generous in considering lines to be part of this footer. If the last paragraph of the commit message reasonably resembles RFC-2822 formatted lines, don't insert that blank line. The new Signed-off-by line is still only suppressed when the author's existing Signed-off-by is the last line of the message. Signed-off-by: David Brown <davidb@quicinc.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-27add-interactive: handle deletion of empty filesLibravatar Jeff King1-0/+17
Usually we show deletion as a big hunk deleting all of the file's text. However, for files with no content, the diff shows just the 'deleted file mode ...' line. This patch cause "add -p" (and related commands) to recognize that line and explicitly ask about deleting the file. We only add the "stage this deletion" hunk for empty files, since other files will already ask about the big content deletion hunk. We could also change those files to simply display "stage this deletion", but showing the actual deleted content is probably what an interactive user wants. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-27Teach "git describe" --dirty optionLibravatar Jean Privat1-0/+14
With the --dirty option, git describe works on HEAD but append s"-dirty" iff the contents of the work tree differs from HEAD. E.g. $ git describe --dirty v1.6.5-15-gc274db7 $ echo >> Makefile $ git describe --dirty v1.6.5-15-gc274db7-dirty The --dirty option can also be used to specify what is appended, instead of the default string "-dirty". $ git describe --dirty=.mod v1.6.5-15-gc274db7.mod Many build scripts use `git describe` to produce a version number based on the description of HEAD (on which the work tree is based) + saying that if the build contains uncommitted changes. This patch helps the writing of such scripts since `git describe --dirty` does directly the intended thing. Three possiblities were considered while discussing this new feature: 1. Describe the work tree by default and describe HEAD only if "HEAD" is explicitly specified Pro: does the right thing by default (both for users and for scripts) Pro: other git commands that works on the work tree by default Con: breaks existing scripts used by the Linux kernel and other projects 2. Use --worktree instead of --dirty Pro: does what it says: "git describe --worktree" describes the work tree Con: other commands do not require a --worktree option when working on the work tree (it often is the default mode for them) Con: unusable with an optional value: "git describe --worktree=.mod" is quite unintuitive. 3. Use --dirty as in this patch Pro: makes sense to specify an optional value (what the dirty mark is) Pro: does not have any of the big cons of previous alternatives * does not break scripts * is not inconsistent with other git commands This patch takes the third approach. Signed-off-by: Jean Privat <jean@pryen.org> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-26git-svn: convert SVN 1.5+ / svnmerge.py svn:mergeinfo props to parentsLibravatar Sam Vilain1-0/+21
This feature is long overdue; convert SVN's merge representation to git's as revisions are imported. This works by converting the list of revisions in each line of the svn:mergeinfo into git revision ranges, and then checking the latest of each of these revision ranges for A) being new and B) now being completely merged. Signed-off-by: Sam Vilain <sam.vilain@catalyst.net.nz> Acked-by: Eric Wong <normalperson@yhbt.net>
2009-10-26git-svn: add test data for SVN 1.5+ merge, with script.Libravatar Sam Vilain3-0/+811
Dump generated with SVN 1.5.1 (on lenny amd64). This test should hopefully cover all but a few intermediate versions of the svnmerge.py script. Signed-off-by: Sam Vilain <sam.vilain@catalyst.net.nz> Acked-by: Eric Wong <normalperson@yhbt.net>
2009-10-26git-svn: convert SVK merge tickets to extra parentsLibravatar Sam Vilain1-0/+23
SVK is a simple case to start with, as its idea of merge parents matches git's one. When a svk:merge ticket is encountered, check each of the listed merged revisions to see if they are in the history of this commit; if not, then we have encountered a merge - record it. [ew: minor formatting cleanups] Signed-off-by: Sam Vilain <sam.vilain@catalyst.net.nz> Acked-by: Eric Wong <normalperson@yhbt.net>
2009-10-26git-svn: allow test setup script to support PERL env. varLibravatar Sam Vilain1-2/+3
Possibly the 'perl' in the PATH is not the one to be used for the tests; let PERL set in the environment select it. Signed-off-by: Sam Vilain <sam.vilain@catalyst.net.nz> Acked-by: Eric Wong <normalperson@yhbt.net>
2009-10-26git-svn: add test data for SVK merge, with script.Libravatar Sam Vilain2-0/+673
Dump generated with SVK 2.0.2 and SVN 1.5.1 (on lenny amd64). Signed-off-by: Sam Vilain <sam.vilain@catalyst.net.nz> Acked-by: Eric Wong <normalperson@yhbt.net>
2009-10-25Merge branch 'maint'Libravatar Junio C Hamano1-1/+1
* maint: t7800-difftool: fix the effectless GIT_DIFFTOOL_PROMPT test Work around option parsing bug in the busybox tar implementation
2009-10-24Use 'fast-forward' all over the placeLibravatar Felipe Contreras4-6/+6
It's a compound word. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-24t7800-difftool: fix the effectless GIT_DIFFTOOL_PROMPT testLibravatar Markus Heidelberg1-1/+1
GIT_DIFFTOOL_PROMPT doesn't have any effect if overridden with --prompt. Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-23Merge branch 'maint'Libravatar Junio C Hamano1-0/+2
* maint: Fix list of released versions in the toc document Do not fail "describe --always" in a tag-less repository
2009-10-23Merge branch 'jp/maint-send-email-fold' into maintLibravatar Junio C Hamano1-20/+74
* jp/maint-send-email-fold: git-send-email.perl: fold multiple entry "Cc:" and multiple single line "RCPT TO:"s
2009-10-23Merge branch 'pv/maint-add-p-no-exclude' into maintLibravatar Junio C Hamano1-0/+14
* pv/maint-add-p-no-exclude: git-add--interactive: never skip files included in index
2009-10-23add tests for git diff --submoduleLibravatar Jens Lehmann1-0/+260
Copied from the submodule summary test and changed to reflect the differences in the output of git diff --submodule. Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-23Do not fail "describe --always" in a tag-less repositoryLibravatar Junio C Hamano1-0/+2
This fixes a regression introduce by d68dc34 (git-describe: Die early if there are no possible descriptions, 2009-08-06). Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-21Merge branch 'maint'Libravatar Junio C Hamano2-35/+4
* maint: Document `delta` attribute in "git help attributes". Mark files in t/t5100 as UTF-8 Remove a left-over file from t/t5100