Commit graph

9 commits

Author SHA1 Message Date
Junio C Hamano c1cebcf431 scripts: more "export VAR=VALUE" fixes
Found by

    git grep '[^-]export [^&]*=' -- \*.sh

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-05-23 15:32:54 -07:00
Mark Levedahl 97669eed10 test-lib.sh - define and use GREP_STRIPS_CR
Define a common macro for grep needing -U to allow tests to not need
to inquire of specific platforms needing this option. Change
t3032 and t5560 to use this rather than testing explicitly for mingw.
This fixes these two tests on Cygwin.

Signed-off-by: Mark Levedahl <mlevedahl@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-18 16:44:40 -07:00
Junio C Hamano 06938a37dc Merge branch 'jn/cherry-pick-strategy-option'
* jn/cherry-pick-strategy-option:
  cherry-pick/revert: add support for -X/--strategy-option
2011-02-09 16:41:16 -08:00
Junio C Hamano 7810c6b6d6 Merge branch 'rj/test-fixes'
* rj/test-fixes:
  t4135-*.sh: Skip the "backslash" tests on cygwin
  t3032-*.sh: Do not strip CR from line-endings while grepping on MinGW
  t3032-*.sh: Pass the -b (--binary) option to sed on cygwin
  t6038-*.sh: Pass the -b (--binary) option to sed on cygwin

Conflicts:
	t/t3032-merge-recursive-options.sh
2011-01-13 11:35:28 -08:00
Ramsay Jones a28adc2d79 t3032-*.sh: Do not strip CR from line-endings while grepping on MinGW
By default grep reads in text mode and converts CRLF into LF line
endings, which causes tests 4, 6 and 8 to fail. In a similar manner
to commit a94114ad  (Do not strip CR when grepping HTTP headers,
2010-09-12), we set (and export) the GREP_OPTIONS variable to -U so
that grep will use binary mode.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Acked-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-01-08 23:36:37 -08:00
Ramsay Jones 906a9a7d1d t3032-*.sh: Pass the -b (--binary) option to sed on cygwin
The test using the conflict_hunks helper function (test 9) fails
on cygwin, since sed (by default) throws away the CR from CRLF
line endings. This behaviour is undesirable, since the validation
code expects the CRLF line-ending to be present. In order to fix
the problem we pass the -b (--binary) option to sed, using the
SED_OPTIONS variable. We use the SED_STRIPS_CR prerequisite in the
conditional initialisation of SED_OPTIONS.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Acked-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-01-08 23:36:37 -08:00
Brandon Casey bc2d159421 t3032: limit sed branch labels to 8 characters
POSIX leaves as unspecified the handling of labels greater than 8
characters.  Apparently, Sun decided to treat them as errors.  Make sed on
Solaris happy by trimming the length of labels to 8 characters.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-01-06 12:34:52 -08:00
Jonathan Nieder 67ac1e1d57 cherry-pick/revert: add support for -X/--strategy-option
For example, this would allow cherry-picking or reverting patches from
a piece of history with a different end-of-line style, like so:

	$ git revert -Xrenormalize old-problematic-commit

Currently that is possible with manual use of merge-recursive but the
cherry-pick/revert porcelain does not expose the functionality.

While at it, document the existing support for --strategy.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-28 11:27:56 -08:00
Justin Frankel 4e5dd044c6 merge-recursive: options to ignore whitespace changes
Add support for merging with ignoring line endings (specifically
--ignore-space-at-eol) when using recursive merging.  This is
as a strategy-option, so that you can do:

	git merge --strategy-option=ignore-space-at-eol <branch>

and

	git rebase --strategy-option=ignore-space-at-eol <branch>

This can be useful for coping with line-ending damage (Xcode 3.1 has a
nasty habit of converting all CRLFs to LFs, and VC6 tends to just use
CRLFs for inserted lines).

The only option I need is ignore-space-at-eol, but while at it,
include the other xdiff whitespace options (ignore-space-change,
ignore-all-space), too.

[jn: with documentation]

Signed-off-by: Justin Frankel <justin@cockos.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-27 10:08:50 -07:00