git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Aguilar <davvid@gmail.com>
To: git@vger.kernel.org
Cc: gitster@pobox.com, johannes.schindelin@gmx.de,
	markus.heidelberg@web.de, nick@incise.org
Subject: Re: [PATCH 2/2] diff: generate prettier filenames when using GIT_EXTERNAL_DIFF
Date: Tue, 26 May 2009 22:17:38 -0700	[thread overview]
Message-ID: <20090527051737.GA2986@gmail.com> (raw)
In-Reply-To: <1243394364-13772-2-git-send-email-davvid@gmail.com>

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

  reply	other threads:[~2009-05-27  5:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-27  3:19 [PATCH 1/2] compat: add a mkstemps() compatibility function David Aguilar
2009-05-27  3:19 ` [PATCH 2/2] diff: generate prettier filenames when using GIT_EXTERNAL_DIFF David Aguilar
2009-05-27  5:17   ` David Aguilar [this message]
2009-05-27  6:34   ` Johannes Sixt
2009-05-27  6:37     ` David Aguilar
2009-05-27  7:02     ` David Aguilar
2009-05-27  7:14       ` Johannes Sixt
2009-05-27  8:20 ` [PATCH 1/2] compat: add a mkstemps() compatibility function Jakub Narebski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090527051737.GA2986@gmail.com \
    --to=davvid@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=johannes.schindelin@gmx.de \
    --cc=markus.heidelberg@web.de \
    --cc=nick@incise.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).