Git development
 help / color / mirror / Atom feed
* Re: [PATCH 2/3] help.c: make term_columns() cached and export it
From: Junio C Hamano @ 2012-02-12  9:40 UTC (permalink / raw)
  To: Zbigniew Jędrzejewski-Szmek
  Cc: Nguyen Thai Ngoc Duy, git, Michael J Gruber, Ramsay Jones
In-Reply-To: <4F3647B4.8090803@in.waw.pl>

Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> writes:

> Junio suggested that "a new file, term.c or something, be a lot more
> suitable home for the function you will be reusing from diff and other
> parts of the system". Nevertheless, I think that adding two files (.c
> and .h) to hold one function isn't worth it. It can live in pager.c.
> Terminal size is logically connected to paging after all.

I do not have any objection to the above reasoning.

Given that Nguyen's columns topic hasn't been merged to 'next' and I
expect it will be re-rolled anyway, I would prefer a patch that does the
move from help.c to pager.c that is based directly on v1.7.9, on top of
which your work and the columns topic can both be built independently.

Thanks.

^ permalink raw reply

* Re: "git pull" doesn't know "--edit"
From: Junio C Hamano @ 2012-02-12  9:59 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Git Mailing List
In-Reply-To: <CA+55aFwLqvVyMipun4DM4CnbO97Dota3LCM2VPFfLq1LS5a4aQ@mail.gmail.com>

Linus Torvalds <torvalds@linux-foundation.org> writes:

> In the docs, the "GIT_MERGE_AUTOEDIT=no" thing is mentioned as the way
> to get the legacy behavior, which (at least to me) implies that
> setting it to "yes" gets the modern behavior.

Honestly, I didn't actually intend to accept any value other than "no" to
be set in that variable.

Also the variable's name was way suboptimal.

I didn't intend "Auto" to describe "Edit" (as in "is the editor spawned
AUTO-matically? yes/no"), but meant it to describe "Merge" (as in "When a
merge results in AUTO-committing, do we edit it? yes/no?").

> Maybe this is intentional, and not a bug? But it does seem a bit odd -
> the name is "AUTOEDIT", not "FORCEDEDIT".

A clean merge that tries to start an editor even when not interactive is
honoring the "yes" setting is understandable/explainable if you read the
misnamed variable as "When a merge results in AUTO-committing, do we edit
it? yes/no?"

But it of course does not mean that such a behaviour is useful.  It is not
just "a bit odd", it is outright useless in a text terminal, especially
when you are redirecting the input from /dev/null ;-).

> Or maybe the thing could extend the notion of the current boolean to
> be a tri-state instead: in addition to the traditional true/yes/on and
> false/no/off have a "force" mode that is that "always force it on
> regardless".

Yeah, if we support any value other than "no", I think the trivalue
always/auto/never (aka yes/auto/no) would make the most sense.

> And maybe this is just a "nobody cares" situation - "Don't do that then".

I would have agreed with you 3 years ago, but these days I find the end
users are being much pickier than they used to be ;-).

^ permalink raw reply

* Re: 1.7.9, libcharset missing from EXTLIBS
From: Junio C Hamano @ 2012-02-12 10:30 UTC (permalink / raw)
  To: Дилян Палаузов
  Cc: git
In-Reply-To: <4F370DE5.70400@aegee.org>

Дилян Палаузов  <dilyan.palauzov@aegee.org> writes:

> diff -u git-1.7.9.orig/config.mak.in git-1.7.9/config.mak.in
> --- git-1.7.9.orig/config.mak.in        2012-01-27 20:51:04.000000000 +0000
> +++ git-1.7.9/config.mak.in     2012-02-12 00:52:41.457968080 +0000
> @@ -74,3 +74,4 @@
>  NO_PTHREADS=@NO_PTHREADS@
>  PTHREAD_CFLAGS=@PTHREAD_CFLAGS@
>  PTHREAD_LIBS=@PTHREAD_LIBS@
> +LINK_CHARSET=@LINK_CHARSET@
> diff -u git-1.7.9.orig/configure.ac git-1.7.9/configure.ac
> --- git-1.7.9.orig/configure.ac 2012-01-27 20:51:04.000000000 +0000
> +++ git-1.7.9/configure.ac      2012-02-12 00:44:29.222967868 +0000
> @@ -836,6 +836,18 @@
>  [HAVE_LIBCHARSET_H=YesPlease],
>  [HAVE_LIBCHARSET_H=])
>  AC_SUBST(HAVE_LIBCHARSET_H)
> +# Define LINK_LIBCHARSET if libiconv does not export the

Because the use of configure is optional in our build infrastructure, I
wouldn't have objected if this comment were missing from configure.ac, but
the new variable *must* be described in Makefile (see the top 250 lines or
so of that file).

I also need to point out that LINK_LIBCHARSET does not sit very well with
the way how existing Makefile variables are named. Perhaps make the new
variable contain the necessary string ("-lcharset" in your case), and name
it CHARSET_LIB or something?  By doing so, when we find a platform that
has the necessary locale_charset() not in libcharset.{a,so} but somewhere
else, e.g. libxyzzy.a, we can accomodate it with "CHARSET_LIB = -lxyzzy".

Thanks.  Also as Ævar pointed out, please do not forget to sign off your
patch.

^ permalink raw reply

* Re: [PATCH 6/8] gitweb: Highlight interesting parts of diff
From: Jakub Narebski @ 2012-02-12 10:42 UTC (permalink / raw)
  To: Michał Kiedrowicz; +Cc: git
In-Reply-To: <m3y5s9rl3g.fsf@localhost.localdomain>

Jakub Narebski <jnareb@gmail.com> writes:
> Michał Kiedrowicz <michal.kiedrowicz@gmail.com> writes:
 
> > +# Highlight characters from $prefix to $suffix and escape HTML.
> > +# $str is a reference to the array of characters.
> > +sub esc_html_mark_range {
> > +	my ($str, $prefix, $suffix) = @_;
> > +
> > +	# Don't generate empty <span> element.
> > +	if ($prefix == $suffix + 1) {
> > +		return esc_html(join('', @$str), -nbsp=>1);
> > +	}
> > +
> > +	my $before = join('', @{$str}[0..($prefix - 1)]);
> > +	my $marked = join('', @{$str}[$prefix..$suffix]);
> > +	my $after = join('', @{$str}[($suffix + 1)..$#{$str}]);
> 
> Eeeeeek!  First you split into letters, in caller at that, then join?
> Why not pass striung ($str suggests string not array of characters),
> and use substr instead?
> 
> [Please disregard this and the next paragraph at first reading]
> 
> > +
> > +	return esc_html($before, -nbsp=>1) .
> > +		$cgi->span({-class=>'marked'}, esc_html($marked, -nbsp=>1)) .
> > +		esc_html($after,-nbsp=>1);
> > +}
> 
> Anyway I have send to git mailing list a patch series, which in one of
> patches adds esc_html_match_hl($str, $regexp) to highlight matches in
> a string.  Your esc_html_mark_range(), after a generalization, could
> be used as underlying "engine".
> 
> Something like this, perhaps (untested):
> 
>    # Highlight selected fragments of string, using given CSS class,
>    # and escape HTML.  It is assumed that fragments do not overlap.
>    # Regions are passed as list of pairs (array references).
>    sub esc_html_hl {
>         my ($str, $css_class, @sel) = @_;
>         return esc_html($str) unless @sel;
>    
>         my $out = '';
>         my $pos = 0;
>    
>         for my $s (@sel) {
>                 $out .= esc_html(substr($str, $pos, $s->[0] - $pos))
>                         if ($s->[0] - $pos > 0);
>                 $out .= $cgi->span({-class => $css_class},
>                                    esc_html(substr($str, $s->[0], $s->[1] - $s->[0])));
> 
>                 $pos = $m->[1];
>         }
>         $out .= esc_html(substr($str, $pos))
>                 if ($pos < length($str));
>    
>         return $out;
>    }

Actually we can accomodate both operating on string and operating on
array of characters in a single subroutine.  Though it can be left for
later commit, anyway...

     # Highlight selected fragments of string, using given CSS class,
     # and escape HTML.  It is assumed that fragments do not overlap.
     # Regions are passed as list of pairs (array references).
     sub esc_html_hl {
          my ($sth, $css_class, @sel) = @_;

          if (!@sel) {
                if (ref($sth) eq "ARRAY") {
                        return esc_html(join('', @$sth), -nbsp=>1);
                } else {
                        return esc_html($sth, -nbsp=>1);
          }

          if (ref($sth) eq "ARRAY") {
                return esc_html_hl_gen($sth,
                        sub { 
                                my ($arr, $from, $to) = @_;
                                return join('', @{$arr}[$from..$to]);
                        },
                        scalar @{$arr}, $css_class, @sel);
           } else {
                return esc_html_hl_gen($sth,
                        sub {
                                my ($str, $from, $to) = @_;
                                if ($to < 0) { $to += lenght($str); };
                                return substr($str, $from, $to - $from);
                        },
                        length($sth), $css_class, @sel);
           }
     }

     # Highlight selected fragments of string or array of characters
     # with given length, using provided $extr subroutine to extract
     # fragment (substring)
     sub esc_html_hl_gen {
          my ($sth, $extr, $len, $css_class, @sel) = @_;
     
          my $out = '';
          my $pos = 0;
     
          for my $s (@sel) {
                $out .= esc_html($extr->($str, $pos, $s->[0]))
                        if ($s->[0] - $pos > 0);
                $out .= $cgi->span({-class => $css_class},
                                   esc_html($extr->($str, $s->[0], $s->[1])));
  
                $pos = $s->[1];
          }
          $out .= esc_html($extr->($str, $pos, $len))
                  if ($pos < $len);
     
          return $out;
     }

Or maybe I have read "Higher-Order Perl" one time too many ;-))))

-- 
Jakub Narębski

^ permalink raw reply

* Re: [PATCH] strbuf: move strbuf_readline_fd() from bundle.c to strbuf.{c,h}
From: 徐迪 @ 2012-02-12 12:25 UTC (permalink / raw)
  To: Git 邮件列表
In-Reply-To: <CAMocUqRutwERQ64a=9t36Za6Lm8KxpseS0NYbdGKWbixbsXeyw@mail.gmail.com>

Shouldn't I supposed to receive any information about this patch? Has
it accepted or not? If not what wrong with this patch?

在 2012年2月11日 下午5:50,徐迪 <xudifsd@gmail.com> 写道:
> strbuf_readline_fd() existed in bundle.c since e9ee84cf, but this
> function can be used elsewhere, and since it's relevant to strbuf, it
> should be in strbuf.{c,h}.
>
> Signed-off-by: Xu Di <xudifsd@gmail.com>
> ---
>  bundle.c |   18 +-----------------
>  strbuf.c |   16 ++++++++++++++++
>  strbuf.h |    1 +
>  3 files changed, 18 insertions(+), 17 deletions(-)
>
> diff --git a/bundle.c b/bundle.c
> index b8acf3c..9344a91 100644
> --- a/bundle.c
> +++ b/bundle.c
> @@ -7,6 +7,7 @@
>  #include "list-objects.h"
>  #include "run-command.h"
>  #include "refs.h"
> +#include "strbuf.h"
>
>  static const char bundle_signature[] = "# v2 git bundle\n";
>
> @@ -23,23 +24,6 @@ static void add_to_ref_list(const unsigned char
> *sha1, const char *name,
>        list->nr++;
>  }
>
> -/* Eventually this should go to strbuf.[ch] */
> -static int strbuf_readline_fd(struct strbuf *sb, int fd)
> -{
> -       strbuf_reset(sb);
> -
> -       while (1) {
> -               char ch;
> -               ssize_t len = xread(fd, &ch, 1);
> -               if (len <= 0)
> -                       return len;
> -               strbuf_addch(sb, ch);
> -               if (ch == '\n')
> -                       break;
> -       }
> -       return 0;
> -}
> -
>  static int parse_bundle_header(int fd, struct bundle_header *header,
>                               const char *report_path)
>  {
> diff --git a/strbuf.c b/strbuf.c
> index ff0b96b..7532a13 100644
> --- a/strbuf.c
> +++ b/strbuf.c
> @@ -282,6 +282,22 @@ void strbuf_addbuf_percentquote(struct strbuf
> *dst, const struct strbuf *src)
>        }
>  }
>
> +int strbuf_readline_fd(struct strbuf *sb, int fd)
> +{
> +       strbuf_reset(sb);
> +
> +       while (1) {
> +               char ch;
> +               ssize_t len = xread(fd, &ch, 1);
> +               if (len <= 0)
> +                       return len;
> +               strbuf_addch(sb, ch);
> +               if (ch == '\n')
> +                       break;
> +       }
> +       return 0;
> +}
> +
>  size_t strbuf_fread(struct strbuf *sb, size_t size, FILE *f)
>  {
>        size_t res;
> diff --git a/strbuf.h b/strbuf.h
> index fbf059f..ecebd11 100644
> --- a/strbuf.h
> +++ b/strbuf.h
> @@ -109,6 +109,7 @@ static inline void strbuf_complete_line(struct strbuf *sb)
>  }
>
>  extern size_t strbuf_fread(struct strbuf *, size_t, FILE *);
> +extern int strbuf_readline_fd(struct strbuf *sb, int fd);
>  /* XXX: if read fails, any partial read is undone */
>  extern ssize_t strbuf_read(struct strbuf *, int fd, size_t hint);
>  extern int strbuf_read_file(struct strbuf *sb, const char *path, size_t hint);
> --
> 1.7.8.1.749.gb6b3b

^ permalink raw reply

* [PATCH/RFC] Auto detection in Makefile if msgfmt is not available
From: Torsten Bögershausen @ 2012-02-12 12:42 UTC (permalink / raw)
  To: avarab, git; +Cc: tboegi

Since commit 5e9637c629702e3d41ad01d95956d1835d7338e0
"i18n: add infrastructure for translating Git with gettext"
the Makefile demands the existance of msgfmt, unless NO_GETTEXT is defined.

This breaks the build on systems where msgfmt is not installed.

Added a simple auto-detection and switch to NO_GETTEXT when
msgfmt could not be found on the system

Signed-off-by: Torsten Bögershausen <tboegi@web.de>
---
 Makefile |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/Makefile b/Makefile
index 87fb30a..23e1e77 100644
--- a/Makefile
+++ b/Makefile
@@ -353,7 +353,11 @@ RPMBUILD = rpmbuild
 TCL_PATH = tclsh
 TCLTK_PATH = wish
 XGETTEXT = xgettext
-MSGFMT = msgfmt
+ifeq ($(shell msgfmt --help 2>/dev/null && echo y),y)
+	MSGFMT = msgfmt
+else
+	NO_GETTEXT=UnfortunatelyYes
+endif
 PTHREAD_LIBS = -lpthread
 PTHREAD_CFLAGS =
 GCOV = gcov
-- 
1.7.8.3.1.g75d1cf.dirty

^ permalink raw reply related

* [PATCH 1/2] Save terminal width before setting up pager and export term_columns()
From: Zbigniew Jędrzejewski-Szmek @ 2012-02-12 14:12 UTC (permalink / raw)
  To: git, gitster, pclouds; +Cc: Michael J Gruber, Zbigniew Jędrzejewski-Szmek
In-Reply-To: <7vsjigl79j.fsf@alter.siamese.dyndns.org>

term_columns() checks for terminal width via ioctl(2). After
redirecting, stdin is no longer terminal to get terminal width.

Check terminal width and save it before redirecting stdin in
setup_pager() by calling term_columns().

Move term_columns() to pager.c and export it in cache.h.

Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
---
 cache.h |  1 +
 help.c  | 22 -------------------
 pager.c | 45 ++++++++++++++++++++++++++++++++++++++++
 3 files changed, 46 insertions(+), 22 deletions(-)

This replaces cb0850f (Save terminal width before setting up pager -
2012-02-04) from Nguyễn Thái Ngọc Duy and my previous patch to export
term_columns().

This is directly on top of v1.7.9 as requested.

I removed Signed-off-by from Nguyễn and Junio because the patch is
substantially changed.

diff --git a/cache.h b/cache.h
index 10afd71..2f30b3a 100644
--- a/cache.h
+++ b/cache.h
@@ -1175,6 +1175,7 @@ extern void setup_pager(void);
 extern const char *pager_program;
 extern int pager_in_use(void);
 extern int pager_use_color;
+extern int term_columns(void);
 
 extern const char *editor_program;
 extern const char *askpass_program;
diff --git a/help.c b/help.c
index cbbe966..14eefc9 100644
--- a/help.c
+++ b/help.c
@@ -5,28 +5,6 @@
 #include "help.h"
 #include "common-cmds.h"
 
-/* most GUI terminals set COLUMNS (although some don't export it) */
-static int term_columns(void)
-{
-	char *col_string = getenv("COLUMNS");
-	int n_cols;
-
-	if (col_string && (n_cols = atoi(col_string)) > 0)
-		return n_cols;
-
-#ifdef TIOCGWINSZ
-	{
-		struct winsize ws;
-		if (!ioctl(1, TIOCGWINSZ, &ws)) {
-			if (ws.ws_col)
-				return ws.ws_col;
-		}
-	}
-#endif
-
-	return 80;
-}
-
 void add_cmdname(struct cmdnames *cmds, const char *name, int len)
 {
 	struct cmdname *ent = xmalloc(sizeof(*ent) + len + 1);
diff --git a/pager.c b/pager.c
index 975955b..b8049a4 100644
--- a/pager.c
+++ b/pager.c
@@ -76,6 +76,10 @@ void setup_pager(void)
 	if (!pager)
 		return;
 
+	/* prime the term_columns() cache before it is too
+	 * late and stdout is replaced */
+	(void) term_columns();
+
 	setenv("GIT_PAGER_IN_USE", "true", 1);
 
 	/* spawn the pager */
@@ -110,3 +114,44 @@ int pager_in_use(void)
 	env = getenv("GIT_PAGER_IN_USE");
 	return env ? git_config_bool("GIT_PAGER_IN_USE", env) : 0;
 }
+
+/*
+ * Return cached value (if set) or $COLUMNS (if set and positive) or
+ * ioctl(1, TIOCGWINSZ).ws_col (if positive) or 80.
+ *
+ * $COLUMNS even if set, is usually not exported, so
+ * the variable can be used to override autodection.
+ * This behaviour conforms to The Single UNIX Specification, Version 2
+ * (http://pubs.opengroup.org/onlinepubs/7908799/xbd/envvar.html#tag_002_003).
+ */
+int term_columns(void)
+{
+	static int term_columns_cache;
+
+	char *col_string;
+	int n_cols;
+
+	if (term_columns_cache)
+		return term_columns_cache;
+
+	col_string = getenv("COLUMNS");
+	if (col_string && (n_cols = atoi(col_string)) > 0) {
+		term_columns_cache = n_cols;
+		return term_columns_cache;
+	}
+
+#ifdef TIOCGWINSZ
+	{
+		struct winsize ws;
+		if (!ioctl(1, TIOCGWINSZ, &ws)) {
+			if (ws.ws_col) {
+				term_columns_cache = ws.ws_col;
+				return term_columns_cache;
+			}
+		}
+	}
+#endif
+
+	term_columns_cache = 80;
+	return term_columns_cache;
+}
-- 
1.7.9.3.g2429d.dirty

^ permalink raw reply related

* [PATCH 2/2] Rename lineno_width to decimal_width and export it
From: Zbigniew Jędrzejewski-Szmek @ 2012-02-12 14:16 UTC (permalink / raw)
  To: git, gitster, pclouds; +Cc: Michael J Gruber, Zbigniew Jędrzejewski-Szmek
In-Reply-To: <7vsjigl79j.fsf@alter.siamese.dyndns.org>

This function will be used in calculating diff --stat graph width.
The name is changed because the function works for any number.
The function is moved from builtins/blame.c to pager.c because it
will be used not only in builtins/blame.c.
---
 builtin/blame.c | 18 +++---------------
 cache.h         |  1 +
 pager.c         | 12 ++++++++++++
 3 files changed, 16 insertions(+), 15 deletions(-)

This is another function to be exported. I hope it can be exported
together with term_columns(). I'll use it the next version of the diff
--stat patch.

diff --git a/builtin/blame.c b/builtin/blame.c
index 5a67c20..f028e8a 100644
--- a/builtin/blame.c
+++ b/builtin/blame.c
@@ -1829,18 +1829,6 @@ static int read_ancestry(const char *graft_file)
 }
 
 /*
- * How many columns do we need to show line numbers in decimal?
- */
-static int lineno_width(int lines)
-{
-	int i, width;
-
-	for (width = 1, i = 10; i <= lines; width++)
-		i *= 10;
-	return width;
-}
-
-/*
  * How many columns do we need to show line numbers, authors,
  * and filenames?
  */
@@ -1880,9 +1868,9 @@ static void find_alignment(struct scoreboard *sb, int *option)
 		if (largest_score < ent_score(sb, e))
 			largest_score = ent_score(sb, e);
 	}
-	max_orig_digits = lineno_width(longest_src_lines);
-	max_digits = lineno_width(longest_dst_lines);
-	max_score_digits = lineno_width(largest_score);
+	max_orig_digits = decimal_width(longest_src_lines);
+	max_digits = decimal_width(longest_dst_lines);
+	max_score_digits = decimal_width(largest_score);
 }
 
 /*
diff --git a/cache.h b/cache.h
index 2f30b3a..3857dfd 100644
--- a/cache.h
+++ b/cache.h
@@ -1176,6 +1176,7 @@ extern const char *pager_program;
 extern int pager_in_use(void);
 extern int pager_use_color;
 extern int term_columns(void);
+extern int decimal_width(int number);
 
 extern const char *editor_program;
 extern const char *askpass_program;
diff --git a/pager.c b/pager.c
index b8049a4..b6d44ef 100644
--- a/pager.c
+++ b/pager.c
@@ -155,3 +155,15 @@ int term_columns(void)
 	term_columns_cache = 80;
 	return term_columns_cache;
 }
+
+/*
+ * How many columns do we need to show numbers in decimal?
+ */
+int decimal_width(int number)
+{
+	int i, width;
+
+	for (width = 1, i = 10; i <= number; width++)
+		i *= 10;
+	return width;
+}
-- 
1.7.9.3.g2429d.dirty

^ permalink raw reply related

* Re: [PATCH] git-svn: Fix time zone in --localtime
From: "Wei-Yin Chen (陳威尹)" @ 2012-02-12 13:49 UTC (permalink / raw)
  To: Eric Wong; +Cc: git, Pete Harlan, gitster
In-Reply-To: <20120212081553.GA10068@dcvr.yhbt.net>

On 2012-02-12 16:15, Eric Wong wrote:
> I needed the following additional change to get things working:
>
> --- a/git-svn.perl
> +++ b/git-svn.perl
> @@ -6111,7 +6111,7 @@ sub run_pager {
>
>   sub format_svn_date {
>   	my $t = shift || time;
> -	my $gmoff = get_tz($t);
> +	my $gmoff = Git::SVN::get_tz($t);
>   	return strftime("%Y-%m-%d %H:%M:%S $gmoff (%a, %d %b %Y)", localtime($t));
>   }

Sorry, my bad. This bug of missing package reference can be triggered by 
"git svn log", but unfortunately I didn't test this part manually. I'll 
learn to use the git test suite next time.

>
> If there are no objections, I'll squash this and push for Junio
> tomorrow.

Excellent. Thank you for the testing and fixing effort!

^ permalink raw reply

* [PATCH v3] diff --stat: use the full terminal width
From: Zbigniew Jędrzejewski-Szmek @ 2012-02-12 14:30 UTC (permalink / raw)
  To: git, gitster, pclouds; +Cc: Michael J Gruber, Zbigniew Jędrzejewski-Szmek
In-Reply-To: <7vmx8qr1gb.fsf@alter.siamese.dyndns.org>

Use as many columns as necessary for filenames, as few columns as
necessary for change counts, and up to 40 columns for the histogram.

Some projects (especially in Java), have long filename paths, with
nested directories or long individual filenames. When files are
renamed, the stat output can be almost useless. If the middle part
between { and } is long (because the file was moved to a completely
different directory), then most of the path would be truncated.

It makes sense to detect and use the full terminal width and display
full filenames if possible.

If commits changing a lot of lines are displayed in a wide terminal
window (200 or more columns), and the +- graph would use the full
width, the output would look bad. Messages wrapped to about 80
columns would be interspersed with very long +- lines. It makes
sense to limit the width of the histogram to a fixed value, even if more
columns are available. This fixed value is subjectively hard-coded to
be 40 columns, which seems to work well for git.git and linux-2.6.git and
some other repositories.

If there isn't enough columns to print both the filename and the histogram,
at least 5/8 of available space is devoted to filenames. On a standard 80 column
terminal, or if not connected to a terminal and using the default of 80 columns,
this gives the same partition as before.

Number of columns required for change counts is computed based on
the maximum number of changed lines. This means that usually a few more
columns will be available for the filenames and the histogram.

Tests are added for various combinations of long filename and big change
count and ways to specify widths.

Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
---
Hi,
this is v3 (reduced to one patch) on top of:
- Save terminal width before setting up pager and export term_columns(),
- Rename lineno_width to decimal_width and export it.

The logic is described in a comment in show_stats() in diff.c. In case
of a column 80 terminal window, the output will not be identical,
because of using decimal_width, but it'll be very close to what was
there previously.

v3:
- use decimal_width(max_change) to calculate number of columns
  required for change counts
- rework the logic to divide columns
- document the logic in comments, update docs
- add more tests

v2:
- style fixes
- some tests for git-format-patch added
- patches 3 and 4 squashed together, since they touch the same lines
- graph width is limited to 40 columns, even if there's more space
- patch descriptions extended and cleared up

 Documentation/diff-options.txt | 14 +++---
 diff.c                         | 93 +++++++++++++++++++++++++------------
 t/t4014-format-patch.sh        | 98 +++++++++++++++++++++++++++++++++++++++-
 3 files changed, 168 insertions(+), 37 deletions(-)

diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt
index 9f7cba2..35dfdfb 100644
--- a/Documentation/diff-options.txt
+++ b/Documentation/diff-options.txt
@@ -53,13 +53,15 @@ endif::git-format-patch[]
 	Generate a diff using the "patience diff" algorithm.
 
 --stat[=<width>[,<name-width>[,<count>]]]::
-	Generate a diffstat.  You can override the default
-	output width for 80-column terminal by `--stat=<width>`.
-	The width of the filename part can be controlled by
-	giving another width to it separated by a comma.
+	Generate a diffstat. By default, as much space as necessary
+	will be used for the filename part, and up to 40 columns for
+	the graph histogram. Maximum width defaults to terminal width,
+	or 80 columns if not connected to a terminal, and can be
+	overriden by `<width>`. The width of the filename part can be
+	limited by giving another width `<name-width>` after a comma.
 	By giving a third parameter `<count>`, you can limit the
-	output to the first `<count>` lines, followed by
-	`...` if there are more.
+	output to the first `<count>` lines, followed by `...` if
+	there are more.
 +
 These parameters can also be set individually with `--stat-width=<width>`,
 `--stat-name-width=<name-width>` and `--stat-count=<count>`.
diff --git a/diff.c b/diff.c
index 7e15426..7abcbe9 100644
--- a/diff.c
+++ b/diff.c
@@ -1327,7 +1327,7 @@ static void show_stats(struct diffstat_t *data, struct diff_options *options)
 	int i, len, add, del, adds = 0, dels = 0;
 	uintmax_t max_change = 0, max_len = 0;
 	int total_files = data->nr;
-	int width, name_width, count;
+	int width, name_width, graph_width, number_width, count;
 	const char *reset, *add_c, *del_c;
 	const char *line_prefix = "";
 	int extra_shown = 0;
@@ -1341,25 +1341,13 @@ static void show_stats(struct diffstat_t *data, struct diff_options *options)
 		line_prefix = msg->buf;
 	}
 
-	width = options->stat_width ? options->stat_width : 80;
-	name_width = options->stat_name_width ? options->stat_name_width : 50;
-	count = options->stat_count ? options->stat_count : data->nr;
-
-	/* Sanity: give at least 5 columns to the graph,
-	 * but leave at least 10 columns for the name.
-	 */
-	if (width < 25)
-		width = 25;
-	if (name_width < 10)
-		name_width = 10;
-	else if (width < name_width + 15)
-		name_width = width - 15;
-
 	/* Find the longest filename and max number of changes */
 	reset = diff_get_color_opt(options, DIFF_RESET);
 	add_c = diff_get_color_opt(options, DIFF_FILE_NEW);
 	del_c = diff_get_color_opt(options, DIFF_FILE_OLD);
 
+	count = options->stat_count ? options->stat_count : data->nr;
+
 	for (i = 0; (i < count) && (i < data->nr); i++) {
 		struct diffstat_file *file = data->files[i];
 		uintmax_t change = file->added + file->deleted;
@@ -1380,19 +1368,63 @@ static void show_stats(struct diffstat_t *data, struct diff_options *options)
 	}
 	count = i; /* min(count, data->nr) */
 
-	/* Compute the width of the graph part;
-	 * 10 is for one blank at the beginning of the line plus
-	 * " | count " between the name and the graph.
+	/* We have width = stat_width or term_columns() columns total.
+	 * We want a maximum of min(max_len, stat_name_width) for the name part.
+	 * We want a maximum of min(max_change, 40) for the +- part.
+	 * We also need 1 for " " and 4 + decimal_width(max_change)
+	 * for " | NNNN " and one for " " at the end, altogether
+	 * 6 + decimal_width(max_change).
+	 *
+	 * If there's not enough space, we will use stat_name_width
+	 * or 5/8*width for filename, and the rest for constant
+	 * elements + histogram, but no more than 40 for the histogram.
+	 * (5/8 gives 50 for filename and 30 for constant parts and
+	 * histogram for the standard terminal size).
 	 *
-	 * From here on, name_width is the width of the name area,
-	 * and width is the width of the graph area.
+	 * In other words: stat_width limits the maximum width, and
+	 * stat_name_width fixes the maximum width of the filename,
+	 * and is also used to divide available columns if there
+	 * aren't enough.
 	 */
-	name_width = (name_width < max_len) ? name_width : max_len;
-	if (width < (name_width + 10) + max_change)
-		width = width - (name_width + 10);
-	else
-		width = max_change;
+	width = options->stat_width ? options->stat_width : term_columns();
+	number_width = decimal_width(max_change);
+	/* first sizes that are wanted */
+	graph_width = max_change < 40 ? max_change : 40;
+	name_width = (options->stat_name_width > 0 &&
+		      options->stat_name_width < max_len) ?
+		options->stat_name_width : max_len;
+
+	/* sanity: guarantee a minimum and maximum width */
+	if (width < 25)
+		width = 25;
+
+	if (name_width + number_width + 6 + graph_width > width) {
+		if (graph_width > width * 3/8 - number_width - 6)
+			graph_width = width * 3/8 - number_width - 6;
+		if (graph_width > 40)
+			graph_width =  40;
+		if (name_width > width - number_width - 6 - graph_width)
+			name_width = width - number_width - 6 - graph_width;
+		else
+			graph_width = width - number_width - 6 - name_width;
+	}
 
+	/* More sanity: give at least 5 columns to the graph,
+	 * but leave at least 10 columns for the name.
+	 *
+	 * This should already be satisfied, unless max_change is
+	 * really huge. If the window is extemely narrow, this might
+	 * overflow available columns.
+	 */
+	if (name_width < 10 && max_len >= 10)
+		name_width = 10;
+	if (graph_width < 5 && max_change >= 5)
+		graph_width = 5;
+
+	/* From here name_width is the width of the name area,
+	 * and graph_width is the width of the graph area.
+	 * max_change is used to scale graph properly.
+	 */
 	for (i = 0; i < count; i++) {
 		const char *prefix = "";
 		char *name = data->files[i]->print_name;
@@ -1448,14 +1480,15 @@ static void show_stats(struct diffstat_t *data, struct diff_options *options)
 		adds += add;
 		dels += del;
 
-		if (width <= max_change) {
-			add = scale_linear(add, width, max_change);
-			del = scale_linear(del, width, max_change);
+		if (graph_width <= max_change) {
+			add = scale_linear(add, graph_width, max_change);
+			del = scale_linear(del, graph_width, max_change);
 		}
 		fprintf(options->file, "%s", line_prefix);
 		show_name(options->file, prefix, name, len);
-		fprintf(options->file, "%5"PRIuMAX"%s", added + deleted,
-				added + deleted ? " " : "");
+		fprintf(options->file, " %*"PRIuMAX"%s",
+			number_width, added + deleted,
+			added + deleted ? " " : "");
 		show_graph(options->file, '+', add, add_c, reset);
 		show_graph(options->file, '-', del, del_c, reset);
 		fprintf(options->file, "\n");
diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh
index 6797512..91be989 100755
--- a/t/t4014-format-patch.sh
+++ b/t/t4014-format-patch.sh
@@ -519,7 +519,7 @@ test_expect_success 'shortlog of cover-letter wraps overly-long onelines' '
 
 cat > expect << EOF
 ---
- file |   16 ++++++++++++++++
+ file | 16 ++++++++++++++++
  1 files changed, 16 insertions(+), 0 deletions(-)
 
 diff --git a/file b/file
@@ -894,4 +894,100 @@ test_expect_success 'format patch ignores color.ui' '
 	test_cmp expect actual
 '
 
+name=aaaaaaaaaa
+name=$name$name$name$name$name$name$name$name$name$name$name$name
+test_expect_success 'preparation' "
+	> ${name} &&
+	git add ${name} &&
+	git commit -m message &&
+	echo a > ${name} &&
+	git commit -m message ${name}
+"
+
+cat >expect <<'EOF'
+ ...aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | 1 +
+EOF
+test_expect_success 'format patch graph width is 80 columns' '
+	git format-patch --stat --stdout -1 |
+		grep -m 1 aaaaa > actual &&
+	test_cmp expect actual
+'
+
+cat >expect <<'EOF'
+ ...aaaaaaaaaaaaaaaaaaaaaaaaaaaaa | 1 +
+EOF
+test_expect_success 'format patch --stat=width with long name' '
+	git format-patch --stat=40 --stdout -1 |
+		grep -m 1 aaaa > actual &&
+	test_cmp expect actual
+'
+
+test_expect_success 'format patch --stat-width=width works long name' '
+	git format-patch --stat-width=40 --stdout -1 |
+		grep -m 1 aaaa > actual &&
+	test_cmp expect actual
+'
+
+test_expect_success 'format patch --stat=...,name-width with long name' '
+	git format-patch --stat=60,32 --stdout -1 |
+		grep -m 1 aaaa > actual &&
+	test_cmp expect actual
+'
+
+test_expect_success 'format patch --stat-name-width with long name' '
+	git format-patch --stat-name-width=32 --stdout -1 |
+		grep -m 1 aaaa > actual &&
+	test_cmp expect actual
+'
+
+test_expect_success 'preparation' '
+	> abcd &&
+	git add abcd &&
+	git commit -m message &&
+	seq 1000 > abcd &&
+	git commit -m message abcd
+'
+
+cat >expect <<'EOF'
+ abcd | 1000 ++++++++++++++++++++++++++++++++++++++++
+EOF
+test_expect_success 'format patch graph width is 40 columns' '
+	git format-patch --stat --stdout -1 |
+		grep -m 1 abcd > actual &&
+	test_cmp expect actual
+'
+
+test_expect_success 'format patch ignores COLUMNS' '
+	COLUMNS=200 git format-patch --stat --stdout -1 |
+		grep -m 1 abcd > actual &&
+	test_cmp expect actual
+'
+
+cat >expect <<'EOF'
+ abcd | 1000 ++++++++++++++++++++++++++
+EOF
+test_expect_success 'format patch --stat=width with big change' '
+	git format-patch --stat=40 --stdout -1 |
+		grep -m 1 abcd > actual &&
+	test_cmp expect actual
+'
+
+test_expect_success 'format patch --stat-width=width with big change' '
+	git format-patch --stat-width=40 --stdout -1 |
+		grep -m 1 abcd > actual &&
+	test_cmp expect actual
+'
+
+cat >expect <<'EOF'
+ ...aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | 1000 ++++++++++++
+EOF
+test_expect_success 'format patch --stat=width with big change and long name' '
+	cp abcd aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa &&
+	git add aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa &&
+	git commit -m message &&
+	git format-patch --stat-width=60 --stdout -1 |
+		grep -m 1 aaaa > actual &&
+	test_cmp expect actual
+'
+
 test_done
-- 
1.7.9.3.g2429d.dirty

^ permalink raw reply related

* [PATCH] gitweb: Harden and improve $project_filter page title
From: Jakub Narebski @ 2012-02-12 15:21 UTC (permalink / raw)
  To: git; +Cc: Bernhard R. Link, Jakub Narebski

Commit 19d2d23 (gitweb: add project_filter to limit project list
to a subdirectory, 2012-01-30) added also support for displaying
$project_filter, if present, in page title.

Unfortunately it forgot to treat $project_filter as path, and escape
it using esc_path(), like it is done for $filename.

Also, it was not obvious that "$site_name - $project_filter" is about
project filtering: use "$site_name - projects in '$project_filter'".

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
---
Though we should probably also esc_path($project), not only
to_utf8($project) in get_page_title() subroutine.

So I am not that sure if it is really necessary, or if I should follow
it by further hardening of get_page_title().

Anyway I have noticed this when I was examining gitweb code for
generating page title, considering adding information about search for
project search.  So this is patch I will be depending textually via
context lines on.

 gitweb/gitweb.perl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 081ac45..8ba2022 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -3751,7 +3751,7 @@ sub get_page_title {
 
 	unless (defined $project) {
 		if (defined $project_filter) {
-			$title .= " - " . to_utf8($project_filter);
+			$title .= " - projects in '" . esc_path($project_filter) . "'";
 		}
 		return $title;
 	}
-- 
1.7.9

^ permalink raw reply related

* Re: [PATCH/RFC] Auto detection in Makefile if msgfmt is not available
From: Ævar Arnfjörð Bjarmason @ 2012-02-12 15:22 UTC (permalink / raw)
  To: Torsten Bögershausen; +Cc: git
In-Reply-To: <201202121342.25113.tboegi@web.de>

2012/2/12 Torsten Bögershausen <tboegi@web.de>:
> Added a simple auto-detection and switch to NO_GETTEXT when
> msgfmt could not be found on the system

Oh look, a start at our very own autoconf replacement :)

^ permalink raw reply

* Re: [PATCH 1/2] git-svn.perl: perform deletions before anything else
From: Steven Walter @ 2012-02-12 15:35 UTC (permalink / raw)
  To: Eric Wong; +Cc: gitster, git
In-Reply-To: <20120212070353.GA30477@dcvr.yhbt.net>

On Sun, Feb 12, 2012 at 2:03 AM, Eric Wong <normalperson@yhbt.net> wrote:
> Steven Walter <stevenrwalter@gmail.com> wrote:
>> Signed-off-by: Steven Walter <stevenrwalter@gmail.com>
>
> Thanks, shall I fixup 2/2 and assume you meant to Sign-off on that, too?

Yes, thanks
-- 
-Steven Walter <stevenrwalter@gmail.com>

^ permalink raw reply

* [PATCH] git-gui: add configurable tab size to the diff view
From: Michael Lutz @ 2012-02-12 15:55 UTC (permalink / raw)
  To: Pat Thoyts; +Cc: git, Michael Lutz

For Tk 8.5 the "wordprocessor" mode allows us to get a bit fancy for merge
diffs and intend the tabs by one to compensate for the additional diff
marker at the line start.

The code is heavily based on how gitk handles tabs.

Signed-off-by: Michael Lutz <michi@icosahedron.de>
---
 git-gui.sh     |    1 +
 lib/diff.tcl   |   20 +++++++++++++++++++-
 lib/option.tcl |    1 +
 3 files changed, 21 insertions(+), 1 deletions(-)

diff --git a/git-gui.sh b/git-gui.sh
index ba4e5c1..22d7665 100755
--- a/git-gui.sh
+++ b/git-gui.sh
@@ -892,6 +892,7 @@ set default_config(gui.fontdiff) [font configure font_diff]
 set default_config(gui.maxfilesdisplayed) 5000
 set default_config(gui.usettk) 1
 set default_config(gui.warndetachedcommit) 1
+set default_config(gui.tabsize) 8
 set font_descs {
 	{fontui   font_ui   {mc "Main Font"}}
 	{fontdiff font_diff {mc "Diff/Console Font"}}
diff --git a/lib/diff.tcl b/lib/diff.tcl
index ec44055..f314197 100644
--- a/lib/diff.tcl
+++ b/lib/diff.tcl
@@ -1,6 +1,19 @@
 # git-gui diff viewer
 # Copyright (C) 2006, 2007 Shawn Pearce
 
+proc apply_tab_size {{firsttab {}}} {
+	global have_tk85 repo_config ui_diff
+
+	set w [font measure font_diff "0"]
+	if {$have_tk85 && $firsttab != 0} {
+		$ui_diff configure -tabs [list [expr {$firsttab * $w}] [expr {($firsttab + $repo_config(gui.tabsize)) * $w}]]
+	} elseif {$have_tk85 || $repo_config(gui.tabsize) != 8} {
+		$ui_diff configure -tabs [expr {$repo_config(gui.tabsize) * $w}]
+	} else {
+		$ui_diff configure -tabs {}
+	}
+}
+
 proc clear_diff {} {
 	global ui_diff current_diff_path current_diff_header
 	global ui_index ui_workdir
@@ -105,6 +118,8 @@ proc show_diff {path w {lno {}} {scroll_pos {}} {callback {}}} {
 
 	set cont_info [list $scroll_pos $callback]
 
+	apply_tab_size 0
+
 	if {[string first {U} $m] >= 0} {
 		merge_load_stages $path [list show_unmerged_diff $cont_info]
 	} elseif {$m eq {_O}} {
@@ -398,7 +413,10 @@ proc read_diff {fd conflict_size cont_info} {
 
 		# -- Automatically detect if this is a 3 way diff.
 		#
-		if {[string match {@@@ *} $line]} {set is_3way_diff 1}
+		if {[string match {@@@ *} $line]} {
+			set is_3way_diff 1
+			apply_tab_size 1
+		}
 
 		if {$::current_diff_inheader} {
 
diff --git a/lib/option.tcl b/lib/option.tcl
index 0cf1da1..b940c44 100644
--- a/lib/option.tcl
+++ b/lib/option.tcl
@@ -159,6 +159,7 @@ proc do_options {} {
 		{c gui.encoding {mc "Default File Contents Encoding"}}
 		{b gui.warndetachedcommit {mc "Warn before committing to a detached head"}}
 		{s gui.stageuntracked {mc "Staging of untracked files"} {list "yes" "no" "ask"}}
+		{i-1..99 gui.tabsize {mc "Tab spacing"}}
 		} {
 		set type [lindex $option 0]
 		set name [lindex $option 1]
-- 
1.7.5.1

^ permalink raw reply related

* Re: [PATCH 2/2] git-svn, perl/Git.pm: extend and use Git->prompt method for querying users
From: Jakub Narebski @ 2012-02-12 16:11 UTC (permalink / raw)
  To: Sven Strickroth; +Cc: Jeff King, Junio C Hamano, git
In-Reply-To: <4F37E2B0.9060007@tu-clausthal.de>

Sven Strickroth wrote:
> Am 03.01.2012 19:40 schrieb Jeff King:

> > There is one difference between how git and ssh use the ASKPASS
> > variable. In git, we try it _first_, and fall back to asking on the
> > terminal.  For ssh, they first try the terminal, and fall back to
> > askpass only when the terminal cannot be opened.
> 
> I checked out subversion (svn co
> http://svn.apache.org/repos/asf/subversion/trunk subversion) and
> performed a "grep ASKPASS * -R": Only match in
> "contrib\client-side\emacs\psvn.el". So I doubt if subversion really
> supports SSH_ASKPASS.

Doesn't Subversion use SSH directly?  If it is so, the question is
about how SSH itself supports SSH_ASKPASS.

-- 
Jakub Narebski
Poland

^ permalink raw reply

* Re: [PATCH 2/2] git-svn, perl/Git.pm: extend and use Git->prompt method for querying users
From: Sven Strickroth @ 2012-02-12 16:02 UTC (permalink / raw)
  To: Jeff King; +Cc: Junio C Hamano, git, Jakub Narebski
In-Reply-To: <20120103184022.GA20926@sigill.intra.peff.net>

Hi,

Am 03.01.2012 19:40 schrieb Jeff King:
> There is one difference between how git and ssh use the ASKPASS
> variable. In git, we try it _first_, and fall back to asking on the
> terminal.  For ssh, they first try the terminal, and fall back to
> askpass only when the terminal cannot be opened.

I checked out subversion (svn co
http://svn.apache.org/repos/asf/subversion/trunk subversion) and
performed a "grep ASKPASS * -R": Only match in
"contrib\client-side\emacs\psvn.el". So I doubt if subversion really
supports SSH_ASKPASS.

-- 
Best regards,
 Sven Strickroth

^ permalink raw reply

* [PATCH] Re: 1.7.9, libcharset missing from EXTLIBS
From: Дилян Палаузов @ 2012-02-12 16:23 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git
In-Reply-To: <7vfwegl4x8.fsf@alter.siamese.dyndns.org>

[-- Attachment #1: Type: text/plain, Size: 4091 bytes --]

The function locale_charset might appear in libiconv as local symbol.  In
this case linking with -lcharset delivers locale_charset, when the function
is exported from that library.  This patch defines a new Autoconf/make
variable CHARSET_LIB to contain the library exporting locale_charset and
fixes configure.ac to fill CHARSET_LIB with " -lcharset", when
locale_charset is not exported from libiconv, but is exported from
libcharset, and amends EXTLIBS to include CHARSET_LIB when HAVE_LIBCHARSET_H
is defined.

Signed-off-by: Дилян Палаузов <git-dpa@aegee.org>
---
 Makefile      |    6 ++++++
 config.mak.in |    1 +
 configure.ac  |   10 ++++++++++
 3 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/Makefile b/Makefile
index 87fb30a..571d864 100644
--- a/Makefile
+++ b/Makefile
@@ -56,6 +56,11 @@ all::
 # FreeBSD can use either, but MinGW and some others need to use
 # libcharset.h's locale_charset() instead.
 #
+# Define CHARSET_LIB to contain the additional library exporting the symbol
+# locale_charset to link against.  configure.ac checks if locale_charset is
+# exported from libiconv, if not, it checks if locale_charset is
exported from
+# libcharset and defines then CHARSET_LIB to -lcharset .
+#
 # Define LIBC_CONTAINS_LIBINTL if your gettext implementation doesn't
 # need -lintl when linking.
 #
@@ -1698,6 +1703,7 @@ endif

 ifdef HAVE_LIBCHARSET_H
 	BASIC_CFLAGS += -DHAVE_LIBCHARSET_H
+	EXTLIBS +=$(CHARSET_LIB)
 endif

 ifdef HAVE_DEV_TTY
diff --git a/config.mak.in b/config.mak.in
index 10698c8..b2ba710 100644
--- a/config.mak.in
+++ b/config.mak.in
@@ -74,3 +74,4 @@ SNPRINTF_RETURNS_BOGUS=@SNPRINTF_RETURNS_BOGUS@
 NO_PTHREADS=@NO_PTHREADS@
 PTHREAD_CFLAGS=@PTHREAD_CFLAGS@
 PTHREAD_LIBS=@PTHREAD_LIBS@
+CHARSET_LIB=@CHARSET_LIB@
diff --git a/configure.ac b/configure.ac
index 630dbdd..1c21a5b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -836,6 +836,16 @@ AC_CHECK_HEADER([libcharset.h],
 [HAVE_LIBCHARSET_H=YesPlease],
 [HAVE_LIBCHARSET_H=])
 AC_SUBST(HAVE_LIBCHARSET_H)
+# Define CHARSET_LIB if libiconv does not export the locale_charset symbol
+# and libcharset does
+CHARSET_LIB=
+AC_CHECK_LIB([iconv], [locale_charset],
+       [],
+       [AC_CHECK_LIB([charset], [locale_charset],
+                     [CHARSET_LIB=" -lcharset"])
+       ]
+)
+AC_SUBST(CHARSET_LIB)
 #
 # Define NO_STRCASESTR if you don't have strcasestr.
 GIT_CHECK_FUNC(strcasestr,
-- 
1.7.9



On 12.02.2012 11:30, Junio C Hamano wrote:
> Дилян Палаузов  <dilyan.palauzov@aegee.org> writes:
> 
>> diff -u git-1.7.9.orig/config.mak.in git-1.7.9/config.mak.in
>> --- git-1.7.9.orig/config.mak.in        2012-01-27 20:51:04.000000000 +0000
>> +++ git-1.7.9/config.mak.in     2012-02-12 00:52:41.457968080 +0000
>> @@ -74,3 +74,4 @@
>>  NO_PTHREADS=@NO_PTHREADS@
>>  PTHREAD_CFLAGS=@PTHREAD_CFLAGS@
>>  PTHREAD_LIBS=@PTHREAD_LIBS@
>> +LINK_CHARSET=@LINK_CHARSET@
>> diff -u git-1.7.9.orig/configure.ac git-1.7.9/configure.ac
>> --- git-1.7.9.orig/configure.ac 2012-01-27 20:51:04.000000000 +0000
>> +++ git-1.7.9/configure.ac      2012-02-12 00:44:29.222967868 +0000
>> @@ -836,6 +836,18 @@
>>  [HAVE_LIBCHARSET_H=YesPlease],
>>  [HAVE_LIBCHARSET_H=])
>>  AC_SUBST(HAVE_LIBCHARSET_H)
>> +# Define LINK_LIBCHARSET if libiconv does not export the
> 
> Because the use of configure is optional in our build infrastructure, I
> wouldn't have objected if this comment were missing from configure.ac, but
> the new variable *must* be described in Makefile (see the top 250 lines or
> so of that file).
> 
> I also need to point out that LINK_LIBCHARSET does not sit very well with
> the way how existing Makefile variables are named. Perhaps make the new
> variable contain the necessary string ("-lcharset" in your case), and name
> it CHARSET_LIB or something?  By doing so, when we find a platform that
> has the necessary locale_charset() not in libcharset.{a,so} but somewhere
> else, e.g. libxyzzy.a, we can accomodate it with "CHARSET_LIB = -lxyzzy".
> 
> Thanks.  Also as Ævar pointed out, please do not forget to sign off your
> patch.

[-- Attachment #2: dilyan_palauzov.vcf --]
[-- Type: text/x-vcard, Size: 381 bytes --]

begin:vcard
fn;quoted-printable:=D0=94=D0=B8=D0=BB=D1=8F=D0=BD =D0=9F=D0=B0=D0=BB=D0=B0=D1=83=D0=B7=D0=BE=
	=D0=B2
n;quoted-printable;quoted-printable:=D0=9F=D0=B0=D0=BB=D0=B0=D1=83=D0=B7=D0=BE=D0=B2;=D0=94=D0=B8=D0=BB=D1=8F=D0=BD
email;internet:dilyan.palauzov@aegee.org
tel;home:+49-721-94193270
tel;cell:+49-162-4091172
note:sip:8372@aegee.org
version:2.1
end:vcard


^ permalink raw reply related

* Re: [PATCH 2/2] git-svn, perl/Git.pm: extend and use Git->prompt method for querying users
From: Sven Strickroth @ 2012-02-12 16:26 UTC (permalink / raw)
  To: Jakub Narebski; +Cc: Jeff King, Junio C Hamano, git
In-Reply-To: <201202121711.45920.jnareb@gmail.com>

Am 12.02.2012 17:11 schrieb Jakub Narebski:
> Doesn't Subversion use SSH directly?  If it is so, the question is
> about how SSH itself supports SSH_ASKPASS.

Oh sorry, I mixed up SSH and SVN_ASKPASS. :( Of couse SSH_ASKPASS is
provided by the ssh-client itself.

-- 
Best regards,
 Sven Strickroth

^ permalink raw reply

* Re: [PATCH] strbuf: move strbuf_readline_fd() from bundle.c to strbuf.{c,h}
From: Junio C Hamano @ 2012-02-12 17:07 UTC (permalink / raw)
  To: 徐迪; +Cc: Git 邮件列表
In-Reply-To: <CAMocUqSefruci_ueWHUH6rqz8VFcakHErq8QV_bvghWMyHKVJg@mail.gmail.com>

徐迪 <xudifsd@gmail.com> writes:

> Shouldn't I supposed to receive any information about this patch?

Not necessarily X-<.

Things can get lost in the noise, and sending a reminder message like you
just did, after waiting for a few to several days, is considered a good
practice.

> Has it accepted or not?

Anything and everything being considered for inclusion is reachable from
the tip of the 'next' branch; other patches that might turn out to be of
value, or ones that at least deserve more sets of eyeballs, are only in
the 'pu' branch.

> If not what wrong with this patch?

That is not a valid question to ask.

We do not apply a patch merely because it is _not wrong_.  It must be
clear why it is a good thing for the project to apply the patch.

Your patch in question is barely a day old and I didn't have a chance to
look at it, and I do not think other volunteer reviewers did, either, so
I don't know if it is wrong or it has merit yet.

^ permalink raw reply

* Re: [PATCH] strbuf: move strbuf_readline_fd() from bundle.c to strbuf.{c,h}
From: Junio C Hamano @ 2012-02-12 17:20 UTC (permalink / raw)
  To: 徐迪; +Cc: Git 邮件列表
In-Reply-To: <CAMocUqRutwERQ64a=9t36Za6Lm8KxpseS0NYbdGKWbixbsXeyw@mail.gmail.com>

徐迪 <xudifsd@gmail.com> writes:

> -/* Eventually this should go to strbuf.[ch] */
> -static int strbuf_readline_fd(struct strbuf *sb, int fd)
> -{

Unlike other line-oriented input functions in strbuf.c, this hardcodes the
LF as the terminator, hence is not capable of reading -z output.  As an
internal function to the bundle reader implementation, that is perfectly
fine, because we know lines in bundle ends with '\n'.

But if we were to promote this to a generic API, that aspect of this
function needs to be reconsidered, and if we decide to allow non-LF line
terminator for consistency with other functions, the current callers in
this function have to pass an extra parameter "term" to it.

We simply do not have enough datapoint to see if it is worth it to promote
this to strbuf.c with such a change, especially when there is no other
caller to it.  That is why we said "Eventually" here when we introduced
this function at e9ee84c (bundle: allowing to read from an unseekable fd,
2011-10-13).

I do not think the situation changed yet in any way since then.

^ permalink raw reply

* Re: [PATCH/RFC] Auto detection in Makefile if msgfmt is not available
From: Junio C Hamano @ 2012-02-12 17:22 UTC (permalink / raw)
  To: Ævar Arnfjörð Bjarmason; +Cc: Torsten Bögershausen, git
In-Reply-To: <CACBZZX4W0onNOstQqNethDBv1tZSijt8Q_HDrcuWr+Z8WYV90w@mail.gmail.com>

Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:

> 2012/2/12 Torsten Bögershausen <tboegi@web.de>:
>> Added a simple auto-detection and switch to NO_GETTEXT when
>> msgfmt could not be found on the system
>
> Oh look, a start at our very own autoconf replacement :)

It is a bad idea for the Makefile to silently decide to flip NO_GETTEXT
when the system happens to be missing msgfmt without letting the user know
what is happening.  Current behaviour to error out will at least give an
opportunity to stop and think if installing gettext suite on the system
makes sense before proceeding.

Given that the Makefile only has this to say:

    # Define NO_GETTEXT if you don't want Git output to be translated.
    # A translated Git requires GNU libintl or another gettext implementation,
    # plus libintl-perl at runtime.

expecting that "msgfmt: no such command" clicks "Ah, I do not have gettext
suite" for anybody who attempts to build (and fail) Git, it however is
also a bit unfair and unhelpful.

Perhaps something like this is necessary and sufficient.

    # Define NO_GETTEXT if you don't want Git output to be translated or if
    # you do not have gettext suite (e.g. "msgfmt" and "gettext" commands).
    # A translated Git requires GNU libintl or another gettext implementation,
    # plus libintl-perl at runtime.

^ permalink raw reply

* [RFC PATCH 0/3] git-p4: move to toplevel
From: Pete Wyckoff @ 2012-02-12 18:13 UTC (permalink / raw)
  To: git; +Cc: Luke Diamand, Vitor Antunes

The git-p4 code is in a single python script down in
contrib/fast-import now.  I'd like to move it up to the top-level
source directory of git to make it easier to build and
distribute.  Git-p4 already takes advantage of the git
infrastructure for documentation and testing, as well as the
community support (Junio, many reviewers).

Users install git-p4 currently by copying the git-p4 script from
contrib/fast-import into a local or personal bin directory, and
setting up an alias for "git p4" to invoke it.  If it is part of
the install, the command will be available automatically.  Also,
distributions may be more likely to pick it up either as part of
a core git package, or as a separate add-on.  Getting support
for python and git-p4 in msysgit is something I'd like to see
happen too.

While I considered taking this opportunity to split up git-p4
into more modular components across multiple files, it seems best
now just to do the script move intact.  That effort could come
later.  If anyone has a strong preference to do this now, we could.

Developer note:  Like all scripts in git, the source file is
git-p4.py, which is built with "make" to git-p4, substituting the
specified path for python in the first line.  Be sure to edit the
source file, and to build before running tests.  This is sort of
a pain for existing developers, but hopefully we can get used to it.


Pete Wyckoff (3):
  git-p4: move to toplevel
  git p4: update name in script
  git p4: use "git p4" directly in tests

 .gitignore                              |    1 +
 Documentation/git-p4.txt                |   23 +++------
 INSTALL                                 |    3 +
 Makefile                                |    1 +
 contrib/fast-import/git-p4.README       |   13 +++++
 contrib/fast-import/git-p4.bat          |    1 -
 contrib/fast-import/git-p4 => git-p4.py |   14 +++---
 t/lib-git-p4.sh                         |    8 +--
 t/t9800-git-p4-basic.sh                 |   84 +++++++++++++++---------------
 t/t9801-git-p4-branch.sh                |   32 ++++++------
 t/t9802-git-p4-filetype.sh              |   10 ++--
 t/t9803-git-p4-shell-metachars.sh       |   12 ++--
 t/t9804-git-p4-label.sh                 |    6 +-
 t/t9805-git-p4-skip-submit-edit.sh      |   22 ++++----
 t/t9806-git-p4-options.sh               |   28 +++++-----
 t/t9807-git-p4-submit.sh                |   22 ++++----
 t/t9808-git-p4-chdir.sh                 |    6 +-
 t/t9809-git-p4-client-view.sh           |   64 ++++++++++++------------
 18 files changed, 179 insertions(+), 171 deletions(-)
 create mode 100644 contrib/fast-import/git-p4.README
 delete mode 100644 contrib/fast-import/git-p4.bat
 rename contrib/fast-import/git-p4 => git-p4.py (99%)

-- 
1.7.9.192.ga1d4b

^ permalink raw reply

* [RFC PATCH 1/3] git-p4: move to toplevel
From: Pete Wyckoff @ 2012-02-12 18:13 UTC (permalink / raw)
  To: git; +Cc: Luke Diamand, Vitor Antunes
In-Reply-To: <1329070423-23761-1-git-send-email-pw@padd.com>

Move git-p4 out of contrib/fast-import into the main code base,
aside other foreign SCM tools.

Signed-off-by: Pete Wyckoff <pw@padd.com>
---
 .gitignore                              |    1 +
 Documentation/git-p4.txt                |   23 ++++++++---------------
 INSTALL                                 |    3 +++
 Makefile                                |    1 +
 contrib/fast-import/git-p4.README       |   13 +++++++++++++
 contrib/fast-import/git-p4.bat          |    1 -
 contrib/fast-import/git-p4 => git-p4.py |    0
 t/lib-git-p4.sh                         |    2 +-
 8 files changed, 27 insertions(+), 17 deletions(-)
 create mode 100644 contrib/fast-import/git-p4.README
 delete mode 100644 contrib/fast-import/git-p4.bat
 rename contrib/fast-import/git-p4 => git-p4.py (100%)

diff --git a/.gitignore b/.gitignore
index 87fcc5f..5a0782f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -92,6 +92,7 @@
 /git-name-rev
 /git-mv
 /git-notes
+/git-p4
 /git-pack-redundant
 /git-pack-objects
 /git-pack-refs
diff --git a/Documentation/git-p4.txt b/Documentation/git-p4.txt
index 8b92cc0..7757c66 100644
--- a/Documentation/git-p4.txt
+++ b/Documentation/git-p4.txt
@@ -3,7 +3,7 @@ git-p4(1)
 
 NAME
 ----
-git-p4 - Import from and submit to Perforce repositories
+'git p4' - Import from and submit to Perforce repositories
 
 
 SYNOPSIS
@@ -31,13 +31,6 @@ the updated p4 remote branch.
 
 EXAMPLE
 -------
-* Create an alias for 'git p4', using the full path to the 'git-p4'
-  script if needed:
-+
-------------
-$ git config --global alias.p4 '!git-p4'
-------------
-
 * Clone a repository:
 +
 ------------
@@ -303,23 +296,23 @@ CLIENT SPEC
 -----------
 The p4 client specification is maintained with the 'p4 client' command
 and contains among other fields, a View that specifies how the depot
-is mapped into the client repository.  Git-p4 can consult the client
+is mapped into the client repository.  'Git p4' can consult the client
 spec when given the '--use-client-spec' option or useClientSpec
 variable.
 
-The full syntax for a p4 view is documented in 'p4 help views'.  Git-p4
+The full syntax for a p4 view is documented in 'p4 help views'.  'Git p4'
 knows only a subset of the view syntax.  It understands multi-line
 mappings, overlays with '+', exclusions with '-' and double-quotes
-around whitespace.  Of the possible wildcards, git-p4 only handles
-'...', and only when it is at the end of the path.  Git-p4 will complain
+around whitespace.  Of the possible wildcards, 'git p4' only handles
+'...', and only when it is at the end of the path.  'Git p4' will complain
 if it encounters an unhandled wildcard.
 
 Bugs in the implementation of overlap mappings exist.  If multiple depot
 paths map through overlays to the same location in the repository,
-git-p4 can choose the wrong one.  This is hard to solve without
-dedicating a client spec just for git-p4.
+'git p4' can choose the wrong one.  This is hard to solve without
+dedicating a client spec just for 'git p4'.
 
-The name of the client can be given to git-p4 in multiple ways.  The
+The name of the client can be given to 'git p4' in multiple ways.  The
 variable 'git-p4.client' takes precedence if it exists.  Otherwise,
 normal p4 mechanisms of determining the client are used:  environment
 variable P4CLIENT, a file referenced by P4CONFIG, or the local host name.
diff --git a/INSTALL b/INSTALL
index 6fa83fe..834fa82 100644
--- a/INSTALL
+++ b/INSTALL
@@ -122,6 +122,9 @@ Issues of note:
 	  use English. Under autoconf the configure script will do this
 	  automatically if it can't find libintl on the system.
 
+	- Python version 2.6 or later is needed to use the git-p4
+	  interface to Perforce.
+
  - Some platform specific issues are dealt with Makefile rules,
    but depending on your specific installation, you may not
    have all the libraries/tools needed, or you may have
diff --git a/Makefile b/Makefile
index 87fb30a..f2ff7fd 100644
--- a/Makefile
+++ b/Makefile
@@ -436,6 +436,7 @@ SCRIPT_PERL += git-send-email.perl
 SCRIPT_PERL += git-svn.perl
 
 SCRIPT_PYTHON += git-remote-testgit.py
+SCRIPT_PYTHON += git-p4.py
 
 SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH)) \
 	  $(patsubst %.perl,%,$(SCRIPT_PERL)) \
diff --git a/contrib/fast-import/git-p4.README b/contrib/fast-import/git-p4.README
new file mode 100644
index 0000000..d9a7684
--- /dev/null
+++ b/contrib/fast-import/git-p4.README
@@ -0,0 +1,13 @@
+The git-p4 script moved to the top-level of the git source directory.
+
+Invoke it as any other git command, like "git p4 clone", for instance.
+
+Note that the top-level git-p4.py script is now the source.  It is
+built using make to git-p4, which will be installed.
+
+Windows users can copy the git-p4.py source script directly, possibly
+invoking it through a batch file called "git-p4.bat" in the same folder.
+It should contain just one line:
+
+    @python "%~d0%~p0git-p4.py" %*
+
diff --git a/contrib/fast-import/git-p4.bat b/contrib/fast-import/git-p4.bat
deleted file mode 100644
index 9f97e88..0000000
--- a/contrib/fast-import/git-p4.bat
+++ /dev/null
@@ -1 +0,0 @@
-@python "%~d0%~p0git-p4" %*
diff --git a/contrib/fast-import/git-p4 b/git-p4.py
similarity index 100%
rename from contrib/fast-import/git-p4
rename to git-p4.py
diff --git a/t/lib-git-p4.sh b/t/lib-git-p4.sh
index a870f9a..49edaae 100644
--- a/t/lib-git-p4.sh
+++ b/t/lib-git-p4.sh
@@ -13,7 +13,7 @@ fi
 	test_done
 }
 
-GITP4="$GIT_BUILD_DIR/contrib/fast-import/git-p4"
+GITP4="$GIT_BUILD_DIR/git-p4"
 
 # Try to pick a unique port: guess a large number, then hope
 # no more than one of each test is running.
-- 
1.7.9.192.ga1d4b

^ permalink raw reply related

* [RFC PATCH 2/3] git p4: update name in script
From: Pete Wyckoff @ 2012-02-12 18:13 UTC (permalink / raw)
  To: git; +Cc: Luke Diamand, Vitor Antunes
In-Reply-To: <1329070423-23761-1-git-send-email-pw@padd.com>

In messages to the user and comments, change "git-p4" to "git p4".

Signed-off-by: Pete Wyckoff <pw@padd.com>
---
 git-p4.py |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/git-p4.py b/git-p4.py
index a78d9c5..1e27d70 100755
--- a/git-p4.py
+++ b/git-p4.py
@@ -988,12 +988,12 @@ class P4Submit(Command, P4UserMap):
                     print "The following files should be scheduled for deletion with p4 delete:"
                     print " ".join(filesToDelete)
                 die("Please resolve and submit the conflict manually and "
-                    + "continue afterwards with git-p4 submit --continue")
+                    + "continue afterwards with git p4 submit --continue")
             elif response == "w":
                 system(diffcmd + " > patch.txt")
                 print "Patch saved to patch.txt in %s !" % self.clientPath
                 die("Please resolve and submit the conflict manually and "
-                    "continue afterwards with git-p4 submit --continue")
+                    "continue afterwards with git p4 submit --continue")
 
         system(applyPatchCmd)
 
@@ -1037,8 +1037,8 @@ class P4Submit(Command, P4UserMap):
 
             if self.checkAuthorship and not self.p4UserIsMe(p4User):
                 submitTemplate += "######## git author %s does not match your p4 account.\n" % gitEmail
-                submitTemplate += "######## Use git-p4 option --preserve-user to modify authorship\n"
-                submitTemplate += "######## Use git-p4 config git-p4.skipUserNameCheck hides this message.\n"
+                submitTemplate += "######## Use option --preserve-user to modify authorship.\n"
+                submitTemplate += "######## Variable git-p4.skipUserNameCheck hides this message.\n"
 
             separatorLine = "######## everything below this line is just the diff #######\n"
 
@@ -2106,7 +2106,7 @@ class P4Sync(Command, P4UserMap):
 
         details["change"] = newestRevision
 
-        # Use time from top-most change so that all git-p4 clones of
+        # Use time from top-most change so that all git p4 clones of
         # the same p4 repo have the same commit SHA1s.
         res = p4CmdList("describe -s %d" % newestRevision)
         newestTime = None
@@ -2349,8 +2349,8 @@ class P4Sync(Command, P4UserMap):
 
                 changes.sort()
             else:
-                # catch "git-p4 sync" with no new branches, in a repo that
-                # does not have any existing git-p4 branches
+                # catch "git p4 sync" with no new branches, in a repo that
+                # does not have any existing p4 branches
                 if len(args) == 0 and not self.p4BranchesInGit:
                     die("No remote p4 branches.  Perhaps you never did \"git p4 clone\" in here.");
                 if self.verbose:
-- 
1.7.9.192.ga1d4b

^ permalink raw reply related

* [RFC PATCH 3/3] git p4: use "git p4" directly in tests
From: Pete Wyckoff @ 2012-02-12 18:13 UTC (permalink / raw)
  To: git; +Cc: Luke Diamand, Vitor Antunes
In-Reply-To: <1329070423-23761-1-git-send-email-pw@padd.com>

Drop the $GITP4 variable that was used to specify the script in
contrib/fast-import/.  The command is called "git p4" now, not
"git-p4".  Variables will remain in a section called "git-p4".

Signed-off-by: Pete Wyckoff <pw@padd.com>
---
 t/lib-git-p4.sh                    |    8 +--
 t/t9800-git-p4-basic.sh            |   84 ++++++++++++++++++------------------
 t/t9801-git-p4-branch.sh           |   32 +++++++-------
 t/t9802-git-p4-filetype.sh         |   10 ++--
 t/t9803-git-p4-shell-metachars.sh  |   12 +++---
 t/t9804-git-p4-label.sh            |    6 +-
 t/t9805-git-p4-skip-submit-edit.sh |   22 +++++-----
 t/t9806-git-p4-options.sh          |   28 ++++++------
 t/t9807-git-p4-submit.sh           |   22 +++++-----
 t/t9808-git-p4-chdir.sh            |    6 +-
 t/t9809-git-p4-client-view.sh      |   64 ++++++++++++++--------------
 11 files changed, 146 insertions(+), 148 deletions(-)

diff --git a/t/lib-git-p4.sh b/t/lib-git-p4.sh
index 49edaae..b90986c 100644
--- a/t/lib-git-p4.sh
+++ b/t/lib-git-p4.sh
@@ -1,20 +1,18 @@
 #
-# Library code for git-p4 tests
+# Library code for git p4 tests
 #
 
 . ./test-lib.sh
 
 if ! test_have_prereq PYTHON; then
-	skip_all='skipping git-p4 tests; python not available'
+	skip_all='skipping git p4 tests; python not available'
 	test_done
 fi
 ( p4 -h && p4d -h ) >/dev/null 2>&1 || {
-	skip_all='skipping git-p4 tests; no p4 or p4d'
+	skip_all='skipping git p4 tests; no p4 or p4d'
 	test_done
 }
 
-GITP4="$GIT_BUILD_DIR/git-p4"
-
 # Try to pick a unique port: guess a large number, then hope
 # no more than one of each test is running.
 #
diff --git a/t/t9800-git-p4-basic.sh b/t/t9800-git-p4-basic.sh
index 04ee20e..36a7603 100755
--- a/t/t9800-git-p4-basic.sh
+++ b/t/t9800-git-p4-basic.sh
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-test_description='git-p4 tests'
+test_description='git p4 tests'
 
 . ./lib-git-p4.sh
 
@@ -20,8 +20,8 @@ test_expect_success 'add p4 files' '
 	)
 '
 
-test_expect_success 'basic git-p4 clone' '
-	"$GITP4" clone --dest="$git" //depot &&
+test_expect_success 'basic git p4 clone' '
+	git p4 clone --dest="$git" //depot &&
 	test_when_finished cleanup_git &&
 	(
 		cd "$git" &&
@@ -30,8 +30,8 @@ test_expect_success 'basic git-p4 clone' '
 	)
 '
 
-test_expect_success 'git-p4 clone @all' '
-	"$GITP4" clone --dest="$git" //depot@all &&
+test_expect_success 'git p4 clone @all' '
+	git p4 clone --dest="$git" //depot@all &&
 	test_when_finished cleanup_git &&
 	(
 		cd "$git" &&
@@ -40,12 +40,12 @@ test_expect_success 'git-p4 clone @all' '
 	)
 '
 
-test_expect_success 'git-p4 sync uninitialized repo' '
+test_expect_success 'git p4 sync uninitialized repo' '
 	test_create_repo "$git" &&
 	test_when_finished cleanup_git &&
 	(
 		cd "$git" &&
-		test_must_fail "$GITP4" sync
+		test_must_fail git p4 sync
 	)
 '
 
@@ -53,13 +53,13 @@ test_expect_success 'git-p4 sync uninitialized repo' '
 # Create a git repo by hand.  Add a commit so that HEAD is valid.
 # Test imports a new p4 repository into a new git branch.
 #
-test_expect_success 'git-p4 sync new branch' '
+test_expect_success 'git p4 sync new branch' '
 	test_create_repo "$git" &&
 	test_when_finished cleanup_git &&
 	(
 		cd "$git" &&
 		test_commit head &&
-		"$GITP4" sync --branch=refs/remotes/p4/depot //depot@all &&
+		git p4 sync --branch=refs/remotes/p4/depot //depot@all &&
 		git log --oneline p4/depot >lines &&
 		test_line_count = 2 lines
 	)
@@ -76,7 +76,7 @@ test_expect_success 'clone two dirs' '
 		p4 add sub2/f2 &&
 		p4 submit -d "sub2/f2"
 	) &&
-	"$GITP4" clone --dest="$git" //depot/sub1 //depot/sub2 &&
+	git p4 clone --dest="$git" //depot/sub1 //depot/sub2 &&
 	test_when_finished cleanup_git &&
 	(
 		cd "$git" &&
@@ -94,7 +94,7 @@ test_expect_success 'clone two dirs, @all' '
 		p4 add sub1/f3 &&
 		p4 submit -d "sub1/f3"
 	) &&
-	"$GITP4" clone --dest="$git" //depot/sub1@all //depot/sub2@all &&
+	git p4 clone --dest="$git" //depot/sub1@all //depot/sub2@all &&
 	test_when_finished cleanup_git &&
 	(
 		cd "$git" &&
@@ -112,7 +112,7 @@ test_expect_success 'clone two dirs, @all, conflicting files' '
 		p4 add sub2/f3 &&
 		p4 submit -d "sub2/f3"
 	) &&
-	"$GITP4" clone --dest="$git" //depot/sub1@all //depot/sub2@all &&
+	git p4 clone --dest="$git" //depot/sub1@all //depot/sub2@all &&
 	test_when_finished cleanup_git &&
 	(
 		cd "$git" &&
@@ -134,7 +134,7 @@ test_expect_success 'exit when p4 fails to produce marshaled output' '
 	exit 1
 	EOF
 	chmod 755 "$badp4dir"/p4 &&
-	PATH="$badp4dir:$PATH" "$GITP4" clone --dest="$git" //depot >errs 2>&1 ; retval=$? &&
+	PATH="$badp4dir:$PATH" git p4 clone --dest="$git" //depot >errs 2>&1 ; retval=$? &&
 	test $retval -eq 1 &&
 	test_must_fail grep -q Traceback errs
 '
@@ -151,8 +151,8 @@ test_expect_success 'add p4 files with wildcards in the names' '
 	)
 '
 
-test_expect_success 'wildcard files git-p4 clone' '
-	"$GITP4" clone --dest="$git" //depot &&
+test_expect_success 'wildcard files git p4 clone' '
+	git p4 clone --dest="$git" //depot &&
 	test_when_finished cleanup_git &&
 	(
 		cd "$git" &&
@@ -164,7 +164,7 @@ test_expect_success 'wildcard files git-p4 clone' '
 '
 
 test_expect_success 'clone bare' '
-	"$GITP4" clone --dest="$git" --bare //depot &&
+	git p4 clone --dest="$git" --bare //depot &&
 	test_when_finished cleanup_git &&
 	(
 		cd "$git" &&
@@ -209,7 +209,7 @@ test_expect_success 'preserve users' '
 	p4_add_user alice Alice &&
 	p4_add_user bob Bob &&
 	p4_grant_admin alice &&
-	"$GITP4" clone --dest="$git" //depot &&
+	git p4 clone --dest="$git" //depot &&
 	test_when_finished cleanup_git &&
 	(
 		cd "$git" &&
@@ -218,7 +218,7 @@ test_expect_success 'preserve users' '
 		git commit --author "Alice <alice@localhost>" -m "a change by alice" file1 &&
 		git commit --author "Bob <bob@localhost>" -m "a change by bob" file2 &&
 		git config git-p4.skipSubmitEditCheck true &&
-		P4EDITOR=touch P4USER=alice P4PASSWD=secret "$GITP4" commit --preserve-user &&
+		P4EDITOR=touch P4USER=alice P4PASSWD=secret git p4 commit --preserve-user &&
 		p4_check_commit_author file1 alice &&
 		p4_check_commit_author file2 bob
 	)
@@ -227,21 +227,21 @@ test_expect_success 'preserve users' '
 # Test username support, submitting as bob, who lacks admin rights. Should
 # not submit change to p4 (git diff should show deltas).
 test_expect_success 'refuse to preserve users without perms' '
-	"$GITP4" clone --dest="$git" //depot &&
+	git p4 clone --dest="$git" //depot &&
 	test_when_finished cleanup_git &&
 	(
 		cd "$git" &&
 		git config git-p4.skipSubmitEditCheck true &&
 		echo "username-noperms: a change by alice" >>file1 &&
 		git commit --author "Alice <alice@localhost>" -m "perms: a change by alice" file1 &&
-		P4EDITOR=touch P4USER=bob P4PASSWD=secret test_must_fail "$GITP4" commit --preserve-user &&
+		P4EDITOR=touch P4USER=bob P4PASSWD=secret test_must_fail git p4 commit --preserve-user &&
 		test_must_fail git diff --exit-code HEAD..p4/master
 	)
 '
 
 # What happens with unknown author? Without allowMissingP4Users it should fail.
 test_expect_success 'preserve user where author is unknown to p4' '
-	"$GITP4" clone --dest="$git" //depot &&
+	git p4 clone --dest="$git" //depot &&
 	test_when_finished cleanup_git &&
 	(
 		cd "$git" &&
@@ -250,24 +250,24 @@ test_expect_success 'preserve user where author is unknown to p4' '
 		git commit --author "Bob <bob@localhost>" -m "preserve: a change by bob" file1 &&
 		echo "username-unknown: a change by charlie" >>file1 &&
 		git commit --author "Charlie <charlie@localhost>" -m "preserve: a change by charlie" file1 &&
-		P4EDITOR=touch P4USER=alice P4PASSWD=secret test_must_fail "$GITP4" commit --preserve-user &&
+		P4EDITOR=touch P4USER=alice P4PASSWD=secret test_must_fail git p4 commit --preserve-user &&
 		test_must_fail git diff --exit-code HEAD..p4/master &&
 
 		echo "$0: repeat with allowMissingP4Users enabled" &&
 		git config git-p4.allowMissingP4Users true &&
 		git config git-p4.preserveUser true &&
-		P4EDITOR=touch P4USER=alice P4PASSWD=secret "$GITP4" commit &&
+		P4EDITOR=touch P4USER=alice P4PASSWD=secret git p4 commit &&
 		git diff --exit-code HEAD..p4/master &&
 		p4_check_commit_author file1 alice
 	)
 '
 
-# If we're *not* using --preserve-user, git-p4 should warn if we're submitting
+# If we're *not* using --preserve-user, git p4 should warn if we're submitting
 # changes that are not all ours.
 # Test: user in p4 and user unknown to p4.
 # Test: warning disabled and user is the same.
 test_expect_success 'not preserving user with mixed authorship' '
-	"$GITP4" clone --dest="$git" //depot &&
+	git p4 clone --dest="$git" //depot &&
 	test_when_finished cleanup_git &&
 	(
 		cd "$git" &&
@@ -275,20 +275,20 @@ test_expect_success 'not preserving user with mixed authorship' '
 		p4_add_user derek Derek &&
 
 		make_change_by_user usernamefile3 Derek derek@localhost &&
-		P4EDITOR=cat P4USER=alice P4PASSWD=secret "$GITP4" commit |\
+		P4EDITOR=cat P4USER=alice P4PASSWD=secret git p4 commit |\
 		grep "git author derek@localhost does not match" &&
 
 		make_change_by_user usernamefile3 Charlie charlie@localhost &&
-		P4EDITOR=cat P4USER=alice P4PASSWD=secret "$GITP4" commit |\
+		P4EDITOR=cat P4USER=alice P4PASSWD=secret git p4 commit |\
 		grep "git author charlie@localhost does not match" &&
 
 		make_change_by_user usernamefile3 alice alice@localhost &&
-		P4EDITOR=cat P4USER=alice P4PASSWD=secret "$GITP4" |\
+		P4EDITOR=cat P4USER=alice P4PASSWD=secret git p4 |\
 		test_must_fail grep "git author.*does not match" &&
 
 		git config git-p4.skipUserNameCheck true &&
 		make_change_by_user usernamefile3 Charlie charlie@localhost &&
-		P4EDITOR=cat P4USER=alice P4PASSWD=secret "$GITP4" commit |\
+		P4EDITOR=cat P4USER=alice P4PASSWD=secret git p4 commit |\
 		test_must_fail grep "git author.*does not match" &&
 
 		p4_check_commit_author usernamefile3 alice
@@ -307,7 +307,7 @@ test_expect_success 'initial import time from top change time' '
 	p4change=$(p4 -G changes -m 1 //depot/... | marshal_dump change) &&
 	p4time=$(p4 -G changes -m 1 //depot/... | marshal_dump time) &&
 	sleep 3 &&
-	"$GITP4" clone --dest="$git" //depot &&
+	git p4 clone --dest="$git" //depot &&
 	test_when_finished cleanup_git &&
 	(
 		cd "$git" &&
@@ -325,7 +325,7 @@ test_expect_success 'initial import time from top change time' '
 # Repeat, this time with a smaller threshold and confirm that the rename is
 # detected in P4.
 test_expect_success 'detect renames' '
-	"$GITP4" clone --dest="$git" //depot@all &&
+	git p4 clone --dest="$git" //depot@all &&
 	test_when_finished cleanup_git &&
 	(
 		cd "$git" &&
@@ -334,7 +334,7 @@ test_expect_success 'detect renames' '
 		git mv file1 file4 &&
 		git commit -a -m "Rename file1 to file4" &&
 		git diff-tree -r -M HEAD &&
-		"$GITP4" submit &&
+		git p4 submit &&
 		p4 filelog //depot/file4 &&
 		p4 filelog //depot/file4 | test_must_fail grep -q "branch from" &&
 
@@ -342,7 +342,7 @@ test_expect_success 'detect renames' '
 		git commit -a -m "Rename file4 to file5" &&
 		git diff-tree -r -M HEAD &&
 		git config git-p4.detectRenames true &&
-		"$GITP4" submit &&
+		git p4 submit &&
 		p4 filelog //depot/file5 &&
 		p4 filelog //depot/file5 | grep -q "branch from //depot/file4" &&
 
@@ -354,7 +354,7 @@ test_expect_success 'detect renames' '
 		level=$(git diff-tree -r -M HEAD | sed 1d | cut -f1 | cut -d" " -f5 | sed "s/R0*//") &&
 		test -n "$level" && test "$level" -gt 0 && test "$level" -lt 98 &&
 		git config git-p4.detectRenames $(($level + 2)) &&
-		"$GITP4" submit &&
+		git p4 submit &&
 		p4 filelog //depot/file6 &&
 		p4 filelog //depot/file6 | test_must_fail grep -q "branch from" &&
 
@@ -366,7 +366,7 @@ test_expect_success 'detect renames' '
 		level=$(git diff-tree -r -M HEAD | sed 1d | cut -f1 | cut -d" " -f5 | sed "s/R0*//") &&
 		test -n "$level" && test "$level" -gt 2 && test "$level" -lt 100 &&
 		git config git-p4.detectRenames $(($level - 2)) &&
-		"$GITP4" submit &&
+		git p4 submit &&
 		p4 filelog //depot/file7 &&
 		p4 filelog //depot/file7 | grep -q "branch from //depot/file6"
 	)
@@ -384,7 +384,7 @@ test_expect_success 'detect renames' '
 # Modify and copy a file, configure a smaller threshold in detectCopies and
 # confirm that copy is detected in P4.
 test_expect_success 'detect copies' '
-	"$GITP4" clone --dest="$git" //depot@all &&
+	git p4 clone --dest="$git" //depot@all &&
 	test_when_finished cleanup_git &&
 	(
 		cd "$git" &&
@@ -394,7 +394,7 @@ test_expect_success 'detect copies' '
 		git add file8 &&
 		git commit -a -m "Copy file2 to file8" &&
 		git diff-tree -r -C HEAD &&
-		"$GITP4" submit &&
+		git p4 submit &&
 		p4 filelog //depot/file8 &&
 		p4 filelog //depot/file8 | test_must_fail grep -q "branch from" &&
 
@@ -403,7 +403,7 @@ test_expect_success 'detect copies' '
 		git commit -a -m "Copy file2 to file9" &&
 		git diff-tree -r -C HEAD &&
 		git config git-p4.detectCopies true &&
-		"$GITP4" submit &&
+		git p4 submit &&
 		p4 filelog //depot/file9 &&
 		p4 filelog //depot/file9 | test_must_fail grep -q "branch from" &&
 
@@ -412,7 +412,7 @@ test_expect_success 'detect copies' '
 		git add file2 file10 &&
 		git commit -a -m "Modify and copy file2 to file10" &&
 		git diff-tree -r -C HEAD &&
-		"$GITP4" submit &&
+		git p4 submit &&
 		p4 filelog //depot/file10 &&
 		p4 filelog //depot/file10 | grep -q "branch from //depot/file" &&
 
@@ -423,7 +423,7 @@ test_expect_success 'detect copies' '
 		src=$(git diff-tree -r -C --find-copies-harder HEAD | sed 1d | cut -f2) &&
 		test "$src" = file10 &&
 		git config git-p4.detectCopiesHarder true &&
-		"$GITP4" submit &&
+		git p4 submit &&
 		p4 filelog //depot/file11 &&
 		p4 filelog //depot/file11 | grep -q "branch from //depot/file" &&
 
@@ -437,7 +437,7 @@ test_expect_success 'detect copies' '
 		src=$(git diff-tree -r -C --find-copies-harder HEAD | sed 1d | cut -f2) &&
 		test "$src" = file10 &&
 		git config git-p4.detectCopies $(($level + 2)) &&
-		"$GITP4" submit &&
+		git p4 submit &&
 		p4 filelog //depot/file12 &&
 		p4 filelog //depot/file12 | test_must_fail grep -q "branch from" &&
 
@@ -451,7 +451,7 @@ test_expect_success 'detect copies' '
 		src=$(git diff-tree -r -C --find-copies-harder HEAD | sed 1d | cut -f2) &&
 		test "$src" = file10 &&
 		git config git-p4.detectCopies $(($level - 2)) &&
-		"$GITP4" submit &&
+		git p4 submit &&
 		p4 filelog //depot/file13 &&
 		p4 filelog //depot/file13 | grep -q "branch from //depot/file"
 	)
diff --git a/t/t9801-git-p4-branch.sh b/t/t9801-git-p4-branch.sh
index d414705..2859256 100755
--- a/t/t9801-git-p4-branch.sh
+++ b/t/t9801-git-p4-branch.sh
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-test_description='git-p4 p4 branching tests'
+test_description='git p4 tests for p4 branches'
 
 . ./lib-git-p4.sh
 
@@ -63,7 +63,7 @@ test_expect_success 'basic p4 branches' '
 
 test_expect_success 'import main, no branch detection' '
 	test_when_finished cleanup_git &&
-	"$GITP4" clone --dest="$git" //depot/main@all &&
+	git p4 clone --dest="$git" //depot/main@all &&
 	(
 		cd "$git" &&
 		git log --oneline --graph --decorate --all &&
@@ -74,7 +74,7 @@ test_expect_success 'import main, no branch detection' '
 
 test_expect_success 'import branch1, no branch detection' '
 	test_when_finished cleanup_git &&
-	"$GITP4" clone --dest="$git" //depot/branch1@all &&
+	git p4 clone --dest="$git" //depot/branch1@all &&
 	(
 		cd "$git" &&
 		git log --oneline --graph --decorate --all &&
@@ -85,7 +85,7 @@ test_expect_success 'import branch1, no branch detection' '
 
 test_expect_success 'import branch2, no branch detection' '
 	test_when_finished cleanup_git &&
-	"$GITP4" clone --dest="$git" //depot/branch2@all &&
+	git p4 clone --dest="$git" //depot/branch2@all &&
 	(
 		cd "$git" &&
 		git log --oneline --graph --decorate --all &&
@@ -96,7 +96,7 @@ test_expect_success 'import branch2, no branch detection' '
 
 test_expect_success 'import depot, no branch detection' '
 	test_when_finished cleanup_git &&
-	"$GITP4" clone --dest="$git" //depot@all &&
+	git p4 clone --dest="$git" //depot@all &&
 	(
 		cd "$git" &&
 		git log --oneline --graph --decorate --all &&
@@ -107,7 +107,7 @@ test_expect_success 'import depot, no branch detection' '
 
 test_expect_success 'import depot, branch detection' '
 	test_when_finished cleanup_git &&
-	"$GITP4" clone --dest="$git" --detect-branches //depot@all &&
+	git p4 clone --dest="$git" --detect-branches //depot@all &&
 	(
 		cd "$git" &&
 
@@ -132,7 +132,7 @@ test_expect_success 'import depot, branch detection, branchList branch definitio
 	(
 		cd "$git" &&
 		git config git-p4.branchList main:branch1 &&
-		"$GITP4" clone --dest=. --detect-branches //depot@all &&
+		git p4 clone --dest=. --detect-branches //depot@all &&
 
 		git log --oneline --graph --decorate --all &&
 
@@ -189,15 +189,15 @@ test_expect_success 'add simple p4 branches' '
 # Configure branches through git-config and clone them.
 # All files are tested to make sure branches were cloned correctly.
 # Finally, make an update to branch1 on P4 side to check if it is imported
-# correctly by git-p4.
-test_expect_success 'git-p4 clone simple branches' '
+# correctly by git p4.
+test_expect_success 'git p4 clone simple branches' '
 	test_when_finished cleanup_git &&
 	test_create_repo "$git" &&
 	(
 		cd "$git" &&
 		git config git-p4.branchList branch1:branch2 &&
 		git config --add git-p4.branchList branch1:branch3 &&
-		"$GITP4" clone --dest=. --detect-branches //depot@all &&
+		git p4 clone --dest=. --detect-branches //depot@all &&
 		git log --all --graph --decorate --stat &&
 		git reset --hard p4/depot/branch1 &&
 		test -f file1 &&
@@ -221,13 +221,13 @@ test_expect_success 'git-p4 clone simple branches' '
 		p4 submit -d "update file2 in branch3" &&
 		cd "$git" &&
 		git reset --hard p4/depot/branch1 &&
-		"$GITP4" rebase &&
+		git p4 rebase &&
 		grep file2_ file2
 	)
 '
 
 # Create a complex branch structure in P4 depot to check if they are correctly
-# cloned. The branches are created from older changelists to check if git-p4 is
+# cloned. The branches are created from older changelists to check if git p4 is
 # able to correctly detect them.
 # The final expected structure is:
 # `branch1
@@ -248,7 +248,7 @@ test_expect_success 'git-p4 clone simple branches' '
 #   `- file1
 #   `- file2
 #   `- file3
-test_expect_success 'git-p4 add complex branches' '
+test_expect_success 'git p4 add complex branches' '
 	test_when_finished cleanup_git &&
 	test_create_repo "$git" &&
 	(
@@ -263,10 +263,10 @@ test_expect_success 'git-p4 add complex branches' '
 	)
 '
 
-# Configure branches through git-config and clone them. git-p4 will only be able
+# Configure branches through git-config and clone them. git p4 will only be able
 # to clone the original structure if it is able to detect the origin changelist
 # of each branch.
-test_expect_success 'git-p4 clone complex branches' '
+test_expect_success 'git p4 clone complex branches' '
 	test_when_finished cleanup_git &&
 	test_create_repo "$git" &&
 	(
@@ -275,7 +275,7 @@ test_expect_success 'git-p4 clone complex branches' '
 		git config --add git-p4.branchList branch1:branch3 &&
 		git config --add git-p4.branchList branch1:branch4 &&
 		git config --add git-p4.branchList branch1:branch5 &&
-		"$GITP4" clone --dest=. --detect-branches //depot@all &&
+		git p4 clone --dest=. --detect-branches //depot@all &&
 		git log --all --graph --decorate --stat &&
 		git reset --hard p4/depot/branch1 &&
 		test_path_is_file file1 &&
diff --git a/t/t9802-git-p4-filetype.sh b/t/t9802-git-p4-filetype.sh
index 992bb8c..21924df 100755
--- a/t/t9802-git-p4-filetype.sh
+++ b/t/t9802-git-p4-filetype.sh
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-test_description='git-p4 p4 filetype tests'
+test_description='git p4 filetype tests'
 
 . ./lib-git-p4.sh
 
@@ -37,7 +37,7 @@ test_expect_success 'utf-16 file create' '
 
 test_expect_success 'utf-16 file test' '
 	test_when_finished cleanup_git &&
-	"$GITP4" clone --dest="$git" //depot@all &&
+	git p4 clone --dest="$git" //depot@all &&
 	(
 		cd "$git" &&
 
@@ -84,7 +84,7 @@ test_expect_success 'keyword file test' '
 	build_smush &&
 	test_when_finished rm -f k_smush.py ko_smush.py &&
 	test_when_finished cleanup_git &&
-	"$GITP4" clone --dest="$git" //depot@all &&
+	git p4 clone --dest="$git" //depot@all &&
 	(
 		cd "$git" &&
 
@@ -94,7 +94,7 @@ test_expect_success 'keyword file test' '
 		"$PYTHON_PATH" "$TRASH_DIRECTORY/ko_smush.py" <"$cli/k-text-ko" >cli-k-text-ko-smush &&
 		test_cmp cli-k-text-ko-smush k-text-ko &&
 
-		# utf16, even though p4 expands keywords, git-p4 does not
+		# utf16, even though p4 expands keywords, git p4 does not
 		# try to undo that
 		test_cmp "$cli/k-utf16-k" k-utf16-k &&
 		test_cmp "$cli/k-utf16-ko" k-utf16-ko
@@ -125,7 +125,7 @@ test_expect_success 'ignore apple' '
 		p4 submit -d appledouble
 	) &&
 	test_when_finished cleanup_git &&
-	"$GITP4" clone --dest="$git" //depot@all &&
+	git p4 clone --dest="$git" //depot@all &&
 	(
 		cd "$git" &&
 		test ! -f double.png
diff --git a/t/t9803-git-p4-shell-metachars.sh b/t/t9803-git-p4-shell-metachars.sh
index db67020..fbacff3 100755
--- a/t/t9803-git-p4-shell-metachars.sh
+++ b/t/t9803-git-p4-shell-metachars.sh
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-test_description='git-p4 transparency to shell metachars in filenames'
+test_description='git p4 transparency to shell metachars in filenames'
 
 . ./lib-git-p4.sh
 
@@ -18,7 +18,7 @@ test_expect_success 'init depot' '
 '
 
 test_expect_success 'shell metachars in filenames' '
-	"$GITP4" clone --dest="$git" //depot &&
+	git p4 clone --dest="$git" //depot &&
 	test_when_finished cleanup_git &&
 	(
 		cd "$git" &&
@@ -28,7 +28,7 @@ test_expect_success 'shell metachars in filenames' '
 		echo f2 >"file with spaces" &&
 		git add "file with spaces" &&
 		git commit -m "add files" &&
-		P4EDITOR=touch "$GITP4" submit
+		P4EDITOR=touch git p4 submit
 	) &&
 	(
 		cd "$cli" &&
@@ -39,7 +39,7 @@ test_expect_success 'shell metachars in filenames' '
 '
 
 test_expect_success 'deleting with shell metachars' '
-	"$GITP4" clone --dest="$git" //depot &&
+	git p4 clone --dest="$git" //depot &&
 	test_when_finished cleanup_git &&
 	(
 		cd "$git" &&
@@ -47,7 +47,7 @@ test_expect_success 'deleting with shell metachars' '
 		git rm foo\$bar &&
 		git rm file\ with\ spaces &&
 		git commit -m "remove files" &&
-		P4EDITOR=touch "$GITP4" submit
+		P4EDITOR=touch git p4 submit
 	) &&
 	(
 		cd "$cli" &&
@@ -97,7 +97,7 @@ test_expect_success 'branch with shell char' '
 		cd "$git" &&
 
 		git config git-p4.branchList main:branch\$3 &&
-		"$GITP4" clone --dest=. --detect-branches //depot@all &&
+		git p4 clone --dest=. --detect-branches //depot@all &&
 		git log --all --graph --decorate --stat &&
 		git reset --hard p4/depot/branch\$3 &&
 		test -f shell_char_branch_file &&
diff --git a/t/t9804-git-p4-label.sh b/t/t9804-git-p4-label.sh
index 80d01ea..c8eec0e 100755
--- a/t/t9804-git-p4-label.sh
+++ b/t/t9804-git-p4-label.sh
@@ -1,4 +1,4 @@
-test_description='git-p4 p4 label tests'
+test_description='git p4 label tests'
 
 . ./lib-git-p4.sh
 
@@ -48,7 +48,7 @@ test_expect_success 'basic p4 labels' '
 
 		p4 labels ... &&
 
-		"$GITP4" clone --dest="$git" --detect-labels //depot@all &&
+		git p4 clone --dest="$git" --detect-labels //depot@all &&
 		cd "$git" &&
 
 		git tag &&
@@ -87,7 +87,7 @@ test_expect_failure 'two labels on the same changelist' '
 
 		p4 labels ... &&
 
-		"$GITP4" clone --dest="$git" --detect-labels //depot@all &&
+		git p4 clone --dest="$git" --detect-labels //depot@all &&
 		cd "$git" &&
 
 		git tag | grep tag_f1 &&
diff --git a/t/t9805-git-p4-skip-submit-edit.sh b/t/t9805-git-p4-skip-submit-edit.sh
index df929e0..4a72f79 100755
--- a/t/t9805-git-p4-skip-submit-edit.sh
+++ b/t/t9805-git-p4-skip-submit-edit.sh
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-test_description='git-p4 skipSubmitEdit config variables'
+test_description='git p4 skipSubmitEdit config variables'
 
 . ./lib-git-p4.sh
 
@@ -19,33 +19,33 @@ test_expect_success 'init depot' '
 
 # this works because EDITOR is set to :
 test_expect_success 'no config, unedited, say yes' '
-	"$GITP4" clone --dest="$git" //depot &&
+	git p4 clone --dest="$git" //depot &&
 	test_when_finished cleanup_git &&
 	(
 		cd "$git" &&
 		echo line >>file1 &&
 		git commit -a -m "change 2" &&
-		echo y | "$GITP4" submit &&
+		echo y | git p4 submit &&
 		p4 changes //depot/... >wc &&
 		test_line_count = 2 wc
 	)
 '
 
 test_expect_success 'no config, unedited, say no' '
-	"$GITP4" clone --dest="$git" //depot &&
+	git p4 clone --dest="$git" //depot &&
 	test_when_finished cleanup_git &&
 	(
 		cd "$git" &&
 		echo line >>file1 &&
 		git commit -a -m "change 3 (not really)" &&
-		printf "bad response\nn\n" | "$GITP4" submit &&
+		printf "bad response\nn\n" | git p4 submit &&
 		p4 changes //depot/... >wc &&
 		test_line_count = 2 wc
 	)
 '
 
 test_expect_success 'skipSubmitEdit' '
-	"$GITP4" clone --dest="$git" //depot &&
+	git p4 clone --dest="$git" //depot &&
 	test_when_finished cleanup_git &&
 	(
 		cd "$git" &&
@@ -54,21 +54,21 @@ test_expect_success 'skipSubmitEdit' '
 		git config core.editor /bin/false &&
 		echo line >>file1 &&
 		git commit -a -m "change 3" &&
-		"$GITP4" submit &&
+		git p4 submit &&
 		p4 changes //depot/... >wc &&
 		test_line_count = 3 wc
 	)
 '
 
 test_expect_success 'skipSubmitEditCheck' '
-	"$GITP4" clone --dest="$git" //depot &&
+	git p4 clone --dest="$git" //depot &&
 	test_when_finished cleanup_git &&
 	(
 		cd "$git" &&
 		git config git-p4.skipSubmitEditCheck true &&
 		echo line >>file1 &&
 		git commit -a -m "change 4" &&
-		"$GITP4" submit &&
+		git p4 submit &&
 		p4 changes //depot/... >wc &&
 		test_line_count = 4 wc
 	)
@@ -76,7 +76,7 @@ test_expect_success 'skipSubmitEditCheck' '
 
 # check the normal case, where the template really is edited
 test_expect_success 'no config, edited' '
-	"$GITP4" clone --dest="$git" //depot &&
+	git p4 clone --dest="$git" //depot &&
 	test_when_finished cleanup_git &&
 	ed="$TRASH_DIRECTORY/ed.sh" &&
 	test_when_finished "rm \"$ed\"" &&
@@ -91,7 +91,7 @@ test_expect_success 'no config, edited' '
 		cd "$git" &&
 		echo line >>file1 &&
 		git commit -a -m "change 5" &&
-		EDITOR="\"$ed\"" "$GITP4" submit &&
+		EDITOR="\"$ed\"" git p4 submit &&
 		p4 changes //depot/... >wc &&
 		test_line_count = 5 wc
 	)
diff --git a/t/t9806-git-p4-options.sh b/t/t9806-git-p4-options.sh
index 0571602..2892367 100755
--- a/t/t9806-git-p4-options.sh
+++ b/t/t9806-git-p4-options.sh
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-test_description='git-p4 options'
+test_description='git p4 options'
 
 . ./lib-git-p4.sh
 
@@ -24,11 +24,11 @@ test_expect_success 'init depot' '
 '
 
 test_expect_success 'clone no --git-dir' '
-	test_must_fail "$GITP4" clone --git-dir=xx //depot
+	test_must_fail git p4 clone --git-dir=xx //depot
 '
 
 test_expect_success 'clone --branch' '
-	"$GITP4" clone --branch=refs/remotes/p4/sb --dest="$git" //depot &&
+	git p4 clone --branch=refs/remotes/p4/sb --dest="$git" //depot &&
 	test_when_finished cleanup_git &&
 	(
 		cd "$git" &&
@@ -42,7 +42,7 @@ test_expect_success 'clone --changesfile' '
 	cf="$TRASH_DIRECTORY/cf" &&
 	test_when_finished "rm \"$cf\"" &&
 	printf "1\n3\n" >"$cf" &&
-	"$GITP4" clone --changesfile="$cf" --dest="$git" //depot &&
+	git p4 clone --changesfile="$cf" --dest="$git" //depot &&
 	test_when_finished cleanup_git &&
 	(
 		cd "$git" &&
@@ -58,14 +58,14 @@ test_expect_success 'clone --changesfile, @all' '
 	cf="$TRASH_DIRECTORY/cf" &&
 	test_when_finished "rm \"$cf\"" &&
 	printf "1\n3\n" >"$cf" &&
-	test_must_fail "$GITP4" clone --changesfile="$cf" --dest="$git" //depot@all
+	test_must_fail git p4 clone --changesfile="$cf" --dest="$git" //depot@all
 '
 
 # imports both master and p4/master in refs/heads
 # requires --import-local on sync to find p4 refs/heads
 # does not update master on sync, just p4/master
 test_expect_success 'clone/sync --import-local' '
-	"$GITP4" clone --import-local --dest="$git" //depot@1,2 &&
+	git p4 clone --import-local --dest="$git" //depot@1,2 &&
 	test_when_finished cleanup_git &&
 	(
 		cd "$git" &&
@@ -73,9 +73,9 @@ test_expect_success 'clone/sync --import-local' '
 		test_line_count = 2 lines &&
 		git log --oneline refs/heads/p4/master >lines &&
 		test_line_count = 2 lines &&
-		test_must_fail "$GITP4" sync &&
+		test_must_fail git p4 sync &&
 
-		"$GITP4" sync --import-local &&
+		git p4 sync --import-local &&
 		git log --oneline refs/heads/master >lines &&
 		test_line_count = 2 lines &&
 		git log --oneline refs/heads/p4/master >lines &&
@@ -84,7 +84,7 @@ test_expect_success 'clone/sync --import-local' '
 '
 
 test_expect_success 'clone --max-changes' '
-	"$GITP4" clone --dest="$git" --max-changes 2 //depot@all &&
+	git p4 clone --dest="$git" --max-changes 2 //depot@all &&
 	test_when_finished cleanup_git &&
 	(
 		cd "$git" &&
@@ -101,7 +101,7 @@ test_expect_success 'clone --keep-path' '
 		p4 add sub/dir/f4 &&
 		p4 submit -d "change 4"
 	) &&
-	"$GITP4" clone --dest="$git" --keep-path //depot/sub/dir@all &&
+	git p4 clone --dest="$git" --keep-path //depot/sub/dir@all &&
 	test_when_finished cleanup_git &&
 	(
 		cd "$git" &&
@@ -109,7 +109,7 @@ test_expect_success 'clone --keep-path' '
 		test_path_is_file sub/dir/f4
 	) &&
 	cleanup_git &&
-	"$GITP4" clone --dest="$git" //depot/sub/dir@all &&
+	git p4 clone --dest="$git" //depot/sub/dir@all &&
 	(
 		cd "$git" &&
 		test_path_is_file f4 &&
@@ -126,7 +126,7 @@ test_expect_success 'clone --use-client-spec' '
 	(
 		# big usage message
 		exec >/dev/null &&
-		test_must_fail "$GITP4" clone --dest="$git" --use-client-spec
+		test_must_fail git p4 clone --dest="$git" --use-client-spec
 	) &&
 	cli2="$TRASH_DIRECTORY/cli2" &&
 	mkdir -p "$cli2" &&
@@ -142,7 +142,7 @@ test_expect_success 'clone --use-client-spec' '
 	) &&
 	P4CLIENT=client2 &&
 	test_when_finished cleanup_git &&
-	"$GITP4" clone --dest="$git" --use-client-spec //depot/... &&
+	git p4 clone --dest="$git" --use-client-spec //depot/... &&
 	(
 		cd "$git" &&
 		test_path_is_file bus/dir/f4 &&
@@ -156,7 +156,7 @@ test_expect_success 'clone --use-client-spec' '
 		cd "$git" &&
 		git init &&
 		git config git-p4.useClientSpec true &&
-		"$GITP4" sync //depot/... &&
+		git p4 sync //depot/... &&
 		git checkout -b master p4/master &&
 		test_path_is_file bus/dir/f4 &&
 		test_path_is_missing file1
diff --git a/t/t9807-git-p4-submit.sh b/t/t9807-git-p4-submit.sh
index b1f61e3..1541716 100755
--- a/t/t9807-git-p4-submit.sh
+++ b/t/t9807-git-p4-submit.sh
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-test_description='git-p4 submit'
+test_description='git p4 submit'
 
 . ./lib-git-p4.sh
 
@@ -19,7 +19,7 @@ test_expect_success 'init depot' '
 
 test_expect_success 'submit with no client dir' '
 	test_when_finished cleanup_git &&
-	"$GITP4" clone --dest="$git" //depot &&
+	git p4 clone --dest="$git" //depot &&
 	(
 		cd "$git" &&
 		echo file2 >file2 &&
@@ -27,20 +27,20 @@ test_expect_success 'submit with no client dir' '
 		git commit -m "git commit 2" &&
 		rm -rf "$cli" &&
 		git config git-p4.skipSubmitEdit true &&
-		"$GITP4" submit
+		git p4 submit
 	)
 '
 
 # make two commits, but tell it to apply only from HEAD^
 test_expect_success 'submit --origin' '
 	test_when_finished cleanup_git &&
-	"$GITP4" clone --dest="$git" //depot &&
+	git p4 clone --dest="$git" //depot &&
 	(
 		cd "$git" &&
 		test_commit "file3" &&
 		test_commit "file4" &&
 		git config git-p4.skipSubmitEdit true &&
-		"$GITP4" submit --origin=HEAD^
+		git p4 submit --origin=HEAD^
 	) &&
 	(
 		cd "$cli" &&
@@ -52,30 +52,30 @@ test_expect_success 'submit --origin' '
 
 test_expect_success 'submit with allowSubmit' '
 	test_when_finished cleanup_git &&
-	"$GITP4" clone --dest="$git" //depot &&
+	git p4 clone --dest="$git" //depot &&
 	(
 		cd "$git" &&
 		test_commit "file5" &&
 		git config git-p4.skipSubmitEdit true &&
 		git config git-p4.allowSubmit "nobranch" &&
-		test_must_fail "$GITP4" submit &&
+		test_must_fail git p4 submit &&
 		git config git-p4.allowSubmit "nobranch,master" &&
-		"$GITP4" submit
+		git p4 submit
 	)
 '
 
 test_expect_success 'submit with master branch name from argv' '
 	test_when_finished cleanup_git &&
-	"$GITP4" clone --dest="$git" //depot &&
+	git p4 clone --dest="$git" //depot &&
 	(
 		cd "$git" &&
 		test_commit "file6" &&
 		git config git-p4.skipSubmitEdit true &&
-		test_must_fail "$GITP4" submit nobranch &&
+		test_must_fail git p4 submit nobranch &&
 		git branch otherbranch &&
 		git reset --hard HEAD^ &&
 		test_commit "file7" &&
-		"$GITP4" submit otherbranch
+		git p4 submit otherbranch
 	) &&
 	(
 		cd "$cli" &&
diff --git a/t/t9808-git-p4-chdir.sh b/t/t9808-git-p4-chdir.sh
index eb8cc95..73c0902 100755
--- a/t/t9808-git-p4-chdir.sh
+++ b/t/t9808-git-p4-chdir.sh
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-test_description='git-p4 relative chdir'
+test_description='git p4 relative chdir'
 
 . ./lib-git-p4.sh
 
@@ -26,7 +26,7 @@ test_expect_success 'P4CONFIG and absolute dir clone' '
 	(
 		P4CONFIG=p4config && export P4CONFIG &&
 		unset P4PORT P4CLIENT &&
-		"$GITP4" clone --verbose --dest="$git" //depot
+		git p4 clone --verbose --dest="$git" //depot
 	)
 '
 
@@ -38,7 +38,7 @@ test_expect_success 'P4CONFIG and relative dir clone' '
 	(
 		P4CONFIG=p4config && export P4CONFIG &&
 		unset P4PORT P4CLIENT &&
-		"$GITP4" clone --verbose --dest="git" //depot
+		git p4 clone --verbose --dest="git" //depot
 	)
 '
 
diff --git a/t/t9809-git-p4-client-view.sh b/t/t9809-git-p4-client-view.sh
index ae9145e..d86bffd 100755
--- a/t/t9809-git-p4-client-view.sh
+++ b/t/t9809-git-p4-client-view.sh
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-test_description='git-p4 client view'
+test_description='git p4 client view'
 
 . ./lib-git-p4.sh
 
@@ -92,25 +92,25 @@ test_expect_success 'init depot' '
 test_expect_success 'unsupported view wildcard %%n' '
 	client_view "//depot/%%%%1/sub/... //client/sub/%%%%1/..." &&
 	test_when_finished cleanup_git &&
-	test_must_fail "$GITP4" clone --use-client-spec --dest="$git" //depot
+	test_must_fail git p4 clone --use-client-spec --dest="$git" //depot
 '
 
 test_expect_success 'unsupported view wildcard *' '
 	client_view "//depot/*/bar/... //client/*/bar/..." &&
 	test_when_finished cleanup_git &&
-	test_must_fail "$GITP4" clone --use-client-spec --dest="$git" //depot
+	test_must_fail git p4 clone --use-client-spec --dest="$git" //depot
 '
 
 test_expect_success 'wildcard ... only supported at end of spec 1' '
 	client_view "//depot/.../file11 //client/.../file11" &&
 	test_when_finished cleanup_git &&
-	test_must_fail "$GITP4" clone --use-client-spec --dest="$git" //depot
+	test_must_fail git p4 clone --use-client-spec --dest="$git" //depot
 '
 
 test_expect_success 'wildcard ... only supported at end of spec 2' '
 	client_view "//depot/.../a/... //client/.../a/..." &&
 	test_when_finished cleanup_git &&
-	test_must_fail "$GITP4" clone --use-client-spec --dest="$git" //depot
+	test_must_fail git p4 clone --use-client-spec --dest="$git" //depot
 '
 
 test_expect_success 'basic map' '
@@ -118,7 +118,7 @@ test_expect_success 'basic map' '
 	files="cli1/file11 cli1/file12" &&
 	client_verify $files &&
 	test_when_finished cleanup_git &&
-	"$GITP4" clone --use-client-spec --dest="$git" //depot &&
+	git p4 clone --use-client-spec --dest="$git" //depot &&
 	git_verify $files
 '
 
@@ -126,7 +126,7 @@ test_expect_success 'client view with no mappings' '
 	client_view &&
 	client_verify &&
 	test_when_finished cleanup_git &&
-	"$GITP4" clone --use-client-spec --dest="$git" //depot &&
+	git p4 clone --use-client-spec --dest="$git" //depot &&
 	git_verify
 '
 
@@ -135,7 +135,7 @@ test_expect_success 'single file map' '
 	files="file11" &&
 	client_verify $files &&
 	test_when_finished cleanup_git &&
-	"$GITP4" clone --use-client-spec --dest="$git" //depot &&
+	git p4 clone --use-client-spec --dest="$git" //depot &&
 	git_verify $files
 '
 
@@ -146,7 +146,7 @@ test_expect_success 'later mapping takes precedence (entire repo)' '
 	       cli2/dir2/file21 cli2/dir2/file22" &&
 	client_verify $files &&
 	test_when_finished cleanup_git &&
-	"$GITP4" clone --use-client-spec --dest="$git" //depot &&
+	git p4 clone --use-client-spec --dest="$git" //depot &&
 	git_verify $files
 '
 
@@ -156,7 +156,7 @@ test_expect_success 'later mapping takes precedence (partial repo)' '
 	files="file21 file22" &&
 	client_verify $files &&
 	test_when_finished cleanup_git &&
-	"$GITP4" clone --use-client-spec --dest="$git" //depot &&
+	git p4 clone --use-client-spec --dest="$git" //depot &&
 	git_verify $files
 '
 
@@ -172,7 +172,7 @@ test_expect_success 'depot path matching rejected client path' '
 	files="cli12/file21 cli12/file22" &&
 	client_verify $files &&
 	test_when_finished cleanup_git &&
-	"$GITP4" clone --use-client-spec --dest="$git" //depot &&
+	git p4 clone --use-client-spec --dest="$git" //depot &&
 	git_verify $files
 '
 
@@ -183,7 +183,7 @@ test_expect_success 'exclusion wildcard, client rhs same (odd)' '
 		    "-//depot/dir2/... //client/..." &&
 	client_verify &&
 	test_when_finished cleanup_git &&
-	"$GITP4" clone --use-client-spec --dest="$git" //depot &&
+	git p4 clone --use-client-spec --dest="$git" //depot &&
 	git_verify
 '
 
@@ -193,7 +193,7 @@ test_expect_success 'exclusion wildcard, client rhs different (normal)' '
 	files="dir1/file11 dir1/file12" &&
 	client_verify $files &&
 	test_when_finished cleanup_git &&
-	"$GITP4" clone --use-client-spec --dest="$git" //depot &&
+	git p4 clone --use-client-spec --dest="$git" //depot &&
 	git_verify $files
 '
 
@@ -203,7 +203,7 @@ test_expect_success 'exclusion single file' '
 	files="dir1/file11 dir1/file12 dir2/file21" &&
 	client_verify $files &&
 	test_when_finished cleanup_git &&
-	"$GITP4" clone --use-client-spec --dest="$git" //depot &&
+	git p4 clone --use-client-spec --dest="$git" //depot &&
 	git_verify $files
 '
 
@@ -213,7 +213,7 @@ test_expect_success 'overlay wildcard' '
 	files="cli/file11 cli/file12 cli/file21 cli/file22" &&
 	client_verify $files &&
 	test_when_finished cleanup_git &&
-	"$GITP4" clone --use-client-spec --dest="$git" //depot &&
+	git p4 clone --use-client-spec --dest="$git" //depot &&
 	git_verify $files
 '
 
@@ -223,7 +223,7 @@ test_expect_success 'overlay single file' '
 	files="cli/file11 cli/file12 cli/file21" &&
 	client_verify $files &&
 	test_when_finished cleanup_git &&
-	"$GITP4" clone --use-client-spec --dest="$git" //depot &&
+	git p4 clone --use-client-spec --dest="$git" //depot &&
 	git_verify $files
 '
 
@@ -234,7 +234,7 @@ test_expect_success 'exclusion with later inclusion' '
 	files="dir1/file11 dir1/file12 dir2incl/file21 dir2incl/file22" &&
 	client_verify $files &&
 	test_when_finished cleanup_git &&
-	"$GITP4" clone --use-client-spec --dest="$git" //depot &&
+	git p4 clone --use-client-spec --dest="$git" //depot &&
 	git_verify $files
 '
 
@@ -242,7 +242,7 @@ test_expect_success 'quotes on rhs only' '
 	client_view "//depot/dir1/... \"//client/cdir 1/...\"" &&
 	client_verify "cdir 1/file11" "cdir 1/file12" &&
 	test_when_finished cleanup_git &&
-	"$GITP4" clone --use-client-spec --dest="$git" //depot &&
+	git p4 clone --use-client-spec --dest="$git" //depot &&
 	git_verify "cdir 1/file11" "cdir 1/file12"
 '
 
@@ -282,7 +282,7 @@ test_expect_success 'overlay collision 1 to 2' '
 	client_verify $files &&
 	test_cmp actual "$cli"/filecollide &&
 	test_when_finished cleanup_git &&
-	"$GITP4" clone --use-client-spec --dest="$git" //depot &&
+	git p4 clone --use-client-spec --dest="$git" //depot &&
 	git_verify $files &&
 	test_cmp actual "$git"/filecollide
 '
@@ -295,7 +295,7 @@ test_expect_failure 'overlay collision 2 to 1' '
 	client_verify $files &&
 	test_cmp actual "$cli"/filecollide &&
 	test_when_finished cleanup_git &&
-	"$GITP4" clone --use-client-spec --dest="$git" //depot &&
+	git p4 clone --use-client-spec --dest="$git" //depot &&
 	git_verify $files &&
 	test_cmp actual "$git"/filecollide
 '
@@ -317,7 +317,7 @@ test_expect_failure 'overlay collision 1 to 2, but 2 deleted' '
 	files="file11 file12 file21 file22" &&
 	client_verify $files &&
 	test_when_finished cleanup_git &&
-	"$GITP4" clone --use-client-spec --dest="$git" //depot &&
+	git p4 clone --use-client-spec --dest="$git" //depot &&
 	git_verify $files
 '
 
@@ -340,7 +340,7 @@ test_expect_failure 'overlay collision 1 to 2, but 2 deleted, then 1 updated' '
 	files="file11 file12 file21 file22" &&
 	client_verify $files &&
 	test_when_finished cleanup_git &&
-	"$GITP4" clone --use-client-spec --dest="$git" //depot &&
+	git p4 clone --use-client-spec --dest="$git" //depot &&
 	git_verify $files
 '
 
@@ -396,7 +396,7 @@ test_expect_success 'overlay sync: initial git checkout' '
 	echo dir1/colA >actual &&
 	client_verify $files &&
 	test_cmp actual "$cli"/colA &&
-	"$GITP4" clone --use-client-spec --dest="$git" //depot &&
+	git p4 clone --use-client-spec --dest="$git" //depot &&
 	git_verify $files &&
 	test_cmp actual "$git"/colA
 '
@@ -421,7 +421,7 @@ test_expect_success 'overlay sync: colA content switch' '
 	test_cmp actual "$cli"/colA &&
 	(
 		cd "$git" &&
-		"$GITP4" sync --use-client-spec &&
+		git p4 sync --use-client-spec &&
 		git merge --ff-only p4/master
 	) &&
 	git_verify $files &&
@@ -448,7 +448,7 @@ test_expect_success 'overlay sync: colB appears' '
 	test_cmp actual "$cli"/colB &&
 	(
 		cd "$git" &&
-		"$GITP4" sync --use-client-spec &&
+		git p4 sync --use-client-spec &&
 		git merge --ff-only p4/master
 	) &&
 	git_verify $files &&
@@ -476,7 +476,7 @@ test_expect_success 'overlay sync: colB disappears' '
 	test_when_finished cleanup_git &&
 	(
 		cd "$git" &&
-		"$GITP4" sync --use-client-spec &&
+		git p4 sync --use-client-spec &&
 		git merge --ff-only p4/master
 	) &&
 	git_verify $files
@@ -534,7 +534,7 @@ test_expect_success 'overlay sync swap: initial git checkout' '
 	echo dir1/colA >actual &&
 	client_verify $files &&
 	test_cmp actual "$cli"/colA &&
-	"$GITP4" clone --use-client-spec --dest="$git" //depot &&
+	git p4 clone --use-client-spec --dest="$git" //depot &&
 	git_verify $files &&
 	test_cmp actual "$git"/colA
 '
@@ -559,7 +559,7 @@ test_expect_failure 'overlay sync swap: colA no content switch' '
 	test_cmp actual "$cli"/colA &&
 	(
 		cd "$git" &&
-		"$GITP4" sync --use-client-spec &&
+		git p4 sync --use-client-spec &&
 		git merge --ff-only p4/master
 	) &&
 	git_verify $files &&
@@ -586,7 +586,7 @@ test_expect_success 'overlay sync swap: colB appears' '
 	test_cmp actual "$cli"/colB &&
 	(
 		cd "$git" &&
-		"$GITP4" sync --use-client-spec &&
+		git p4 sync --use-client-spec &&
 		git merge --ff-only p4/master
 	) &&
 	git_verify $files &&
@@ -616,7 +616,7 @@ test_expect_failure 'overlay sync swap: colB no change' '
 	test_when_finished cleanup_git &&
 	(
 		cd "$git" &&
-		"$GITP4" sync --use-client-spec &&
+		git p4 sync --use-client-spec &&
 		git merge --ff-only p4/master
 	) &&
 	git_verify $files &&
@@ -664,7 +664,7 @@ test_expect_success 'quotes on lhs only' '
 	files="cdir1/file11 cdir1/file12" &&
 	client_verify $files &&
 	test_when_finished cleanup_git &&
-	"$GITP4" clone --use-client-spec --dest="$git" //depot &&
+	git p4 clone --use-client-spec --dest="$git" //depot &&
 	client_verify $files
 '
 
@@ -672,7 +672,7 @@ test_expect_success 'quotes on both sides' '
 	client_view "\"//depot/dir 1/...\" \"//client/cdir 1/...\"" &&
 	client_verify "cdir 1/file11" "cdir 1/file12" &&
 	test_when_finished cleanup_git &&
-	"$GITP4" clone --use-client-spec --dest="$git" //depot &&
+	git p4 clone --use-client-spec --dest="$git" //depot &&
 	git_verify "cdir 1/file11" "cdir 1/file12"
 '
 
-- 
1.7.9.192.ga1d4b

^ permalink raw reply related


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox