summaryrefslogtreecommitdiff
path: root/t
AgeCommit message (Collapse)AuthorFilesLines
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-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-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-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-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
2009-10-21Mark files in t/t5100 as UTF-8Libravatar Johannes Sixt1-0/+4
This enables gitk to show the patch text with correct glyphs if the locale is not UTF-8. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-21Remove a left-over file from t/t5100Libravatar Johannes Sixt1-35/+0
This mbox file must have been added by accident in e9fe804 (git-mailinfo: Fix getting the subject from the in-body [PATCH] line, 2008-07-14). Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-19Introduce new pretty formats %g[sdD] for reflog informationLibravatar Thomas Rast1-0/+18
Add three new --pretty=format escapes: %gD long reflog descriptor (e.g. refs/stash@{0}) %gd short reflog descriptor (e.g. stash@{0}) %gs reflog message This is achieved by passing down the reflog info, if any, inside the pretty_print_context struct. We use the newly refactored get_reflog_selector(), and give it some extra functionality to extract a shortened ref. The shortening is cached inside the commit_reflogs struct; the only allocation of it happens in read_complete_reflog(), where it is initialised to 0. Also add another helper get_reflog_message() for the message extraction. Note that the --format="%h %gD: %gs" tests may not work in real repositories, as the --pretty formatter doesn't know to leave away the ": " on the last commit in an incomplete (because git-gc removed the old part) reflog. This equivalence is nevertheless the main goal of this patch. Thanks to Jeff King for reviews, the %gd testcase and documentation. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-19Merge branch 'bg/rebase-reword'Libravatar Junio C Hamano2-3/+17
* bg/rebase-reword: rebase -i: fix reword when using a terminal editor Teach 'rebase -i' the command "reword"
2009-10-18Merge branch 'jp/maint-send-email-fold'Libravatar 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-18Merge branch 'cc/replace-no-replace'Libravatar Junio C Hamano1-0/+7
* cc/replace-no-replace: git: add --no-replace-objects option to disable replacing
2009-10-18Merge branch 'jk/maint-1.6.3-ls-files-no-ignore-cached'Libravatar Junio C Hamano1-0/+32
* jk/maint-1.6.3-ls-files-no-ignore-cached: ls-files: excludes should not impact tracked files
2009-10-17Merge branch 'jc/maint-blank-at-eof'Libravatar Junio C Hamano3-3/+110
* jc/maint-blank-at-eof: diff -B: colour whitespace errors diff.c: emit_add_line() takes only the rest of the line diff.c: split emit_line() from the first char and the rest of the line diff.c: shuffling code around diff --whitespace: fix blank lines at end core.whitespace: split trailing-space into blank-at-{eol,eof} diff --color: color blank-at-eof diff --whitespace=warn/error: fix blank-at-eof check diff --whitespace=warn/error: obey blank-at-eof diff.c: the builtin_diff() deals with only two-file comparison apply --whitespace: warn blank but not necessarily empty lines at EOF apply --whitespace=warn/error: diagnose blank at EOF apply.c: split check_whitespace() into two apply --whitespace=fix: detect new blank lines at eof correctly apply --whitespace=fix: fix handling of blank lines at the eof
2009-10-17Merge branch 'maint'Libravatar Junio C Hamano1-0/+66
* maint: GIT 1.6.5.1 grep: do not segfault when -f is used
2009-10-16Merge branch 'maint-1.6.4' into maintLibravatar Junio C Hamano1-0/+66
* maint-1.6.4: grep: do not segfault when -f is used
2009-10-16grep: do not segfault when -f is usedLibravatar Matt Kraai1-0/+66
"git grep" would segfault if its -f option was used because it would try to use an uninitialized strbuf, so initialize the strbuf. Thanks to Johannes Sixt <j.sixt@viscovery.net> for the help with the test cases. Signed-off-by: Matt Kraai <kraai@ftbfs.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-14Merge branch 'pv/maint-add-p-no-exclude'Libravatar Junio C Hamano1-0/+14
* pv/maint-add-p-no-exclude: git-add--interactive: never skip files included in index
2009-10-14Merge branch 'maint'Libravatar Junio C Hamano1-0/+9
* maint: sha1_file: Fix infinite loop when pack is corrupted
2009-10-14sha1_file: Fix infinite loop when pack is corruptedLibravatar Shawn O. Pearce1-0/+9
Some types of corruption to a pack may confuse the deflate stream which stores an object. In Andy's reported case a 36 byte region of the pack was overwritten, leading to what appeared to be a valid deflate stream that was trying to produce a result larger than our allocated output buffer could accept. Z_BUF_ERROR is returned from inflate() if either the input buffer needs more input bytes, or the output buffer has run out of space. Previously we only considered the former case, as it meant we needed to move the stream's input buffer to the next window in the pack. We now abort the loop if inflate() returns Z_BUF_ERROR without consuming the entire input buffer it was given, or has filled the entire output buffer but has not yet returned Z_STREAM_END. Either state is a clear indicator that this loop is not working as expected, and should not continue. This problem cannot occur with loose objects as we open the entire loose object as a single buffer and treat Z_BUF_ERROR as an error. Reported-by: Andy Isaacson <adi@hexapodia.org> Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Acked-by: Nicolas Pitre <nico@fluxnic.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-13git: add --no-replace-objects option to disable replacingLibravatar Christian Couder1-0/+7
Commit dae556b (environment: add global variable to disable replacement) adds a variable to enable/disable replacement, and it is enabled by default for most commands. So there is no way to disable it for some commands, which is annoying when we want to get information about a commit that has been replaced. For example: $ git cat-file -p N would output information about the replacement commit if commit N is replaced. With the "--no-replace-objects" option that this patch adds it is possible to get information about the original commit using: $ git --no-replace-objects cat-file -p N While at it, let's add some documentation about this new option in the "git replace" man page too. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-12git check-ref-format --printLibravatar Junio C Hamano1-0/+17
Tolerating empty path components in ref names means each ref does not have a unique name. This creates difficulty for porcelains that want to see if two branches are equal. Add a helper associating to each ref a canonical name. If a user asks a porcelain to create a ref "refs/heads//master", the porcelain can run "git check-ref-format --print refs/heads//master" and only deal with "refs/heads/master" from then on. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-12Add tests for git check-ref-formatLibravatar Jonathan Nieder1-0/+44
The "git check-ref-format" command is a basic command various porcelains rely on. Test its functionality to make sure it does not unintentionally change. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-12Let --decorate show HEAD positionLibravatar Thomas Rast2-2/+2
'git log --graph --oneline --decorate --all' is a useful way to get a general overview of the repository state, similar to 'gitk --all'. Let it indicate the position of HEAD by loading that ref too, so that the --decorate code can see it. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-12ls-files: excludes should not impact tracked filesLibravatar Jeff King1-0/+32
In all parts of git, .gitignore and other exclude files impact only how we treat untracked files; they should have no effect on files listed in the index. This behavior was originally implemented very early on in 9ff768e, but only for --exclude-from. Later, commit 63d285c accidentally caused us to trigger the behavior for --exclude-per-directory. This patch totally ignores excludes for files found in the index. This means we are reversing the original intent of 9ff768e, while at the same time fixing the accidental behavior of 63d285c. This is a good thing, though, as the way that 9ff768e behaved does not really make sense with the way exclusions are used in modern git. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-10git-add--interactive: never skip files included in indexLibravatar Pauli Virtanen1-0/+14
Make "git add -p" to not skip files that are in index even if they are excluded (by .gitignore etc.). This fixes the contradictory behavior that "git status" and "git commit -a" listed such files as modified, but "git add -p FILENAME" ignored them. Signed-off-by: Pauli Virtanen <pav@iki.fi> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-09git-send-email.perl: fold multiple entry "Cc:" and multiple single line ↵Libravatar Joe Perches1-20/+74
"RCPT TO:"s Some MTAs reject Cc: lines longer than 78 chars. Avoid this by using the same join as "To:" ",\n\t" so each subsequent Cc entry is on a new line. RCPT TO: should have a single entry per line. see: http://www.ietf.org/rfc/rfc2821.txt Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-09Merge branch 'rs/maint-archive-prefix'Libravatar Junio C Hamano1-0/+12
* rs/maint-archive-prefix: Git archive and trailing "/" in prefix
2009-10-08Git archive and trailing "/" in prefixLibravatar René Scharfe1-0/+12
With --prefix=string that does not end with a slash, the top-level entries are written out with the specified prefix as expected, but no paths in the directories are added. Fix this by adding the prefix in write_archive_entry() instead of letting get_pathspec() and read_tree_recursive() pair; they are designed to only handle prefixes that are path components. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-07Teach 'rebase -i' the command "reword"Libravatar Björn Gustavsson2-3/+17
Make it easier to edit just the commit message for a commit using 'git rebase -i' by introducing the "reword" command. Signed-off-by: Björn Gustavsson <bgustavsson@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-04Merge branch 'maint'Libravatar Junio C Hamano1-0/+8
* maint: show-branch: fix segfault when showbranch.default exists
2009-10-04Merge branch 'jc/maint-1.6.4-show-branch-default' into maintLibravatar Junio C Hamano1-0/+8
* jc/maint-1.6.4-show-branch-default: show-branch: fix segfault when showbranch.default exists
2009-10-04show-branch: fix segfault when showbranch.default existsLibravatar Junio C Hamano1-0/+8
When running "git show-branch" without any parameter in a repository that has showbranch.default defined, we used to rely on the fact that our handcrafted option parsing loop never looked at av[0]. The array of default strings had the first real command line argument in default_arg[0], but the option parser wanted to look at the array starting at av[1], so we assigned the address of -1th element to av to force the loop start working from default_arg[0]. This no longer worked since 5734365 (show-branch: migrate to parse-options API, 2009-05-21), as parse_options_start() saved the incoming &av[0] in its ctx->out and later in parse_options_end() it did memmove to ctx->out (with ctx->cpidx == 0), overwriting the memory before default_arg[] array. I am not sure if this is a bug in parse_options(), or a bug in the caller, and tonight I do not have enough concentration to figure out which. In any case, this patch works the issue around. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-03Fix '--relative-date'Libravatar Johan Sageryd1-0/+1
This fixes '--relative-date' so that it does not give '0 year, 12 months', for the interval 360 <= diff < 365. Signed-off-by: Johan Sageryd <j416@1616.se> Signed-off-by: Jeff King <peff@peff.net>
2009-10-02tests: make all test files executableLibravatar Mark Rada2-0/+0
For consistency with the rest of the test files. Signed-off-by: Mark Rada <marada@uwaterloo.ca> Signed-off-by: Jeff King <peff@peff.net>
2009-09-29parse-opt: ignore negation of OPT_NONEG for ambiguity checksLibravatar Andreas Schwab1-0/+20
parse_long_opt always matches both --opt and --no-opt for any option "opt", and only get_value checks whether --no-opt is actually valid. Since the options for git branch contains both "no-merged" and "merged" there are two matches for --no-merge, but no exact match. With this patch the negation of a NONEG option is rejected earlier, but it changes the error message from "option `no-opt' isn't available" to "unknown option `no-opt'". [jk: added test] Signed-off-by: Andreas Schwab <schwab@linux-m68k.org> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2009-09-16Merge branch 'jc/maint-unpack-objects-strict' into maintLibravatar Junio C Hamano1-0/+35
* jc/maint-unpack-objects-strict: Fix "unpack-objects --strict" Conflicts: builtin-unpack-objects.c