Re: [PATCH 2/2] diff: generate prettier filenames when using GIT_EXTERNAL_DIFF

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, May 26, 2009 at 08:19:24PM -0700, David Aguilar wrote:
> --- a/t/t4020-diff-external.sh
> +++ b/t/t4020-diff-external.sh
> @@ -136,6 +136,24 @@ test_expect_success 'GIT_EXTERNAL_DIFF with more than one changed files' '
>  	GIT_EXTERNAL_DIFF=echo git diff
>  '

Sorry for including both tests here.
I forgot to remove the first test when we changed the naming
convention to 6X_name and not special-casing filenames with
dots in them.

I guess I'll resend w/out it.  I'll wait until wednesday
evening before resending to see if anyone spots any other
fixups.


The rationale for the original naming convention was that it
was arguably easier for users to spot what file they're
working on when playing games with dot.

compare:

a) !!!!!!_Makefile

b) Makefile_!!!!!!

and:

a) !!!!!!_diff.c

b) diff.!!!!!!.c


In both examples you already know what filename you're talking
about before scanning past any other information.

.gitignore would look like .!!!!!!.gitignore, which isn't too
bad either.

Anyways, not looking to bikeshed, so I'll wait to here what
others have to say and continue.  The patch is fine as-is too
sans the first test.


> +test_expect_success 'GIT_EXTERNAL_DIFF generates pretty paths with no ext' '
> +	touch filenoext &&
> +	git add filenoext &&
> +	echo no extension > filenoext &&
> +	GIT_EXTERNAL_DIFF=echo git diff filenoext | grep _filenoext &&
> +	git update-index --force-remove filenoext &&
> +	rm filenoext
> +'
> +
> +test_expect_success 'GIT_EXTERNAL_DIFF generates pretty paths with ext' '
> +	touch file.ext &&
> +	git add file.ext &&
> +	echo with extension > file.ext &&
> +	GIT_EXTERNAL_DIFF=echo git diff file.ext | grep ......_file\.ext &&
> +	git update-index --force-remove file.ext &&
> +	rm file.ext
> +'
> +
>  echo "#!$SHELL_PATH" >fake-diff.sh
>  cat >> fake-diff.sh <<\EOF
>  cat $2 >> crlfed.txt
> -- 
> 1.6.3.1.169.g33fd
> 

-- 

	David


--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]