Zile as git core editor?

2013-04-26 Thread Thorsten Jolitz

Hi List, 

after experiencing one crash to many, I'm back to Standard Emacs
(instead of Emacsserver/Emacsclient), thus using 'emacs' (instead of
emacsclient) as git core editor triggers reading my huge init file and
is way to slow.

I would like to use Zile (a small Emacs clone) instead, and although
otherwise it works alright on my system, it does not seem to work as git
core editor. 

Is it possible to use 'git config --global core.editor zile'?

-- 
cheers,
Thorsten


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


[PATCH] clean: confirm before cleaning files and directories

2013-04-26 Thread Jiang Xin
When running `git clean`, it will be convenient and safe to show a
confirm dialog and only delete files and directories when confirmed.
The confirm dialog will popup when:

 * run `git clean` in interactive sessions,
 * not a dry run,
 * and not quiet.

There may be existing scripts that call `git clean -f` while leave the
standard input and the standard output of the `git clean` connected to
whatever environment the scripts were started, and such invocation might
trigger the confirm dialog. In this case, add a `-q` option, such as
`git clean -q -f`, then the confirm dialog won't popup.

Signed-off-by: Jiang Xin worldhello@gmail.com
---
 builtin/clean.c | 66 +
 1 file changed, 52 insertions(+), 14 deletions(-)

diff --git a/builtin/clean.c b/builtin/clean.c
index 04e39..e31a1 100644
--- a/builtin/clean.c
+++ b/builtin/clean.c
@@ -169,6 +169,10 @@ int cmd_clean(int argc, const char **argv, const char 
*prefix)
N_(remove only ignored files)),
OPT_END()
};
+   struct string_list dels = STRING_LIST_INIT_DUP;
+   struct string_list_item *item;
+   struct strbuf confirm = STRBUF_INIT;
+   int confirmed = 0;
 
git_config(git_clean_config, NULL);
if (force  0)
@@ -257,33 +261,67 @@ int cmd_clean(int argc, const char **argv, const char 
*prefix)
}
 
if (S_ISDIR(st.st_mode)) {
-   strbuf_addstr(directory, ent-name);
if (remove_directories || (matches == MATCHED_EXACTLY)) 
{
+   string_list_append(dels, ent-name);
+   }
+   } else {
+   if (pathspec  !matches)
+   continue;
+   string_list_append(dels, ent-name);
+   }
+   }
+
+   if (!isatty(0) || !isatty(1) || quiet || dry_run) {
+   confirmed = 1;
+   }
+
+   if (!confirmed  dels.nr  0) {
+   for_each_string_list_item(item, dels) {
+   qname = quote_path_relative(item-string, -1, buf, 
prefix);
+   printf(_(msg_would_remove), qname);
+   }
+   printf(_(Are you sure [y/N]? ));
+   strbuf_getline(confirm, stdin, '\n');
+   strbuf_trim(confirm);
+   if (!strcasecmp(confirm.buf, y)) {
+   confirmed = 1;
+   }
+   }
+
+   if (confirmed) {
+   for_each_string_list_item(item, dels) {
+   struct stat st;
+
+   if (lstat(item-string, st))
+   continue;
+
+   if (S_ISDIR(st.st_mode)) {
+   strbuf_addstr(directory, item-string);
if (remove_dirs(directory, prefix, rm_flags, 
dry_run, quiet, gone))
errors++;
if (gone  !quiet) {
qname = 
quote_path_relative(directory.buf, directory.len, buf, prefix);
printf(dry_run ? _(msg_would_remove) : 
_(msg_remove), qname);
}
-   }
-   strbuf_reset(directory);
-   } else {
-   if (pathspec  !matches)
-   continue;
-   res = dry_run ? 0 : unlink(ent-name);
-   if (res) {
-   qname = quote_path_relative(ent-name, -1, 
buf, prefix);
-   warning(_(msg_warn_remove_failed), qname);
-   errors++;
-   } else if (!quiet) {
-   qname = quote_path_relative(ent-name, -1, 
buf, prefix);
-   printf(dry_run ? _(msg_would_remove) : 
_(msg_remove), qname);
+   strbuf_reset(directory);
+   } else {
+   res = dry_run ? 0 : unlink(item-string);
+   if (res) {
+   qname = 
quote_path_relative(item-string, -1, buf, prefix);
+   warning(_(msg_warn_remove_failed), 
qname);
+   errors++;
+   } else if (!quiet) {
+   qname = 
quote_path_relative(item-string, -1, buf, prefix);
+   printf(dry_run ? _(msg_would_remove) : 
_(msg_remove), qname);
+   }
}
}
}
free(seen);
 
strbuf_release(directory);
+   strbuf_release(confirm);
string_list_clear(exclude_list, 0);
+   string_list_clear(dels, 

Re: Itches with the current rev spec

2013-04-26 Thread Yann Dirson
2. git rebase -i master fails unless I've rebased my branch on top of
master.  I always wished I could do the equivalent of 'git rebase -i
master..', but I can't.  Can we give the A..B syntax a new meaning in
the context of rebase, namely $(git merge-base A B)? 

If I understand well, you're refering to a problem that also annoys me,
ie. using rebase -i to just edit your local commits, without rebasing
onto the lastest revision on the upstream branch, right ?  That is, just
another wart of having a single command for arguably-different use cases,
or of having the single-argument version of rebase use that argument for
2 very different things (cut-off point and destination), but I won't try
to address either of these today :)

In that case, what about just adding a new flag to rebase -i, that would
prevent the single-argument to be interpreted as destination ?  I really
consider this a workaround for a suboptimal CLI, but since we don't want
to change the rebase CLI before at least 2.0, that could fill the gap for now.

As for the flag itself, what about --here ?  Obviously it would only be
meaninglful together with -i, and be exclusive with --onto.

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


Re: [PATCH] clean: confirm before cleaning files and directories

2013-04-26 Thread Matthieu Moy
Jiang Xin worldhello@gmail.com writes:

  * run `git clean` in interactive sessions,
  * not a dry run,
  * and not quiet.

Err, does this mean I'll have:

$ git clean
fatal: clean.requireForce defaults to true and neither -n nor -f given; 
refusing to clean
$ git clean --force
Are you sure [y/n]?

An optional confirmation dialog seems interesting, but activating it by
default even with --force seems really weird.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Zile as git core editor?

2013-04-26 Thread Tay Ray Chuan
Hi,

Is the GIT_EDITOR or EDITOR environment variable set? They may be
overriding the core.editor setting.

--
Cheers,
Ray Chuan

On Fri, Apr 26, 2013 at 3:39 PM, Thorsten Jolitz tjol...@gmail.com wrote:

 Hi List,

 after experiencing one crash to many, I'm back to Standard Emacs
 (instead of Emacsserver/Emacsclient), thus using 'emacs' (instead of
 emacsclient) as git core editor triggers reading my huge init file and
 is way to slow.

 I would like to use Zile (a small Emacs clone) instead, and although
 otherwise it works alright on my system, it does not seem to work as git
 core editor.

 Is it possible to use 'git config --global core.editor zile'?

 --
 cheers,
 Thorsten


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


Re: Zile as git core editor?

2013-04-26 Thread Thorsten Jolitz
Tay Ray Chuan rcta...@gmail.com writes:

Hi,

 Is the GIT_EDITOR or EDITOR environment variable set? They may be
 overriding the core.editor setting.

Actually, EDITOR is set to Zile, so that should not be the problem:

[tj@hostname ~]$ echo $EDITOR
/usr/bin/zile
[tj@hostname ~]$ echo $GIT_EDITOR

[tj@hostname ~]$ 

BTW - would 'git config --global core.editor zile' or 'git config
--global core.editor /usr/bin/zile' the right way to set it (both did
not work)? I can start Zile simply with 'zile' on the command line. 

 --
 Cheers,
 Ray Chuan

 On Fri, Apr 26, 2013 at 3:39 PM, Thorsten Jolitz tjol...@gmail.com wrote:

 Hi List,

 after experiencing one crash to many, I'm back to Standard Emacs
 (instead of Emacsserver/Emacsclient), thus using 'emacs' (instead of
 emacsclient) as git core editor triggers reading my huge init file and
 is way to slow.

 I would like to use Zile (a small Emacs clone) instead, and although
 otherwise it works alright on my system, it does not seem to work as git
 core editor.

 Is it possible to use 'git config --global core.editor zile'?

 --
 cheers,
 Thorsten


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

-- 
cheers,
Thorsten

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


Re: [PATCH] clean: confirm before cleaning files and directories

2013-04-26 Thread Jiang Xin
2013/4/26 Matthieu Moy matthieu@grenoble-inp.fr

 Jiang Xin worldhello@gmail.com writes:

   * run `git clean` in interactive sessions,
   * not a dry run,
   * and not quiet.

 Err, does this mean I'll have:

 $ git clean
 fatal: clean.requireForce defaults to true and neither -n nor -f given; 
 refusing to clean
 $ git clean --force

( you omit something, because nothing to clean won't trigger this
confirm dialog)

 Are you sure [y/n]?

 An optional confirmation dialog seems interesting, but activating it by
 default even with --force seems really weird.

I don't know how many programmers had been bitten by runing `git clean -fdx`,
but I bet there were some. I think safety should be put to the 1st place.
It is because clean.requireForce defaults to true, all people trend to run
'git clean' with the '--force/-f' option.

Maybe we can do like this:

1. Set the default value of 'clean.requireForce' to false.
2. Show a error message and do nothing, if there is not 'clean.requireForce'
setting, but the user called with a '--force' flag.
( like a transition for the change of push.default in git 2.0)

any opinions?


 --
 Matthieu Moy
 http://www-verimag.imag.fr/~moy/




--
蒋鑫

北京群英汇信息技术有限公司
邮件: worldhello@gmail.com
网址: http://www.ossxp.com/
博客: http://www.worldhello.net/
微博: http://weibo.com/gotgit/
电话: 18601196889
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Itches with the current rev spec

2013-04-26 Thread Johannes Sixt
Am 4/26/2013 10:19, schrieb Yann Dirson:
 2. git rebase -i master fails unless I've rebased my branch on top of
 master.  I always wished I could do the equivalent of 'git rebase -i
 master..', but I can't.  Can we give the A..B syntax a new meaning in
 the context of rebase, namely $(git merge-base A B)? 
 
 If I understand well, you're refering to a problem that also annoys me,
 ie. using rebase -i to just edit your local commits, without rebasing
 onto the lastest revision on the upstream branch, right ?  That is, just
 another wart of having a single command for arguably-different use cases,
 or of having the single-argument version of rebase use that argument for
 2 very different things (cut-off point and destination), but I won't try
 to address either of these today :)
 
 In that case, what about just adding a new flag to rebase -i, that would
 prevent the single-argument to be interpreted as destination ?  I really
 consider this a workaround for a suboptimal CLI, but since we don't want
 to change the rebase CLI before at least 2.0, that could fill the gap for now.
 
 As for the flag itself, what about --here ?  Obviously it would only be
 meaninglful together with -i, and be exclusive with --onto.

How about this:

Allow alternative spelling of

   git rebase -i master topic

like this:

   git rebase -i master..topic

(as always, the default for topic is HEAD).

Then by extension (cf. git diff, where A...B shows the diff between the
mergebase and B)

   git rebase -i master...topic

would rebase onto the mergebase, which in practice will be the fork point
of topic, i.e., a non-rebasing rebase.

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


Re: [PATCH] clean: confirm before cleaning files and directories

2013-04-26 Thread Matthieu Moy
Jiang Xin worldhello@gmail.com writes:

 Maybe we can do like this:

 1. Set the default value of 'clean.requireForce' to false.
 2. Show a error message and do nothing, if there is not 'clean.requireForce'
 setting, but the user called with a '--force' flag.
 ( like a transition for the change of push.default in git 2.0)

Perhaps introducing a new value for 'clean.requireForce':

$ git config --global clean.requireForce ask
$ git clean
will remove ...
are you sure [y/N]?

The error message when clean.requireForce is unset and --force is not
given could point the user to clean.requireForce=ask.

Then, maybe, later, this could become the default. But I tend to like
the non-interactive nature of most Git commands, so I'm a bit reluctant
here. My way of doing the confirmation dialog is

$ git clean -n
would remove ...
$ git clean -f

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] clean: confirm before cleaning files and directories

2013-04-26 Thread Thomas Rast
Jiang Xin worldhello@gmail.com writes:

 I don't know how many programmers had been bitten by runing `git clean -fdx`,
 but I bet there were some. I think safety should be put to the 1st place.
 It is because clean.requireForce defaults to true, all people trend to run
 'git clean' with the '--force/-f' option.

But if that's the real problem, wouldn't it be better to introduce
something like clean.requireForce=interactive (or 'ask', or whatever you
make up) which will be like clean.requireForce=true except that when on
a TTY, we ask the user?

-- 
Thomas Rast
trast@{inf,student}.ethz.ch
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Zile as git core editor?

2013-04-26 Thread Matthieu Moy
Thorsten Jolitz tjol...@gmail.com writes:

 BTW - would 'git config --global core.editor zile' or 'git config
 --global core.editor /usr/bin/zile' the right way to set it (both did
 not work)? I can start Zile simply with 'zile' on the command line. 

What do you mean by did not work? Does the launching fail? Or is
another editor launched?

Try:

GIT_TRACE=true git commit -a

to see what's going on.

BTW, you may also try emacs -nw -Q instead of zile.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 4/5] test-hg-hg-git.sh: do not use export X=Y

2013-04-26 Thread Torsten Bögershausen
The shell syntax export X=Y is not understood by all shells.
Split the non portable line into separate lines like this:
X=Y
export X

Signed-off-by: Torsten Bögershausen tbo...@web.de
---
 contrib/remote-helpers/test-hg-hg-git.sh | 10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/contrib/remote-helpers/test-hg-hg-git.sh 
b/contrib/remote-helpers/test-hg-hg-git.sh
index 253e65a..8440341 100755
--- a/contrib/remote-helpers/test-hg-hg-git.sh
+++ b/contrib/remote-helpers/test-hg-hg-git.sh
@@ -103,10 +103,11 @@ setup () {
git config --global receive.denycurrentbranch warn
git config --global remote-hg.hg-git-compat true
 
-   export HGEDITOR=/usr/bin/true
+   HGEDITOR=/usr/bin/true
 
-   export GIT_AUTHOR_DATE=2007-01-01 00:00:00 +0230
-   export GIT_COMMITTER_DATE=$GIT_AUTHOR_DATE
+   GIT_AUTHOR_DATE=2007-01-01 00:00:00 +0230
+   GIT_COMMITTER_DATE=$GIT_AUTHOR_DATE
+   export HGEDITOR GIT_AUTHOR_DATE GIT_COMMITTER_DATE
 }
 
 setup
@@ -296,7 +297,8 @@ test_expect_success 'encoding' '
git add alpha 
git commit -m add älphà 
 
-   export GIT_AUTHOR_NAME=tést èncödîng 
+   GIT_AUTHOR_NAME=tést èncödîng 
+   export GIT_AUTHOR_NAME 
echo beta  beta 
git add beta 
git commit -m add beta 
-- 
1.8.2.1.614.g66d7af5


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


[PATCH 3/5] test-hg-bidi.sh: do not use export X=Y

2013-04-26 Thread Torsten Bögershausen
The shell syntax export X=Y A=B is not understood by all shells.
Split the non portable line into separate lines like this:
A=B
X=Y
export A X

Signed-off-by: Torsten Bögershausen tbo...@web.de
---
 contrib/remote-helpers/test-hg-bidi.sh | 11 ++-
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/contrib/remote-helpers/test-hg-bidi.sh 
b/contrib/remote-helpers/test-hg-bidi.sh
index f368953..f569697 100755
--- a/contrib/remote-helpers/test-hg-bidi.sh
+++ b/contrib/remote-helpers/test-hg-bidi.sh
@@ -68,10 +68,10 @@ setup () {
)  $HOME/.hgrc 
git config --global remote-hg.hg-git-compat true
 
-   export HGEDITOR=/usr/bin/true
-
-   export GIT_AUTHOR_DATE=2007-01-01 00:00:00 +0230
-   export GIT_COMMITTER_DATE=$GIT_AUTHOR_DATE
+   HGEDITOR=/usr/bin/true
+   GIT_AUTHOR_DATE=2007-01-01 00:00:00 +0230
+   GIT_COMMITTER_DATE=$GIT_AUTHOR_DATE
+   export HGEDITOR GIT_AUTHOR_DATE GIT_COMMITTER_DATE
 }
 
 setup
@@ -88,7 +88,8 @@ test_expect_success 'encoding' '
git add alpha 
git commit -m add älphà 
 
-   export GIT_AUTHOR_NAME=tést èncödîng 
+   GIT_AUTHOR_NAME=tést èncödîng 
+   export GIT_AUTHOR_NAME 
echo beta  beta 
git add beta 
git commit -m add beta 
-- 
1.8.2.1.614.g66d7af5


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


[PATCH 2/5] t9501: do not use export X=Y

2013-04-26 Thread Torsten Bögershausen
The shell syntax export X=Y is not understood by all shells.
Split the non portable line into separate lines like this:
X=Y
export X

Signed-off-by: Torsten Bögershausen tbo...@web.de
---
 t/t9501-gitweb-standalone-http-status.sh | 15 ++-
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/t/t9501-gitweb-standalone-http-status.sh 
b/t/t9501-gitweb-standalone-http-status.sh
index ef86948..d3a5bac 100755
--- a/t/t9501-gitweb-standalone-http-status.sh
+++ b/t/t9501-gitweb-standalone-http-status.sh
@@ -130,7 +130,8 @@ test_expect_success DATE_PARSER 'modification: feed 
last-modified' '
 test_debug 'cat gitweb.headers'
 
 test_expect_success DATE_PARSER 'modification: feed if-modified-since 
(modified)' '
-   export HTTP_IF_MODIFIED_SINCE=Wed, 6 Apr 2005 22:14:13 + 
+   HTTP_IF_MODIFIED_SINCE=Wed, 6 Apr 2005 22:14:13 + 
+   export HTTP_IF_MODIFIED_SINCE 
test_when_finished unset HTTP_IF_MODIFIED_SINCE 
gitweb_run p=.git;a=atom;h=master 
grep Status: 200 OK gitweb.headers
@@ -138,7 +139,8 @@ test_expect_success DATE_PARSER 'modification: feed 
if-modified-since (modified)
 test_debug 'cat gitweb.headers'
 
 test_expect_success DATE_PARSER 'modification: feed if-modified-since 
(unmodified)' '
-   export HTTP_IF_MODIFIED_SINCE=Thu, 7 Apr 2005 22:14:13 + 
+   HTTP_IF_MODIFIED_SINCE=Thu, 7 Apr 2005 22:14:13 + 
+   export HTTP_IF_MODIFIED_SINCE 
test_when_finished unset HTTP_IF_MODIFIED_SINCE 
gitweb_run p=.git;a=atom;h=master 
grep Status: 304 Not Modified gitweb.headers
@@ -153,7 +155,8 @@ test_expect_success DATE_PARSER 'modification: snapshot 
last-modified' '
 test_debug 'cat gitweb.headers'
 
 test_expect_success DATE_PARSER 'modification: snapshot if-modified-since 
(modified)' '
-   export HTTP_IF_MODIFIED_SINCE=Wed, 6 Apr 2005 22:14:13 + 
+   HTTP_IF_MODIFIED_SINCE=Wed, 6 Apr 2005 22:14:13 + 
+   export HTTP_IF_MODIFIED_SINCE 
test_when_finished unset HTTP_IF_MODIFIED_SINCE 
gitweb_run p=.git;a=snapshot;h=master;sf=tgz 
grep Status: 200 OK gitweb.headers
@@ -161,7 +164,8 @@ test_expect_success DATE_PARSER 'modification: snapshot 
if-modified-since (modif
 test_debug 'cat gitweb.headers'
 
 test_expect_success DATE_PARSER 'modification: snapshot if-modified-since 
(unmodified)' '
-   export HTTP_IF_MODIFIED_SINCE=Thu, 7 Apr 2005 22:14:13 + 
+   HTTP_IF_MODIFIED_SINCE=Thu, 7 Apr 2005 22:14:13 + 
+   export HTTP_IF_MODIFIED_SINCE 
test_when_finished unset HTTP_IF_MODIFIED_SINCE 
gitweb_run p=.git;a=snapshot;h=master;sf=tgz 
grep Status: 304 Not Modified gitweb.headers
@@ -170,7 +174,8 @@ test_debug 'cat gitweb.headers'
 
 test_expect_success DATE_PARSER 'modification: tree snapshot' '
ID=`git rev-parse --verify HEAD^{tree}` 
-   export HTTP_IF_MODIFIED_SINCE=Wed, 6 Apr 2005 22:14:13 + 
+   HTTP_IF_MODIFIED_SINCE=Wed, 6 Apr 2005 22:14:13 + 
+   export HTTP_IF_MODIFIED_SINCE 
test_when_finished unset HTTP_IF_MODIFIED_SINCE 
gitweb_run p=.git;a=snapshot;h=$ID;sf=tgz 
grep Status: 200 OK gitweb.headers 
-- 
1.8.2.1.614.g66d7af5


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


[PATCH 1/5] t9020: do not use export X=Y

2013-04-26 Thread Torsten Bögershausen
The shell syntax export X=Y is not understood by all shells.
Split the non portable line into separate lines like this:
X=Y
export X

Signed-off-by: Torsten Bögershausen tbo...@web.de
---
 t/t9020-remote-svn.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/t/t9020-remote-svn.sh b/t/t9020-remote-svn.sh
index 2d2f016..d9f6b73 100755
--- a/t/t9020-remote-svn.sh
+++ b/t/t9020-remote-svn.sh
@@ -74,7 +74,8 @@ test_expect_success REMOTE_SVN 'mark-file regeneration' '
 '
 
 test_expect_success REMOTE_SVN 'incremental imports must lead to the same 
head' '
-   export SVNRMAX=3 
+   SVNRMAX=3 
+   export SVNRMAX 
init_git 
git fetch svnsim 
test_cmp .git/refs/svn/svnsim/master .git/refs/remotes/svnsim/master  
-- 
1.8.2.1.614.g66d7af5


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


[PATCH 5/5] t7409: do not use export X=Y

2013-04-26 Thread Torsten Bögershausen
The shell syntax export X=Y A=B is not understood by all shells.
Split the non portable line into separate lines like this:
A=B
X=Y
export A X

Signed-off-by: Torsten Bögershausen tbo...@web.de
---
 t/t7409-submodule-detached-worktree.sh | 14 ++
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/t/t7409-submodule-detached-worktree.sh 
b/t/t7409-submodule-detached-worktree.sh
index 2fec13d..c207171 100755
--- a/t/t7409-submodule-detached-worktree.sh
+++ b/t/t7409-submodule-detached-worktree.sh
@@ -23,7 +23,9 @@ test_expect_success 'submodule on detached working tree' '
mkdir home 
(
cd home 
-   export GIT_WORK_TREE=$(pwd) GIT_DIR=$(pwd)/.dotfiles 
+   GIT_WORK_TREE=$(pwd) 
+   GIT_DIR=$(pwd)/.dotfiles 
+   export GIT_WORK_TREE GIT_DIR 
git clone --bare ../remote .dotfiles 
git submodule add ../bundle1 .vim/bundle/sogood 
test_commit sogood 
@@ -39,7 +41,9 @@ test_expect_success 'submodule on detached working tree' '
(
cd home2 
git clone --bare ../remote .dotfiles 
-   export GIT_WORK_TREE=$(pwd) GIT_DIR=$(pwd)/.dotfiles 
+   GIT_WORK_TREE=$(pwd) 
+   GIT_DIR=$(pwd)/.dotfiles 
+   export GIT_WORK_TREE GIT_DIR 
git checkout master 
git submodule update --init 
(
@@ -55,7 +59,8 @@ test_expect_success 'submodule on detached working pointed by 
core.worktree' '
mkdir home3 
(
cd home3 
-   export GIT_DIR=$(pwd)/.dotfiles 
+   GIT_DIR=$(pwd)/.dotfiles 
+   export GIT_DIR 
git clone --bare ../remote $GIT_DIR 
git config core.bare false 
git config core.worktree .. 
@@ -66,7 +71,8 @@ test_expect_success 'submodule on detached working pointed by 
core.worktree' '
) 
(
cd home 
-   export GIT_DIR=$(pwd)/.dotfiles 
+   GIT_DIR=$(pwd)/.dotfiles 
+   export GIT_DIR 
git config core.bare false 
git config core.worktree .. 
git pull 
-- 
1.8.2.1.614.g66d7af5

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


Re: [PATCH] t9501: Do not use export X=Y

2013-04-26 Thread Torsten Bögershausen
On 2013-04-25 22.46, Junio C Hamano wrote:
 Torsten Bögershausen tbo...@web.de writes:
 
 Spilt lines like export X=Y into 2 lines:
 X=Y
 export X
 
 That can be read from the patch text.
 
 If you are going to spend three lines, please describe why it has to
 be split; that would help educate developers new to the codebase.
 
So true,
writing good commit messages is not easy.
and this was a good example for a bad example

Side questions:
Which shells of which OS/distribution do not understand export X=Y?

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


Re: [PATCH 1/9] remote-bzr: trivial cleanups

2013-04-26 Thread Ramkumar Ramachandra
Felipe Contreras wrote:
 I am helping my fellow developers by replying to the comments they
 make when I send the patches for review. Unfortunately, the only
 developer other than you that has made any comment at all, Ramkumar
 Ramachandra, did so in a bellicose tone, but I replied to all his
 comments either way, which where invalid.

I've never wanted to pick fights with anyone, and I don't foresee
having a desire to do so in the future.  I was just saying what was on
my mind, which is along the lines of: you have written this patch with
the attitude I know what I'm doing, my users will benefit, and nobody
else is going to look at this patch anyway; I'm worried about what
your other patches look like if this is your attitude towards
development.  Junio is harping about the same thing: the impedance
mismatch between you and the rest of us.

 The history *is* readable. If anybody has any problems with the commit
 messages, the place to mention such problems is IN THE PATCH REVIEW.
 Nobody has done that, because either nobody has any problems, or they
 are not interested. Either way, there's nothing I can do about it.

That's what I've been trying to say over and over again: _why_ are
people not reviewing your patches?

0. Because nobody has any problems with them.

1. Because nobody on the git list cares about remote-hg.

2. Because you're stubborn as a mule, and the resulting thread often
results in long-winded discussions like this one (which wastes
everyone's time).  Therefore, the potential reviewer's reasoning is
that their review time is better spent elsewhere, where their review
is actually appreciated.

Hint: it's not (0).

If you're claiming that (1) is the case, then why are you posting to
the git list and hitting everyone's inboxes?  Maintain your project
outside git.

I'm claiming that it's (2).  In which case, it's you who needs changing.

 I'm willing to change my ways when there's reason to change my ways,
 and so far, nobody has provided any evidence that my commit messages
 are indeed lacking, only *opinions*.

You want a formal mathematical proof?  We operate on opinions, and
freeze what we think we all agree with into community guidelines.

 Other people are perfectly fine with them:
 http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/log/?qt=authorq=felipe.contreras

So you're now claiming that we're the ones at fault (Peff, Thomas,
Junio, and me, among others).  Okay, so why are you forcing your
changes and opinions down our throats?  You're in the wrong community:
join a community of people who are more like you (or start your own
project), and stop wasting our time.

Junio C Hamano wrote:
 I do
 not agree with Ram at all when he says that developers are more
 important than users, and I agree with you that the project exists
 for users, and not for developers.

On this.

If Peff were to suddenly stop working on git one day (because he was
frustrated with the community/ development practices), we'd all lose a
lot more than if one random end-user switches to using hg for his tiny
personal projects.  I'm _not_ claiming that there's a split between
users and users that are developers (we have one mailing list for
everyone, and I like that).  What I'm claiming is that we cannot (and
should not) pay equal attention to every user of git.  Some users are
more important than others.  Again, that does _not_ mean that we push
a change that benefits one important user but breaks everyone else's
setup.

Ofcourse the project exists for its users; we're not doing research.
However, we don't all have to write tutorials to keep in touch with
end-users who are completely detached from the development process
(our time is better spent elsewhere), or even have an
end-user-friendly bug tracker (where the SNR is very low).  We don't
have to consciously reach out to people we're not connected to
directly: if we're all sufficiently connected to the real world, the
itches/ bugs worth working on will always find their way to us.  We
live in a connected world.

Yes, I know.  You're going to respond to this email arguing about why
you're Right and why I (and everyone else) is Wrong, either by quoting
what Linus (TM) said and twisting it to mean what you want, belaboring
over what you've already said, or something similar.

I've given up on you, and I suspect a lot of other people have too.
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] t5801: properly test the test shell

2013-04-26 Thread Michael J Gruber
Junio C Hamano venit, vidit, dixit 25.04.2013 19:12:
 Junio C Hamano gits...@pobox.com writes:
 
 Michael J Gruber g...@drmicha.warpmail.net writes:

 fc407f9 (Add new simplified git-remote-testgit, 2012-11-28) introduced a
 test which was meant to skip the test unless the test shell is bash.
 Unfortunately, it tests for the availability of bash only.

 True.

 But users can
 opt to use a different shell (using SHELL_PATH) for the tests even though
 bash is available.

 At least for dash,
 21610d8 (transport-helper: clarify pushing without refspecs, 2013-04-17)
 is the commit which actually introduces a test (pushing without refspec)
 which fails to fail even though it is supposed to. It uses the
 construct:

 VAR=value function arguments

 The right fix for that is to fix that line, so that the test itself
 can run under any sane POSIX shell, isn't it?  The test in turn may
 need to run git-remote-testgit, which, without J6t's updates, only
 is usable under bash, but to make sure the test will choke on
 absence of bash, the existing check should be sufficient, no?
 
 Curiously enough, there were a few instances of the correct set and
 export environment explicitly during the life of subshell construct
 already in the script.  I found only this one as problematic.
 
 Does it fix your issue without your change?
 
 It is a separate issue to port git-remote-testgit to POSIX (J6t
 already has a two part draft), move it to git-remote-testgit.sh, and
 get its shebang line preprocessed like all other shell scripts.  I
 think it is worth doing.
 
 Takers?
 
  t/t5801-remote-helpers.sh | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)
 
 diff --git a/t/t5801-remote-helpers.sh b/t/t5801-remote-helpers.sh
 index 4dcf744..c956abd 100755
 --- a/t/t5801-remote-helpers.sh
 +++ b/t/t5801-remote-helpers.sh
 @@ -118,7 +118,9 @@ test_expect_success 'pushing without refspecs' '
   (cd local2 
   echo content file 
   git commit -a -m ten 
 - GIT_REMOTE_TESTGIT_REFSPEC= test_must_fail git push 2../error) 
 + GIT_REMOTE_TESTGIT_REFSPEC= 
 + export GIT_REMOTE_TESTGIT_REFSPEC 
 + test_must_fail git push 2../error) 
   grep remote-helper doesn.t support push; refspec needed error
  '
  
 

Perfect, I just failed to notice that the subshell would make the export
local to that test.

Thanks!

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


Re: [PATCH] clean: confirm before cleaning files and directories

2013-04-26 Thread Jiang Xin
2013/4/26 Matthieu Moy matthieu@grenoble-inp.fr:
 Jiang Xin worldhello@gmail.com writes:

 Maybe we can do like this:

 1. Set the default value of 'clean.requireForce' to false.
 2. Show a error message and do nothing, if there is not 'clean.requireForce'
 setting, but the user called with a '--force' flag.
 ( like a transition for the change of push.default in git 2.0)

 Perhaps introducing a new value for 'clean.requireForce':

 $ git config --global clean.requireForce ask
 $ git clean
 .will remove ...
 are you sure [y/N]?

 The error message when clean.requireForce is unset and --force is not
 given could point the user to clean.requireForce=ask.

Add new value for clean.requireForce would break old git clent.

   $ git clean
   fatal: bad config value for 'clean.requireforce' in .git/config


 Then, maybe, later, this could become the default. But I tend to like
 the non-interactive nature of most Git commands, so I'm a bit reluctant
 here. My way of doing the confirmation dialog is

 $ git clean -n
 would remove ...
 $ git clean -f


I try to put all cases in one table, but still looks weird.

| clean.requireForce  | git clean | git clean --force |
+-+---|---|
| TRUE| error | delete... |
+-+---|---|
| FALSE   | delete... | delete... |
+-+---|---|
| unset   | confirm   | warn + confirm|
+-+---|---|

Does anyone really set and use clean.requireForce setting?
And if there is a confirm dialog, do we need 'clean.requireForce' any more?
Or we can add a `--no-ask` option, in order to override the confirm dialog.


 --
 Matthieu Moy
 http://www-verimag.imag.fr/~moy/



--
蒋鑫

北京群英汇信息技术有限公司
邮件: worldhello@gmail.com
网址: http://www.ossxp.com/
博客: http://www.worldhello.net/
微博: http://weibo.com/gotgit/
电话: 18601196889
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [BUG] Highly inconsistent diff UI

2013-04-26 Thread Ramkumar Ramachandra
Ramkumar Ramachandra wrote:
 The range version of $(git merge-base A B) B is B ^$(git merge-base A
 B), and not B --not $(git merge-base --all A B) [which is equivalent
 to B ^A or A..B].

Let me make this easier for you, and everyone else.

In git.git, checkout master and merge 9915605c^2 (rr/shortlog-doc).
So, my changeset has graduated from 'pu' to 'master' (I know 'master'
is directly ahead of 'pu', and this is not what you do; but this is
just an exercise).  Now, I execute git log master..pu and search for
the author Ramkumar Ramachandra.  I can see that my shortlog-doc
commits aren't present; so I infer that my changes have graduated to
master.  I can also see the merge commit corresponding to
rr/shortlog-doc, and infer that master merged in rr/shortlog-doc
differently.

If I execute git log pu ^$(git merge-base master pu), I see the merge
commit rr/shortlog-doc _and_ the shortlog-doc commits.  Here, I don't
want to know if my change graduated to master or not: I just want to
know what changes were introduced by the pu branch since the last
fork.  Think of it as a time-truncated version of git log pu: it has
nothing to do with reachability.  The only reason that master even
appears in the command is because I need to specify where pu forked
off from.

I would argue that this is incredibly useful: to see what changes were
introduced by my branch independent of everything else.  What do you
think?
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [BUG] Highly inconsistent diff UI

2013-04-26 Thread Ramkumar Ramachandra
Ramkumar Ramachandra wrote:
 Think of it as a time-truncated version of git log pu: it has
 nothing to do with reachability.

Er, scratch that out.  I don't like talking in vague terms, and this
feature has nothing to do with git log --since (which is what
time-truncated is).
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCHv2 7/7] git grep: honor textconv by default

2013-04-26 Thread Michael J Gruber
Junio C Hamano venit, vidit, dixit 24.04.2013 20:55:
 Matthieu Moy matthieu@grenoble-inp.fr writes:
 
 Grepping through the binary, on the other hand, can very well make
 sense, like:

 $ git grep foo
 file.txt: some instance of foo
 binary file bar.bin matches

BTW, textconv does not have to be slow - just use textconv-cache.

 Yes, 
 
 I am moderately negative on making it the default, mostly because it
 goes against established expectations, but I did not mean to say
 that an ability to pass blob contents through textconv before
 running grep should not exist.  It would be a good option to have.

I'm still looking for a way to at least treat git grep and git show
blob the same way. I understand that I cannot convince you to change
the default here. The two options that I see are:

- Implement the --textconv option but leave the default as is. I did
that for git grep already (just drop 7/7) but it seems to be
cumbersome for git show blob. I have to recheck.

- Implement a new attribute show analogous to diff which applies to
the blob case (git grep is a blob case, and so is git show blob)
which can specify a show driver, which is like a diff driver but
understands textconv and cachetextconv options only.
Here, the default would be --textconv in any case, but unless you
specify a show attribute and driver there is no change in current
behavior.

The second case is a bit like clean/smudge, so, alternatively, one could
add a textconv and cachetextconv option to filter rather than
introducing show. I'm not sure how much the textconv machinery needs
to change, though.

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


Re: [PATCH 1/9] remote-bzr: trivial cleanups

2013-04-26 Thread Ramkumar Ramachandra
Felipe Contreras wrote:
 Any sensible reviewer would be context aware, notice that this
 is a contrib patch, and focus on behavioral changes, notice the
 mistake I made, and point that *one* of the changes was changing the
 behavior, at which point I would agree and reroll either without that
 change, or with the change in a separate commit (which I don't want to
 do right now). The maintainer (you), wouldn't even have to reply at
 all.

Personally, I think it is the job of the submitter to provide a really
helpful commit message and widen his review audience.  If I'm hitting
the git mailing list with my patches, I try to make sure that nearly
everyone on the list can understand what I've done and potentially
review it.  Why else would I want to hit their inboxes with my
patches?

Here's my solution to the problem: maintain your project outside
git.git and merge changes in every couple of months or so with a
simple email containing a pull URL, addressing Junio.  If Junio trusts
you enough to put the changes you send into contrib/ after a cursory
glance, we're done.  Start a separate mailing list for your project/
accept GitHub pull requests via which contributors can send you
changes.  No more fuss or drama on the git list about this.  You can
be as stubborn as you want, and we go back to our lives.  Everyone
wins.

If you want to submit patches to other parts of git, you seriously
need to change your ways.  Let's deal with that problem when it arises
next.
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Itches with the current rev spec

2013-04-26 Thread Ramkumar Ramachandra
Johannes Sixt wrote:
git rebase -i master..topic
git rebase -i master...topic

We absolutely don't want to go down the inconsistent diff UI route.  See [1].

[1]: http://thread.gmane.org/gmane.comp.version-control.git/48
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCHv2 7/7] git grep: honor textconv by default

2013-04-26 Thread Matthieu Moy
Michael J Gruber g...@drmicha.warpmail.net writes:

 BTW, textconv does not have to be slow - just use textconv-cache.

Right, thanks for reminding me about this, I had forgotten its existance ;-).

 I'm still looking for a way to at least treat git grep and git show
 blob the same way.

I agree they should be treated similarly.

 - Implement the --textconv option but leave the default as is. I did
 that for git grep already (just drop 7/7)

That seems sensible.

 but it seems to be cumbersome for git show blob. I have to recheck.

It should be possible to have a tri-state for the --[no-]textconv
option: unset, set to true or set to false. But the code sharing between
log, show and diff might make that non-trivial.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] inotify to minimize stat() calls

2013-04-26 Thread Robert Zeh
On Thu, Apr 25, 2013 at 4:20 PM, Duy Nguyen pclo...@gmail.com wrote:
 On Fri, Apr 26, 2013 at 2:44 AM, Robert Zeh robert.allan@gmail.com 
 wrote:
 Can you just replace lstat/stat with cached_lstat/stat inside
 git-compat-util.h and not touch all files at once? I think you may
 need to deal with paths outside working directory. But because you're
 using lookup table, that should be no problem.

 That's a good idea; but there are a few places where you want to call
 the uncached stat because calling the cache leads to recursion or
 you bump into things that haven't been setup yet.  Any ideas how to
 handle that?

 On second thought, no my idea was stupid. We only need to optimize
 lstat for certain cases and naming cached_lstat is much clearer. I
 suspect read-cache.c and maybe dir.c and unpack-trees.c are the only
 places that need cached_lstat. Other places should not issue many
 lstats and we don't need to touch them.

ok.  The only reason I did it for all of them was the it was a simple search
and replace, and I didn't know how often lstat was called from various
locations.
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Zile as git core editor?

2013-04-26 Thread Thorsten Jolitz
Matthieu Moy matthieu@grenoble-inp.fr writes:

 Thorsten Jolitz tjol...@gmail.com writes:

 BTW - would 'git config --global core.editor zile' or 'git config
 --global core.editor /usr/bin/zile' the right way to set it (both did
 not work)? I can start Zile simply with 'zile' on the command line. 

 What do you mean by did not work? Does the launching fail? Or is
 another editor launched?

 Try:

 GIT_TRACE=true git commit -a

 to see what's going on.

 BTW, you may also try emacs -nw -Q instead of zile.


Thanks for the tip, I found out that:

1. on the command-line, zile actually works as core editor, but
2. not from within Emacs (Magit) where I tried it

 emacs -nw -Q is a nice tip, but I think what I really would like to
 have it that, when I use GNU Emacs Magit and enter a git command 

,-
| Run git like this: command
`-

that calls an editor (e.g. commit --amend), the running Emacs instance
is (re)used and a new buffer is opened for editing (instead of starting
another Emacs instance).

-- 
cheers,
Thorsten

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


Re: [PATCH] clean: confirm before cleaning files and directories

2013-04-26 Thread Junio C Hamano
Jiang Xin worldhello@gmail.com writes:

 I don't know how many programmers had been bitten by runing `git clean -fdx`,
 but I bet there were some. I think safety should be put to the 1st place.

git clean without -n/f errors out, hinting the availablilty of -n
while mentioning -f; that is the safety, isn't it?  Once the user
decides to give -f, the user _wants_ to remove cruft, and it is a
hinderance to require any further confirmation.

Your problem description sounds like that you want to drive without
wearing seatbelts but in case you get in a collision, you suggest to
make the seat automatically stick to the back of anybody who sits on
it with superglue to make it safer.

That approach might give it an alternative safety, but it would make
it extremely annoying if you apply it also to people who do wear
belts, no?

This extra confirmation should never be the default.
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] clean: confirm before cleaning files and directories

2013-04-26 Thread Matthieu Moy
Junio C Hamano gits...@pobox.com writes:

 git clean without -n/f errors out, hinting the availablilty of -n
 while mentioning -f; that is the safety, isn't it?  Once the user
 decides to give -f, the user _wants_ to remove cruft, and it is a
 hinderance to require any further confirmation.

This is only half true: because git clean does nothing without -f,
people's fingers get trained to type git clean -f without really
thinking about it. Just like people alias rm='rm -i' and then type
rm -fr * mechanically.

The nice thing with the confirmation dialog is that it shows the list
before asking (and unlike 'rm -i', it asks only once).

But as I said in another thread, I fully agree that adding the
confirmation by default even with -f is nonsense.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] t9501: Do not use export X=Y

2013-04-26 Thread Junio C Hamano
Torsten Bögershausen tbo...@web.de writes:

 On 2013-04-25 22.46, Junio C Hamano wrote:
 Torsten Bögershausen tbo...@web.de writes:
 
 Spilt lines like export X=Y into 2 lines:
 X=Y
 export X
 
 That can be read from the patch text.
 
 If you are going to spend three lines, please describe why it has to
 be split; that would help educate developers new to the codebase.
 
 So true,
 writing good commit messages is not easy.
 and this was a good example for a bad example

 Side questions:
 Which shells of which OS/distribution do not understand export X=Y?

I have not met one for quite some time myself. cf.

http://thread.gmane.org/gmane.comp.version-control.git/35543/focus=35551
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 00/20] remote-bzr: massive changes

2013-04-26 Thread Junio C Hamano
Felipe Contreras felipe.contre...@gmail.com writes:

 On Thu, Apr 25, 2013 at 8:07 PM, Felipe Contreras
 felipe.contre...@gmail.com wrote:

 I forgot to mention; these apply on top of the previous 'fixes and cleanups'.

Then I should probably wait for v2 6/9 of that series is rerolled.

There could be ones that you may want to reroll other than 6/9 in
that, I didn't have time to look at the backlog. I'll be whipping
the -rc0 into shape today and it is unlikely I'll have time to look
at this or the previous one today.

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


Re: Zile as git core editor?

2013-04-26 Thread Junio C Hamano
Thorsten Jolitz tjol...@gmail.com writes:

  ... I think what I really would like to
  have it that, when I use GNU Emacs Magit and enter a git command 

 ,-
 | Run git like this: command
 `-

 that calls an editor (e.g. commit --amend), the running Emacs instance
 is (re)used and a new buffer is opened for editing (instead of starting
 another Emacs instance).

Hmph, isn't that what emacsclient is for?  I have these

(setenv PAGER cat)
(setenv EDITOR emacsclient)
(server-start)

somewhere in my ~/.emacs to make commands in M-x compile behave.
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] clean: confirm before cleaning files and directories

2013-04-26 Thread Junio C Hamano
Matthieu Moy matthieu@grenoble-inp.fr writes:

 The nice thing with the confirmation dialog is that it shows the list
 before asking (and unlike 'rm -i', it asks only once).

I wouldn't object to having clean -i, which automatically defeats
the requireforce option.

As to a huge single list you have to approve or reject as a whole, I
am on the fence.  When running rm -i, I often wished to see
something like that, but I am fairly sure that I'll call it unusable
the first time I see a list with a few items I want to keep while
removing all others.

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


Re: Possible bug report

2013-04-26 Thread Junio C Hamano
Pierre-François CLEMENT lik...@gmail.com writes:

 As you can see, the --cumulative lines seem to be duplicated, though
 the computed stats aren't exactly the same... It appears when you
 combine the --cumulative option with either --stat, --numstat or
 --shortstat (but not --dirstat) ...

Thanks for a report.

I do not think the deprecated --cumulative command line option was
ever designed to be used with anything but --dirstat.

It was a UI mistake to make it look like an independent option,
which was corrected with 333f3fb0c530 (Refactor --dirstat parsing;
deprecate --cumulative and --dirstat-by-file, 2011-04-29) and the
fix shipped back in v1.7.6. Since that release we do not even
mention the option in the manual.

These days, the right way to spell it is as an option parameter to
the --dirstat option itself (e.g. --dirstat=cumulative).

The parser to parse --cumulative as a command line argument was kept
so that people who were used to --dirstat --cumulative do not have
to see an error from the command line parser.  We could have made
--cumulative with other kind of stat an error back then, but we
didn't. I suspect that we thought it would be sufficient to not
document --cumulative as a standalone option, but I do not recall
the details.
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


git grep parallelism question

2013-04-26 Thread Linus Torvalds
Since I reboot fairly regularly to test new kernels, I don't *always*
have the kernel source tree in my caches, so I still care about some
cold-cache performance. And git grep tends to be the most noticeable
one.

Now, I have a SSD, and even the cold-cache case takes just five
seconds or so, but that's still somethng I react to, since the normal
kernel tree in cache case ends up bring close enough to
instantaneous (half a second) that then when it takes longer I react
to it.

And I started thinking about it, and our git grep parallelism seems
to be limited to 8.

Which is fine most of the time for CPU parallelism (although maybe
some people with big machines would prefer higher numbers), but for IO
parallelism I thought that maybe we'd like a higher number...

So I tried it out, and with THREADS set to 32, I get a roughly 15%
performance boost for the cold-cache case (the error bar is high
enough to not give a very precise number, but I see it going from
~4.8-4.9s on my machine down to 4.2..4.6s).

That's on an SSD, though - the performance implications might be very
different for other use cases (NFS would likely prefer higher IO
parallelism and might show bigger improvement, while a rotational disk
might end up just thrashing more)

Is this a big deal? Probably not. But I did react to how annoying it
was to set the parallelism factor (recompile git with a new number).
Wouldn't it be lovely if it was slightly smarter (something more akin
to the index preloading that takes number of files into account) or at
least allowed people to set the parallelism explicitly with a command
line switch?

Right now it disables the parallel grep entirely for UP, for example.
Which makes perfect sense if grep is all about CPU use. But even UP
might improve from parallel IO..

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


Re: Itches with the current rev spec

2013-04-26 Thread Junio C Hamano
Johannes Sixt j.s...@viscovery.net writes:

 Allow alternative spelling of

git rebase -i master topic

 like this:

git rebase -i master..topic

 (as always, the default for topic is HEAD).

I actually made this typo a few times in the past.

In a single-strand-of-pearls history, what rebase operates on is
clearly a _range_ with a defined linear order of commits, and
master..topic is a natural way to express it.

And rebase not just needs the range that defines the set of commits
to be replayed, but also needs the commit on top of which they are
replayed.  It is natural to take ^master as that commit, and it is
useful when you are trying to catch up with that branch.  

The reason you would use rebase -i is not for catching up [*1*],
so defaulting to replay onto ^master is not useful.  You want the
command to replay on top of the stable same base, so that you can
compare the result with the previous version in order to verify.
Often, the fork-point with master is a good choice for that.

It is tempting to say that rebase -i and normal catch-up rebase
(e.g. pull --rebase) should have designed to behave differently.
git rebase -i master perhaps should have made to rebase the
current work on top of the fork-point from master, not on top of it,
and require an explict --onto master if the user does want to also
catch up.

But the above is orthogonal to the syntax ../... issue.


[Footnote]

*1* rebase and rebase -i already behave slightly differently
with respect to $onto in that a catch-up rebase that is already up
to date notices the situation and turns into a no-op, but it does
not turn rebase -i into a no-op for this exact reason.

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


[PATCH] t/Makefile: remove smoke test targets

2013-04-26 Thread John Keeping
Commit d24fbca (Remove Git's support for smoke testing - 2011-12-23)
removed the smoke test support from the test suite but it was re-added
by commit 342e9ef (Introduce a performance testing framework -
2012-02-17).  This appears to be the result of a mis-merge, since
re-adding the smoke testing infrastructure does not relate to the
subject of that commit.

The current 'smoke' target is broken since the 'harness' script it
uses no longer exists, so just reapply this section of commit d24fbca
and remove all of the smoke testing section in the makefile.

Signed-off-by: John Keeping j...@keeping.me.uk
---
 t/Makefile | 38 --
 1 file changed, 38 deletions(-)

diff --git a/t/Makefile b/t/Makefile
index 1923cc1..44ca7d3 100644
--- a/t/Makefile
+++ b/t/Makefile
@@ -83,42 +83,4 @@ valgrind:
 perf:
$(MAKE) -C perf/ all
 
-# Smoke testing targets
--include ../GIT-VERSION-FILE
-uname_S := $(shell sh -c 'uname -s 2/dev/null || echo unknown')
-uname_M := $(shell sh -c 'uname -m 2/dev/null || echo unknown')
-
-test-results:
-   mkdir -p test-results
-
-test-results/git-smoke.tar.gz: test-results
-   '$(PERL_PATH_SQ)' ./harness \
-   --archive=test-results/git-smoke.tar.gz \
-   $(T)
-
-smoke: test-results/git-smoke.tar.gz
-
-SMOKE_UPLOAD_FLAGS =
-ifdef SMOKE_USERNAME
-   SMOKE_UPLOAD_FLAGS += -F username=$(SMOKE_USERNAME) -F 
password=$(SMOKE_PASSWORD)
-endif
-ifdef SMOKE_COMMENT
-   SMOKE_UPLOAD_FLAGS += -F comments=$(SMOKE_COMMENT)
-endif
-ifdef SMOKE_TAGS
-   SMOKE_UPLOAD_FLAGS += -F tags=$(SMOKE_TAGS)
-endif
-
-smoke_report: smoke
-   curl \
-   -H Expect:  \
-   -F project=Git \
-   -F architecture=$(uname_M) \
-   -F platform=$(uname_S) \
-   -F revision=$(GIT_VERSION) \
-   -F report_file=@test-results/git-smoke.tar.gz \
-   $(SMOKE_UPLOAD_FLAGS) \
-   http://smoke.git.nix.is/app/projects/process_add_report/1 \
-   | grep -v ^Redirecting
-
 .PHONY: pre-clean $(T) aggregate-results clean valgrind perf
-- 
1.8.2.1.715.gb260f47

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


Re: Zile as git core editor?

2013-04-26 Thread Thorsten Jolitz
Junio C Hamano gits...@pobox.com writes:

 Thorsten Jolitz tjol...@gmail.com writes:

  ... I think what I really would like to
  have it that, when I use GNU Emacs Magit and enter a git command 

 ,-
 | Run git like this: command
 `-

 that calls an editor (e.g. commit --amend), the running Emacs instance
 is (re)used and a new buffer is opened for editing (instead of starting
 another Emacs instance).

 Hmph, isn't that what emacsclient is for?  I have these

   (setenv PAGER cat)
   (setenv EDITOR emacsclient)
   (server-start)

 somewhere in my ~/.emacs to make commands in M-x compile behave.

I was a big fan of emacsclient and used it quite some time - but finally
those frequent Emacs crashes caused by it were just unbearable, so I
went back to 'normal' use of Emacs.

But maybe you are right - I should run a second Emacs instance as server
only used to popup emacsclient buffers on demand, while doing all the
serious stuff in a non-server instance of Emacs. 

-- 
cheers,
Thorsten

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


Re: [PATCH] t5801: properly test the test shell

2013-04-26 Thread Junio C Hamano
Michael J Gruber g...@drmicha.warpmail.net writes:

 It is a separate issue to port git-remote-testgit to POSIX (J6t
 already has a two part draft), move it to git-remote-testgit.sh, and
 get its shebang line preprocessed like all other shell scripts.  I
 think it is worth doing.
 
 Takers?

By the way, this hint still stands ;-)

 
  t/t5801-remote-helpers.sh | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)
 
 diff --git a/t/t5801-remote-helpers.sh b/t/t5801-remote-helpers.sh
 index 4dcf744..c956abd 100755
 --- a/t/t5801-remote-helpers.sh
 +++ b/t/t5801-remote-helpers.sh
 @@ -118,7 +118,9 @@ test_expect_success 'pushing without refspecs' '
  (cd local2 
  echo content file 
  git commit -a -m ten 
 -GIT_REMOTE_TESTGIT_REFSPEC= test_must_fail git push 2../error) 
 +GIT_REMOTE_TESTGIT_REFSPEC= 
 +export GIT_REMOTE_TESTGIT_REFSPEC 
 +test_must_fail git push 2../error) 
  grep remote-helper doesn.t support push; refspec needed error
  '
  
 

 Perfect, I just failed to notice that the subshell would make the export
 local to that test.

Good.

I think I queued the fix near the tip of that topic yesterday.
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/9] remote-bzr: trivial cleanups

2013-04-26 Thread Felipe Contreras
On Fri, Apr 26, 2013 at 4:32 AM, Ramkumar Ramachandra
artag...@gmail.com wrote:
 Felipe Contreras wrote:
 I am helping my fellow developers by replying to the comments they
 make when I send the patches for review. Unfortunately, the only
 developer other than you that has made any comment at all, Ramkumar
 Ramachandra, did so in a bellicose tone, but I replied to all his
 comments either way, which where invalid.

 I've never wanted to pick fights with anyone, and I don't foresee
 having a desire to do so in the future.  I was just saying what was on
 my mind, which is along the lines of: you have written this patch with
 the attitude I know what I'm doing, my users will benefit, and nobody
 else is going to look at this patch anyway;

That is an assumption, it's wrong, and it's antagonistic. There's no
need for that.

 I'm worried about what
 your other patches look like if this is your attitude towards
 development.

More assumptions and hypotheticals. Why don't we limit ourselves to
facts and reality?

 The history *is* readable. If anybody has any problems with the commit
 messages, the place to mention such problems is IN THE PATCH REVIEW.
 Nobody has done that, because either nobody has any problems, or they
 are not interested. Either way, there's nothing I can do about it.

 That's what I've been trying to say over and over again: _why_ are
 people not reviewing your patches?

 0. Because nobody has any problems with them.

 1. Because nobody on the git list cares about remote-hg.

 2. Because you're stubborn as a mule, and the resulting thread often
 results in long-winded discussions like this one (which wastes
 everyone's time).  Therefore, the potential reviewer's reasoning is
 that their review time is better spent elsewhere, where their review
 is actually appreciated.

 Hint: it's not (0).

 If you're claiming that (1) is the case, then why are you posting to
 the git list and hitting everyone's inboxes?  Maintain your project
 outside git.

 I'm claiming that it's (2).  In which case, it's you who needs changing.

This is the false dichotomy fallacy, why does it have to be only one
of these reasons? Couldn't it be a mixture of them? Maybe most people
don't care about remote-{bzr,hg}, maybe for the ones that do, most
don't see any problems in the patches, and maybe the ones that do see
problems in the patches don't bring them up, because of various
reasons, like for example, they don't see them as major, and would
rather fix them themselves later after investigation if they are
indeed import problems, or maybe they just don't have time to engage
in discussions.

Yes, there's a possibility that my stubbornness is a factor, and given
their possible lack of time, and possible lack of interested, they
choose to not engage.

But to claim that *everyone* is in (2), and that there are no other
factors that made them land in (2) but my stubbornness is disingenuous
at best.

What would you think of a scientist that says, oh, I'm not going to
review that paper, because each time I do that, the reviewee defends
it, and we end up with long-winded discussions. This scientist
doesn't have the right spirit.

If you submit a review comment, you should be prepared to do defend
it, just like you do when you submit a patch. And you should be
prepared to accept that your patch has mistakes, just like you should
be prepared to accept that your review has mistakes. In this view,
stubbornness is a good thing, because it brings the best in the
reviewer, and in the reviewee, and in the end everyone benefits by
trying to achieve the higher quality possible. Just like stubbornness
is a good thing in science, if both reviwer and reviewee fight for
their point of view, only the best science wins, and we all benefit.

This is all of course if the stubbornness is warranted, but you
haven't claimed that it wasn't, simply that I was stubborn. Well, so
what? Isn't that good?

Show me where I was unreasonable, show me where I was wrong, not where
I was stubborn. One can be stubborn and be right, in fact, when one is
right, it's when one has all the more right to be stubborn.

If you are not prepared to defend your review, so are others, why to
you blame that on me? If you were right, you would be shown to be
right. Period.

 I'm willing to change my ways when there's reason to change my ways,
 and so far, nobody has provided any evidence that my commit messages
 are indeed lacking, only *opinions*.

 You want a formal mathematical proof?  We operate on opinions, and
 freeze what we think we all agree with into community guidelines.

No, we operate in evidence and reason, *not* opinion. Any reasonable
person would say well, I *think* this commit message needs more
description, but I don't *know*, I don't have *evidence* for it, so
I'm not going to fight to the death, as if I had.

Any reasonable person would know the difference between an opinion,
and an objective fact. And react accordingly when another person
attacks an 

Re: git grep parallelism question

2013-04-26 Thread Junio C Hamano
Linus Torvalds torva...@linux-foundation.org writes:

 Wouldn't it be lovely if it was slightly smarter (something more akin
 to the index preloading that takes number of files into account) or at
 least allowed people to set the parallelism explicitly with a command
 line switch?

Yeah, a reasonable starting point for auto-tuning may be to use the
same kind of parameters and heuristics (i.e. max parallel of 20
threads, assume a cost to use an extra thread is the same as running
500 greps), and then tweak them (for example, thread cost of 500 may
be reasonable for lstat() but it would be way too big for grep()).

The real issue may be that we do not have a good estimate of how
many paths are involved in the request before starting these
threads, though.
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/9] remote-bzr: trivial cleanups

2013-04-26 Thread Felipe Contreras
On Fri, Apr 26, 2013 at 7:19 AM, Ramkumar Ramachandra
artag...@gmail.com wrote:
 Felipe Contreras wrote:
 Any sensible reviewer would be context aware, notice that this
 is a contrib patch, and focus on behavioral changes, notice the
 mistake I made, and point that *one* of the changes was changing the
 behavior, at which point I would agree and reroll either without that
 change, or with the change in a separate commit (which I don't want to
 do right now). The maintainer (you), wouldn't even have to reply at
 all.

 Personally, I think it is the job of the submitter to provide a really
 helpful commit message and widen his review audience.  If I'm hitting
 the git mailing list with my patches, I try to make sure that nearly
 everyone on the list can understand what I've done and potentially
 review it.  Why else would I want to hit their inboxes with my
 patches?

If you don't understand the reasoning and history behind remote-bzr,
you might be doing a disservice to everyone by commenting at all.

Bazaar is a dead project, and there are *real* users suffering as we
speak, bound to eternal SCM torment by evil dictators and political
non-speak. Even the worst of remote-bzr patches are a thousand times
better than what you see in bzr code itself.

To give you some perspective, one commit broke a branch in the emacs
project, and ever since then people are not able to clone that branch.
This bug has been known for years, and nobody fixes it. Every time
anybody tries to clone that branch, they need a special sequence of
commands.

They *need* something like remote-bzr to escape the horrendities of
bzr, and all you are doing complaining about a sneaked fix is a
disservice to everyone. Yes, doing such a thing on git.c would not be
particularly great, but wouldn't be horrific either, fortunately we
are not doing that!

Answer me, do you use bzr? No? Do you use remote-bzr? No? Then how in
hell could you possibly have any contextual information to make even a
guess as to what would be the impact of sneaking such a small fix? You
can't.

But why are we even speaking about this nonsense? This patch has been
dropped. You want to review something, go review PATCH v2 1/9. Stop
arguing about stubbornness and hypotheticals, when there's actual code
to review.

What is your objective, do you want to help this project move forward or not?

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


Re: [PATCH 1/9] remote-bzr: trivial cleanups

2013-04-26 Thread Ramkumar Ramachandra
Felipe Contreras wrote:
 What is your objective, do you want to help this project move forward or not?

Forward, please.

I want a solution to this persistent problem of conflict though.  And
I presented one in my previous email:

Here's my solution to the problem: maintain your project outside
git.git and merge changes in every couple of months or so with a
simple email containing a pull URL, addressing Junio.  If Junio trusts
you enough to put the changes you send into contrib/ after a cursory
glance, we're done.  Start a separate mailing list for your project/
accept GitHub pull requests via which contributors can send you
changes.  No more fuss or drama on the git list about this.  You can
be as stubborn as you want, and we go back to our lives.  Everyone
wins.

I'll probably even contribute small patches once in a while.
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: git grep parallelism question

2013-04-26 Thread Linus Torvalds
On Fri, Apr 26, 2013 at 11:47 AM, Junio C Hamano gits...@pobox.com wrote:

 The real issue may be that we do not have a good estimate of how
 many paths are involved in the request before starting these
 threads, though.

Yes. Also, I'm not sure if the 15% possible improvement on my SSD case
is even worth it for something that in the end isn't necessarily the
common case. I *suspect* that it might be a much bigger deal on NFS
(IO parallelism really does end up being a big deal sometimes, and
caching tends to be less aggressive too), but on rotational media it
might be much less clear, or even a loss..

Are there people out there who use git grep over NFS and have been
unhappy with performance? If are willing to recompile git with a
different THREAD value in builtin/grep.c, then on a Linux client you
can try

echo 3  /proc/sys/vm/drop_caches

to largely force cold-cache behavior for testing (I say largely,
because it won't drop busy/dirty pages, but for git grep kind of
loads it should be good).

Of course, you need root for it, so..

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


[PATCH 1/2] t/Makefile: fix result handling with TEST_OUTPUT_DIRECTORY

2013-04-26 Thread John Keeping
When TEST_OUTPUT_DIRECTORY is set, the test results will be generated in
$TEST_OUTPUT_DIRECTORY/test-results, which may not be the same as
test-results in t/Makefile.  This causes the aggregate-results target
to fail as it finds no count files.

Fix this by introducing TEST_RESULTS_DIRECTORY and using it wherever
test-results is referenced.

Signed-off-by: John Keeping j...@keeping.me.uk
---
 t/Makefile | 13 ++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/t/Makefile b/t/Makefile
index 44ca7d3..0e1408d 100644
--- a/t/Makefile
+++ b/t/Makefile
@@ -15,9 +15,16 @@ PROVE ?= prove
 DEFAULT_TEST_TARGET ?= test
 TEST_LINT ?= test-lint-duplicates test-lint-executable
 
+ifdef TEST_OUTPUT_DIRECTORY
+TEST_RESULTS_DIRECTORY = $(TEST_RESULTS_DIRECTORY)/test-results
+else
+TEST_RESULTS_DIRECTORY = test-results
+endif
+
 # Shell quote;
 SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))
 PERL_PATH_SQ = $(subst ','\'',$(PERL_PATH))
+TEST_RESULTS_DIRECTORY_SQ = $(subst ','\'',$(TEST_RESULTS_DIRECTORY))
 
 T = $(sort $(wildcard t[0-9][0-9][0-9][0-9]-*.sh))
 TSVN = $(sort $(wildcard t91[0-9][0-9]-*.sh))
@@ -36,10 +43,10 @@ $(T):
@echo *** $@ ***; GIT_CONFIG=.git/config '$(SHELL_PATH_SQ)' $@ 
$(GIT_TEST_OPTS)
 
 pre-clean:
-   $(RM) -r test-results
+   $(RM) -r '$(TEST_RESULTS_DIRECTORY_SQ)'
 
 clean-except-prove-cache:
-   $(RM) -r 'trash directory'.* test-results
+   $(RM) -r 'trash directory'.* '$(TEST_RESULTS_DIRECTORY_SQ)'
$(RM) -r valgrind/bin
 
 clean: clean-except-prove-cache
@@ -65,7 +72,7 @@ aggregate-results-and-cleanup: $(T)
$(MAKE) clean
 
 aggregate-results:
-   for f in test-results/t*-*.counts; do \
+   for f in '$(TEST_RESULTS_DIRECTORY_SQ)'/t*-*.counts; do \
echo $$f; \
done | '$(SHELL_PATH_SQ)' ./aggregate-results.sh
 
-- 
1.8.2.1.715.gb260f47

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


[PATCH 2/2] test output: respect $TEST_OUTPUT_DIRECTORY

2013-04-26 Thread John Keeping
Most test results go in $TEST_OUTPUT_DIRECTORY, but the output files for
tests run with --tee or --valgrind just use bare test-results.
Changes these so that they do respect $TEST_OUTPUT_DIRECTORY.

As a result of this, the valgrind/analyze.sh script may no longer
inspect the correct files so it is also updated to respect
$TEST_OUTPUT_DIRECTORY by adding it to GIT-BUILD-OPTIONS.  This may be a
regression for people who have TEST_OUTPUT_DIRECTORY in their config.mak
but want to override it in the environment, but this change merely
brings it into line with GIT_TEST_OPTS which already cannot be
overridden if it is specified in config.mak.

Signed-off-by: John Keeping j...@keeping.me.uk
---
 Makefile  | 3 +++
 t/test-lib.sh | 4 ++--
 t/valgrind/analyze.sh | 8 ++--
 3 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index 90661a2..d4d95fa 100644
--- a/Makefile
+++ b/Makefile
@@ -2166,6 +2166,9 @@ GIT-BUILD-OPTIONS: FORCE
@echo NO_PERL=\''$(subst ','\'',$(subst ','\'',$(NO_PERL)))'\' $@
@echo NO_PYTHON=\''$(subst ','\'',$(subst ','\'',$(NO_PYTHON)))'\' $@
@echo NO_UNIX_SOCKETS=\''$(subst ','\'',$(subst 
','\'',$(NO_UNIX_SOCKETS)))'\' $@
+ifdef TEST_OUTPUT_DIRECTORY
+   @echo TEST_OUTPUT_DIRECTORY=\''$(subst ','\'',$(subst 
','\'',$(TEST_OUTPUT_DIRECTORY)))'\' $@
+endif
 ifdef GIT_TEST_OPTS
@echo GIT_TEST_OPTS=\''$(subst ','\'',$(subst 
','\'',$(GIT_TEST_OPTS)))'\' $@
 endif
diff --git a/t/test-lib.sh b/t/test-lib.sh
index ca6bdef..70ad085 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -54,8 +54,8 @@ done,*)
# do not redirect again
;;
 *' --tee '*|*' --va'*)
-   mkdir -p test-results
-   BASE=test-results/$(basename $0 .sh)
+   mkdir -p $(TEST_OUTPUT_DIRECTORY)/test-results
+   BASE=$(TEST_OUTPUT_DIRECTORY)/test-results/$(basename $0 .sh)
(GIT_TEST_TEE_STARTED=done ${SHELL_PATH} $0 $@ 21;
 echo $?  $BASE.exit) | tee $BASE.out
test $(cat $BASE.exit) = 0
diff --git a/t/valgrind/analyze.sh b/t/valgrind/analyze.sh
index d8105d9..7b58f01 100755
--- a/t/valgrind/analyze.sh
+++ b/t/valgrind/analyze.sh
@@ -1,6 +1,10 @@
 #!/bin/sh
 
-out_prefix=$(dirname $0)/../test-results/valgrind.out
+# Get TEST_OUTPUT_DIRECTORY from GIT-BUILD-OPTIONS if it's there...
+. $(dirname $0)/../../GIT-BUILD-OPTIONS
+# ... otherwise set it to the default value.
+: ${TEST_OUTPUT_DIRECTORY=$(dirname $0)/..}
+
 output=
 count=0
 total_count=0
@@ -115,7 +119,7 @@ handle_one () {
finish_output
 }
 
-for test_script in $(dirname $0)/../test-results/*.out
+for test_script in $(TEST_OUTPUT_DIRECTORY)/test-results/*.out
 do
handle_one $test_script
 done
-- 
1.8.2.1.715.gb260f47

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


Re: [PATCH] clean: confirm before cleaning files and directories

2013-04-26 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes:

 Matthieu Moy matthieu@grenoble-inp.fr writes:

 The nice thing with the confirmation dialog is that it shows the list
 before asking (and unlike 'rm -i', it asks only once).

 I wouldn't object to having clean -i, which automatically defeats
 the requireforce option.

 As to a huge single list you have to approve or reject as a whole, I
 am on the fence.  When running rm -i, I often wished to see
 something like that, but I am fairly sure that I'll call it unusable
 the first time I see a list with a few items I want to keep while
 removing all others.

Elaborating on this a bit more, hoping it would help people who want
to design the --confirm-before-doing option...

The primary reason I think the user will find We are going to
remove these.  OK? irritating is that most of the time, there are
only a few items that the user would want to keep.

$ rm --confirm-before-doing -r path
... list of three dozens of items, among which
... there may be two items that should be kept
Remove all? [Y/n]

After seeing this prompt and saying 'n', the user would _not_ thank
the command for reminding about these precious two items, because
the only next step available to the user is to remove the remaining
34 items manually.

Confirm in bulk before doing feature can become useful if it had a
line item veto option in the confirmation time.  The interaction
then could go like this:

$ rm --confirm-before-doing -r path
path/foopath/frotz/nitfolpath/sotto
path/barpath/frotz/xyzzy path/trail
......   ... 
Remove (list items you want to keep)? path/frotz

and the user could instruct it to remove everything other than those
inside path/fortz.  If the user do not want to remove anything,
there is an option to ^C out of the command.

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


Re: [PATCH 1/9] remote-bzr: trivial cleanups

2013-04-26 Thread Felipe Contreras
On Fri, Apr 26, 2013 at 4:32 AM, Ramkumar Ramachandra
artag...@gmail.com wrote:
 Felipe Contreras wrote:

 Junio C Hamano wrote:
 I do
 not agree with Ram at all when he says that developers are more
 important than users, and I agree with you that the project exists
 for users, and not for developers.

 On this.

 If Peff were to suddenly stop working on git one day (because he was
 frustrated with the community/ development practices), we'd all lose a
 lot more than if one random end-user switches to using hg for his tiny
 personal projects.

Yeah but that's not happening is it? This is yet another hypothetical.
Last I checked Peff never threatened to leave the project. Did I miss
a memo?

The last time somebody announced he was going to leave the project we
did what was reasonable; investigate the reasons. And that's what we
would do if Peff threatened to leave.

But fine, lets assume there's a hypothetical Peff, with hypothetical
reasons to leave the project...

 I'm _not_ claiming that there's a split between
 users and users that are developers (we have one mailing list for
 everyone, and I like that).  What I'm claiming is that we cannot (and
 should not) pay equal attention to every user of git.  Some users are
 more important than others.  Again, that does _not_ mean that we push
 a change that benefits one important user but breaks everyone else's
 setup.

The importance of users changes all the time. The 15 year old kid in
Sao Paulo might not be important today, but he might be the single
most important contributor ten years from now. Hell, he might even
replace Junio as the maintainer.

Who are you to decide which users are important, and which are not?

 Ofcourse the project exists for its users; we're not doing research.
 However, we don't all have to write tutorials to keep in touch with
 end-users who are completely detached from the development process
 (our time is better spent elsewhere),

Maybe we should, and maybe we would see then some areas of
improvement. In fact, I have done so, and I do see lots of areas of
improvement in git's UI.

I agree that there are more important areas, or rather, more fun to
work with, but the fact that most git developers don't pay too much
attention to the pain of newcomers shows, and it's a very common
criticism of git; it's difficult to learn, it doesn't have a
consistent UI, many commands don't make sense. And I happen to agree
with that claim, but it's not an easy problem to solve, specially when
you care about *all* users, both old and new, which we do.

We should keep in mind the problems in git's UI for newcomers. There's
no reason no to.

 or even have an
 end-user-friendly bug tracker (where the SNR is very low).  We don't
 have to consciously reach out to people we're not connected to
 directly: if we're all sufficiently connected to the real world, the
 itches/ bugs worth working on will always find their way to us.  We
 live in a connected world.

Nobody is claiming we need a bug tracker, there's no point in arguing
about that. The rate at which we fix bugs or our tracking of them is
not a problem.

 Yes, I know.  You're going to respond to this email arguing about why
 you're Right and why I (and everyone else) is Wrong, either by quoting
 what Linus (TM) said and twisting it to mean what you want, belaboring
 over what you've already said, or something similar.

Where did I twist anything? You can see Linus talk himself:
http://www.youtube.com/watch?v=kzKzUBLEzwk

Point me exactly where does he say some users are more important than
others, in fact, he is saying the opposite, the amount of people that
needed the Linux version compatibility flag was really really small,
yet they did it, why? Because *all* users matter. Not that it matters
what Linus says, what matters is that it's right; the moment you start
balkanizing your user base, the moment you start giving some them
reason to fork the project. When was the last time Linux was forked?
GNOME did exactly that, they said; you, users over there, we don't
care about you anymore, what did they do? Fork. They lost so many
users they had to revert their decision.

Should we willingly and knowingly neglect some git user-base? No, why
would you want them to fork? In a way, git's UI has been so bad, that
some kind-of-forks have happened, that tells us something; the UI
needs some love, fortunately none of those forks worked, which tells
us something too; it's not too atrocious.

That's not to say we shouldn't fix the UI, we should, in a way that
everyone's happy, which is hard, but we will do it, eventually.

Cheers.

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


Re: git grep parallelism question

2013-04-26 Thread Junio C Hamano
Linus Torvalds torva...@linux-foundation.org writes:

 Yes. Also, I'm not sure if the 15% possible improvement on my SSD case
 is even worth it for something that in the end isn't necessarily the
 common case.

Cold cache being uncommon case would be forever true but more and
more people are on SSD, and 15% is not a trivial improvement.

 Are there people out there who use git grep over NFS and have been
 unhappy with performance? If are willing to recompile git with a
 different THREAD value in builtin/grep.c,...

OK, you have to recompile at least once for experiment, so perhaps
building the test binary with this patch may help.

 builtin/grep.c | 30 ++
 1 file changed, 22 insertions(+), 8 deletions(-)

diff --git a/builtin/grep.c b/builtin/grep.c
index 159e65d..f635cd5 100644
--- a/builtin/grep.c
+++ b/builtin/grep.c
@@ -26,12 +26,14 @@ static char const * const grep_usage[] = {
 static int use_threads = 1;
 
 #ifndef NO_PTHREADS
-#define THREADS 8
-static pthread_t threads[THREADS];
+#define MAX_THREADS 100
+static int num_threads = 8;
+static pthread_t threads[MAX_THREADS];
 
-/* We use one producer thread and THREADS consumer
- * threads. The producer adds struct work_items to 'todo' and the
- * consumers pick work items from the same array.
+/*
+ * We use one producer thread and THREADS consumer threads. The
+ * producer adds struct work_items to 'todo' and the consumers pick
+ * work items from the same array.
  */
 struct work_item {
struct grep_source source;
@@ -205,7 +207,7 @@ static void start_threads(struct grep_opt *opt)
strbuf_init(todo[i].out, 0);
}
 
-   for (i = 0; i  ARRAY_SIZE(threads); i++) {
+   for (i = 0; i  num_threads; i++) {
int err;
struct grep_opt *o = grep_opt_dup(opt);
o-output = strbuf_out;
@@ -237,7 +239,7 @@ static int wait_all(void)
pthread_cond_broadcast(cond_add);
grep_unlock();
 
-   for (i = 0; i  ARRAY_SIZE(threads); i++) {
+   for (i = 0; i  num_threads; i++) {
void *h;
pthread_join(threads[i], h);
hit |= (int) (intptr_t) h;
@@ -636,6 +638,7 @@ int cmd_grep(int argc, const char **argv, const char 
*prefix)
int i;
int dummy;
int use_index = 1;
+   int num_threads_explicit = -1;
int pattern_type_arg = GREP_PATTERN_TYPE_UNSPECIFIED;
 
struct option options[] = {
@@ -743,6 +746,8 @@ int cmd_grep(int argc, const char **argv, const char 
*prefix)
N_(allow calling of grep(1) (ignored by this 
build))),
{ OPTION_CALLBACK, 0, help-all, options, NULL, N_(show 
usage),
  PARSE_OPT_HIDDEN | PARSE_OPT_NOARG, help_callback },
+   OPT_INTEGER(0, threads, num_threads_explicit,
+   N_(use threads when searching)),
OPT_END()
};
 
@@ -773,6 +778,15 @@ int cmd_grep(int argc, const char **argv, const char 
*prefix)
 PARSE_OPT_NO_INTERNAL_HELP);
grep_commit_pattern_type(pattern_type_arg, opt);
 
+   if (MAX_THREADS = num_threads_explicit) {
+   warning(limiting --threads to %d, MAX_THREADS);
+   num_threads = MAX_THREADS;
+   } else if (num_threads_explicit  0) {
+   ; /* keep num_threads to compiled-in default */
+   } else {
+   num_threads = num_threads_explicit;
+   }
+
if (use_index  !startup_info-have_repository)
/* die the same way as if we did it at the beginning */
setup_git_directory();
@@ -834,7 +848,7 @@ int cmd_grep(int argc, const char **argv, const char 
*prefix)
}
 
 #ifndef NO_PTHREADS
-   if (list.nr || cached || online_cpus() == 1)
+   if ((list.nr || cached || online_cpus() == 1)  num_threads_explicit  
0)
use_threads = 0;
 #else
use_threads = 0;
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC/PATCH] Make --full-history consider more merges

2013-04-26 Thread Kevin Bracey

On 25/04/2013 21:19, Junio C Hamano wrote:
How many decorations are we talking about here? One for each merge 
commit in the entire history? Do we have a cue that can tell us when 
we are really done with a commit that lets us discard the associated 
data as we go on digging, keeping the size of our working set somewhat 
bounded, perhaps proportional to the number of commits in our 
rev_info-commits queue? 


As it stands, it's one decoration per interesting merge commit that's 
processed by try_to_simplify_commit(), if simplify_merges is set. (Only 
simplify_merges needs the information at present - conceivably 
limit_to_ancestry could use it too). I don't know how to go about 
discarding the data, or when it could be done - I'm not clear enough on 
the wider sequencing machinery in revision.c yet.


I have a first draft of a set of patches, which will follow this message.

1/3 addresses the initial get simplify_merges right, passing your 
test. That patch is written to make it easy to extend with the next two, 
which add a never eliminate all our TREESAME parents rule, and 
reinstate your revertedeliminate irrelevant side branches. The error I 
spotted in that was that you weren't checking that you were eliminating 
root commits - with that fixed it seems sound to me.


I need to create a new test for patch 2, but this version passes the 
full test suite, including fixing the known failure in t6012, and it 
also gets the examples in the manual right. (I've extended the examples 
to include the irrelevant side branch - not sure this is worthwhile, as 
it's such an unusual case, and I think that section is confusing enough 
for newbies...)


Kevin




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


Re: [PATCH 1/9] remote-bzr: trivial cleanups

2013-04-26 Thread Ramkumar Ramachandra
[completely off-topic; don't worry, we're just having a friendly chat]

Felipe Contreras wrote:
 If you are not prepared to defend your review, so are others, why to
 you blame that on me? If you were right, you would be shown to be
 right. Period.

Felipe, there are some things that are worth arguing about for a long
time (like the new revision spec I'm proposing in [1]), and others
that are not.

[1]: http://thread.gmane.org/gmane.comp.version-control.git/48/focus=222526

 No, we operate in evidence and reason, *not* opinion. Any reasonable
 person would say well, I *think* this commit message needs more
 description, but I don't *know*, I don't have *evidence* for it, so
 I'm not going to fight to the death, as if I had.

Don't you think you're taking reason to an extreme here?  Reason is a
tool that I use when I want.  I don't want reason when I'm browsing
Google Art Project or listening to Gentle Giant.  Arguments like is
this commit message large enough? are really not worth the time and
effort.

 Ultimately the decision to merge or not to merge comes to Junio, if
 you don't like his decision, go complain to him, but I would be
 prepared with points in time where people complained about these
 patches, and there are no complains, so you have no ammunition at all
 whatsoever.

I have no desire to attack you, Felipe.  I respect you as a more
experienced developer than myself, and am trying to offer constructive
criticism.

I don't have an ego (or consider myself important to the community).
Whatever will happen will happen, with or without me.

 And this is how communities die. When everybody thinks the same, and
 everyone who thinks differently is displaced. A monoculture, a place
 full of yes-men where nobody criticizes anybody, a circlejerk where
 everyone palms the back of everyone else. Eventually things go south,
 and nobody around you understands why.

 Diversity in a community is healthy. If you don't like people who
 think differently, *you* have a problem. If you don't like standing up
 and defending your ideas, *you* have a problem. If you don't like
 discussing on the basis of evidence and reason, *you* have a problem.

Diversity is certainly healthy, and I it would be nice to have you in
the community.  We just have to find a way to keep the conflict down.
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[RFC/PATCH 1/3] revision.c: tighten up TREESAME handling of merges

2013-04-26 Thread Kevin Bracey
Historically TREESAME was set on a commit if it was TREESAME to _any_ of
its parents. This is not optimal, as such a merge could still be worth
showing, particularly if it is an odd -s ours merge that (possibly
accidentally) dropped a change. And the problem is further compounded by
the fact that simplify_merges could drop the actual parent that a commit
was TREESAME to, leaving it as a normal commit marked TREESAME that
isn't actually TREESAME to its remaining parent.

This commit redefines TREESAME to be true only if a commit is TREESAME to
_all_ of its parents. This doesn't affect either the default
simplify_history behaviour (because partially TREESAME merges are turned
into normal commits), or full-history with parent rewriting (because all
merges are output). But it does affect other modes.

It also modifies simplify_merges to recalculate TREESAME after removing
a parent. This is achieved by storing per-parent TREESAME flags on the
initial scan, so the combined flag can be easily recomputed.

Signed-off-by: Kevin Bracey ke...@bracey.fi
---
 Documentation/rev-list-options.txt |   2 +-
 revision.c | 220 -
 revision.h |   1 +
 3 files changed, 192 insertions(+), 31 deletions(-)

diff --git a/Documentation/rev-list-options.txt 
b/Documentation/rev-list-options.txt
index 3bdbf5e..380db48 100644
--- a/Documentation/rev-list-options.txt
+++ b/Documentation/rev-list-options.txt
@@ -413,7 +413,7 @@ parent lines.
I  A  B  N  D  O
 ---
 +
-`P` and `M` were excluded because they are TREESAME to a parent.  `E`,
+`P` and `M` were excluded because they are TREESAME to both parents.  `E`,
 `C` and `B` were all walked, but only `B` was !TREESAME, so the others
 do not appear.
 +
diff --git a/revision.c b/revision.c
index a67b615..176eb7b 100644
--- a/revision.c
+++ b/revision.c
@@ -429,10 +429,85 @@ static int rev_same_tree_as_empty(struct rev_info *revs, 
struct commit *commit)
return retval = 0  (tree_difference == REV_TREE_SAME);
 }
 
+struct treesame_state {
+   unsigned int nparents;
+   unsigned char treesame[FLEX_ARRAY];
+};
+
+static struct treesame_state *initialise_treesame(struct rev_info *revs, 
struct commit *commit)
+{
+   unsigned n = commit_list_count(commit-parents);
+   struct treesame_state *st = xcalloc(1, sizeof(*st) + n);
+   st-nparents = n;
+   add_decoration(revs-treesame, commit-object, st);
+   return st;
+}
+
+static int compact_treesame(struct rev_info *revs, struct commit *commit, 
unsigned parent)
+{
+   struct treesame_state *st = lookup_decoration(revs-treesame, 
commit-object);
+   int old_same;
+
+   if (!st || parent = st-nparents)
+   die(compact_treesame %u, parent);
+
+   /* Can be useful to indicate sameness of removed parent */
+   old_same = st-treesame[parent];
+
+   memmove(st-treesame + parent,
+   st-treesame + parent + 1,
+   st-nparents - parent - 1);
+
+   /* If we've just become a non-merge commit, update TREESAME
+* immediately, in case we trigger an early-exit optimisation.
+* (Note that there may be a mismatch between commit-parents and the
+* treesame_state at this stage, as we may be in mid-rewrite).
+* If still a merge, defer update until update_treesame().
+*/
+   switch (--st-nparents) {
+   case 0:
+   if (rev_same_tree_as_empty(revs, commit))
+   commit-object.flags |= TREESAME;
+   else
+   commit-object.flags = ~TREESAME;
+   break;
+   case 1:
+   if (st-treesame[0]  revs-dense)
+   commit-object.flags |= TREESAME;
+   else
+   commit-object.flags = ~TREESAME;
+   break;
+   }
+
+   return old_same;
+}
+
+static unsigned update_treesame(struct rev_info *revs, struct commit *commit)
+{
+   /* If 0 or 1 parents, TREESAME should be valid already */
+   if (commit-parents  commit-parents-next) {
+   int n = 0;
+   struct treesame_state *st;
+
+   st = lookup_decoration(revs-treesame, commit-object);
+   if (!st) die(update_treesame);
+   commit-object.flags |= TREESAME;
+   for (n = 0; n  st-nparents; n++) {
+   if (!st-treesame[n]) {
+   commit-object.flags = ~TREESAME;
+   break;
+   }
+   }
+   }
+
+   return commit-object.flags  TREESAME;
+}
+
 static void try_to_simplify_commit(struct rev_info *revs, struct commit 
*commit)
 {
struct commit_list **pp, *parent;
-   int tree_changed = 0, tree_same = 0, nth_parent = 0;
+   struct treesame_state *ts = NULL;
+   int tree_changed = 0, 

Re: [PATCH 1/9] remote-bzr: trivial cleanups

2013-04-26 Thread Felipe Contreras
On Fri, Apr 26, 2013 at 1:53 PM, Ramkumar Ramachandra
artag...@gmail.com wrote:
 Felipe Contreras wrote:
 What is your objective, do you want to help this project move forward or not?

 Forward, please.

 I want a solution to this persistent problem of conflict though.  And
 I presented one in my previous email:

 Here's my solution to the problem: maintain your project outside
 git.git and merge changes in every couple of months or so with a
 simple email containing a pull URL, addressing Junio.  If Junio trusts
 you enough to put the changes you send into contrib/ after a cursory
 glance, we're done.  Start a separate mailing list for your project/
 accept GitHub pull requests via which contributors can send you
 changes.  No more fuss or drama on the git list about this.  You can
 be as stubborn as you want, and we go back to our lives.  Everyone
 wins.

I already maintain my own clone outside of git.git[1], and I do
already accept pull requests[2], and people have sent me patches
directly. The stuff I send to the git mailing list is what I think is
ready for merging. But there's only so much stuff I can catch.

We all benefit from these patches being reviewed in the git mailing
list, nobody has claimed otherwise. You are making the error of
assuming that your review was actionable, that I should have done
something, fix the commit message I suppose, but I don't think that's
important.

In contrast, this is how a constructive, valid and helpful review looks like:

http://article.gmane.org/gmane.comp.version-control.git/220034

Junio caught a problem I didn't see, I accepted the valid feedback,
and I resent with a fix. We all benefit from such interactions, both
users, and developers. What's wrong with that?

You just got angry that your review didn't turn out to be helpful, is
that it? Why do you want to steal helpful review from the users of
remote-{bzr,hg}? If that's not the case, please stop doing that. All
review is welcome, not all review should be acted upon.

Cheers.

[1] https://github.com/felipec/git
[2] 
https://github.com/felipec/git/pulls?direction=descpage=1sort=createdstate=closed

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


Re: [PATCH 1/9] remote-bzr: trivial cleanups

2013-04-26 Thread Ramkumar Ramachandra
Felipe Contreras wrote:
 If you don't understand the reasoning and history behind remote-bzr,
 you might be doing a disservice to everyone by commenting at all.

Felipe, I'm trying to help.  If you think my review lacked context,
you can write me a paragraph/ link me to an email and I will read it.

It's not reviewers and submitters attacking each other.  It's
helping out other rational people in the community because you care
for their reviews.  Don't practice exclusivity and label some people
as not eligible to review.  That's not a good way to develop.

 Bazaar is a dead project, and there are *real* users suffering as we
 speak, bound to eternal SCM torment by evil dictators and political
 non-speak. Even the worst of remote-bzr patches are a thousand times
 better than what you see in bzr code itself.

 To give you some perspective, one commit broke a branch in the emacs
 project, and ever since then people are not able to clone that branch.
 This bug has been known for years, and nobody fixes it. Every time
 anybody tries to clone that branch, they need a special sequence of
 commands.

 They *need* something like remote-bzr to escape the horrendities of
 bzr, and all you are doing complaining about a sneaked fix is a
 disservice to everyone. Yes, doing such a thing on git.c would not be
 particularly great, but wouldn't be horrific either, fortunately we
 are not doing that!

My God.  This is horror story.

 Answer me, do you use bzr? No? Do you use remote-bzr? No? Then how in
 hell could you possibly have any contextual information to make even a
 guess as to what would be the impact of sneaking such a small fix? You
 can't.

No Felipe, I don't use bzr.
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[RFC/PATCH 2/3] simplify-merges: never remove all TREESAME parents

2013-04-26 Thread Kevin Bracey
In the event of an odd merge, we may find ourselves TREESAME to
apparently redundant parents. Prevent simplify_merges() from removing
every TREESAME parent - in the event of such a merge it's useful to see
where we came actually from came.

Signed-off-by: Kevin Bracey ke...@bracey.fi
---
 Documentation/rev-list-options.txt |  3 ++-
 revision.c | 24 
 2 files changed, 26 insertions(+), 1 deletion(-)

diff --git a/Documentation/rev-list-options.txt 
b/Documentation/rev-list-options.txt
index 380db48..0832004 100644
--- a/Documentation/rev-list-options.txt
+++ b/Documentation/rev-list-options.txt
@@ -472,7 +472,8 @@ history according to the following rules:
 +
 * Replace each parent `P` of `C'` with its simplification `P'`.  In
   the process, drop parents that are ancestors of other parents, and
-  remove duplicates.
+  remove duplicates, but take care to never drop all parents that
+  we are TREESAME to.
 +
 * If after this parent rewriting, `C'` is a root or merge commit (has
   zero or 1 parents), a boundary commit, or !TREESAME, it remains.
diff --git a/revision.c b/revision.c
index 176eb7b..4e27c9a 100644
--- a/revision.c
+++ b/revision.c
@@ -2106,8 +2106,32 @@ static int remove_marked_parents(struct rev_info *revs, 
struct commit *commit)
 {
struct treesame_state *ts = lookup_decoration(revs-treesame, 
commit-object);
struct commit_list **pp, *p;
+   struct commit *su = NULL, *sm = NULL;
int n, removed = 0;
 
+   /* Prescan - look for both marked and unmarked TREESAME parents */
+   for (p = commit-parents, n = 0; p; p = p-next, n++) {
+   if (ts-treesame[n]) {
+   if (p-item-object.flags  TMP_MARK) {
+   if (!sm) sm = p-item;
+   }
+   else {
+   if (!su) {
+   su = p-item;
+   break;
+   }
+   }
+   }
+   }
+
+   /* If we are TREESAME to a marked-for-deletion parent, but not to any
+* unmarked parents, unmark the first TREESAME parent. We don't want
+* to remove our real parent in the event of an -s ours type
+* merge.
+*/
+   if (!su  sm)
+   sm-object.flags = ~TMP_MARK;
+
pp = commit-parents;
n = 0;
while ((p = *pp) != NULL) {
-- 
1.8.2.1.632.gd2b1879

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


Re: Itches with the current rev spec

2013-04-26 Thread Felipe Contreras
On Fri, Apr 26, 2013 at 12:49 PM, Junio C Hamano gits...@pobox.com wrote:
 Johannes Sixt j.s...@viscovery.net writes:

 Allow alternative spelling of

git rebase -i master topic

 like this:

git rebase -i master..topic

 (as always, the default for topic is HEAD).

 I actually made this typo a few times in the past.

 In a single-strand-of-pearls history, what rebase operates on is
 clearly a _range_ with a defined linear order of commits, and
 master..topic is a natural way to express it.

I agree, but I think there are other unexpected things.

I don't know what 'git rebase master' does, but I would expect 'git
rebase --onto=master' to do the same thing. Then, if 'git rebase
--onto=next master..topic' makes sense, so should 'git rebase next
master..topic'.

Moreover, it often annoys me that 'git rebase master' does exactly
what I want, but 'git rebase --onto=master previous' doesn't find the
commits that are already into 'master'. One would expect the more
defined version to work better, but it doesn't =/

Cheers.

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


[RFC/PATCH 3/3] simplify-merges: drop merge from irrelevant side branch

2013-04-26 Thread Kevin Bracey
Reimplement commit 4b7f53da on top of the new simplify-merges
infrastructure, tightening the condition to only consider root parents;
the original version incorrectly dropped parents that were TREESAME to
anything.

Original log message follows.

The merge simplification rule stated in 6546b59 (revision traversal:
show full history with merge simplification, 2008-07-31) still
treated merge commits too specially.  Namely, in a history with this
shape:

---o---o---M
  /
 x---x---x

where three 'x' were on a history completely unrelated to the main
history 'o' and do not touch any of the paths we are following, we
still said that after simplifying all of the parents of M, 'x'
(which is the leftmost 'x' that rightmost 'x simplifies down to) and
'o' (which would be the last commit on the main history that touches
the paths we are following) are independent from each other, and
both need to be kept.

That is incorrect; when the side branch 'x' never touches the paths,
it should be removed to allow M to simplify down to the last commit
on the main history that touches the paths.

Suggested-by: Junio C Hamano gits...@pobox.com
Signed-off-by: Kevin Bracey ke...@bracey.fi
---
 Documentation/rev-list-options.txt | 35 ++-
 revision.c | 26 +-
 t/t6012-rev-list-simplify.sh   |  2 +-
 3 files changed, 48 insertions(+), 15 deletions(-)

diff --git a/Documentation/rev-list-options.txt 
b/Documentation/rev-list-options.txt
index 0832004..db45401 100644
--- a/Documentation/rev-list-options.txt
+++ b/Documentation/rev-list-options.txt
@@ -342,13 +342,13 @@ In the following, we will always refer to the same 
example history to
 illustrate the differences between simplification settings.  We assume
 that you are filtering for a file `foo` in this commit graph:
 ---
- .-A---M---N---O---P
-/ /   /   /   /
-   I B   C   D   E
-\   /   /   /   /
- `-'
+ .-A---M---N---O---P---Q
+/ /   /   /   /   /
+   I B   C   D   E   Y
+\   /   /   /   /   /
+ `-'   X
 ---
-The horizontal line of history A---P is taken to be the first parent of
+The horizontal line of history A---Q is taken to be the first parent of
 each merge.  The commits are:
 
 * `I` is the initial commit, in which `foo` exists with contents
@@ -370,6 +370,10 @@ each merge.  The commits are:
   strings to quux xyzzy.  Despite appearing interesting, `P` is
   TREESAME to all parents.
 
+* `X` is an indpendent root commit that added a new file `side`, and `Y`
+  modified it. `Y` is TREESAME to `X`. Its merge `Q` added `side` to `P`, and
+  `Q` is TREESAME to all parents.
+
 'rev-list' walks backwards through history, including or excluding
 commits based on whether '\--full-history' and/or parent rewriting
 (via '\--parents' or '\--children') are used.  The following settings
@@ -413,7 +417,7 @@ parent lines.
I  A  B  N  D  O
 ---
 +
-`P` and `M` were excluded because they are TREESAME to both parents.  `E`,
+`Q`, `P` and `M` were excluded because they are TREESAME to both parents.  `E`,
 `C` and `B` were all walked, but only `B` was !TREESAME, so the others
 do not appear.
 +
@@ -431,7 +435,7 @@ Along each parent, prune away commits that are not included
 themselves.  This results in
 +
 ---
- .-A---M---N---O---P
+ .-A---M---N---O---P---Q
 / /   /   /   /
I B   /   D   /
 \   /   /   /   /
@@ -441,7 +445,8 @@ themselves.  This results in
 Compare to '\--full-history' without rewriting above.  Note that `E`
 was pruned away because it is TREESAME, but the parent list of P was
 rewritten to contain `E`'s parent `I`.  The same happened for `C` and
-`N`.  Note also that `P` was included despite being TREESAME.
+`N`, and `X`, `Y` and `Q`.  Note also that `P` and `Q` were included despite
+being TREESAME.
 
 In addition to the above settings, you can change whether TREESAME
 affects inclusion:
@@ -471,9 +476,9 @@ history according to the following rules:
 * Set `C'` to `C`.
 +
 * Replace each parent `P` of `C'` with its simplification `P'`.  In
-  the process, drop parents that are ancestors of other parents, and
-  remove duplicates, but take care to never drop all parents that
-  we are TREESAME to.
+  the process, drop parents that are ancestors of other parents or that are
+  root commits TREESAME to an empty tree, and remove duplicates, but take care
+  to never drop all parents that we are TREESAME to.
 +
 * If after this parent rewriting, `C'` is a root or merge commit (has
   zero or 1 parents), a boundary commit, or !TREESAME, 

Re: [PATCH 1/9] remote-bzr: trivial cleanups

2013-04-26 Thread Ramkumar Ramachandra
Felipe Contreras wrote:
 We all benefit from these patches being reviewed in the git mailing
 list, nobody has claimed otherwise. You are making the error of
 assuming that your review was actionable, that I should have done
 something, fix the commit message I suppose, but I don't think that's
 important.

What I'm saying is that you can get more eyes.  A lot more eyes.  If
you just write a proper commit message!

Why are you hitting everyone's inboxes with such cryptic patches that
require either:
1. The reviewer to trust what you've done and move on.
2. The reviewer to do a lot of digging before the patch becomes
accessible to her.

 You just got angry that your review didn't turn out to be helpful, is
 that it? Why do you want to steal helpful review from the users of
 remote-{bzr,hg}? If that's not the case, please stop doing that. All
 review is welcome, not all review should be acted upon.

I'm not angry about anything, or trying to steal anything.

What happened:  New email.  Felipe's remote-hg fixes.  Okay, let's
look at this.  Part 1.  What?!  [I wrote down what I was thinking as I
was reading the email]

This is where you _should_ apply reason: justify everything you've
done in the patch in your commit message.  Why are you so stubborn
about not wanting to change your ways despite so many people telling
you?  Is it your pride*?

* Yes, I noticed that you have a huge ego.  I consider it an undesirable trait.
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/9] remote-bzr: trivial cleanups

2013-04-26 Thread Ramkumar Ramachandra
Ramkumar Ramachandra wrote:
 Diversity is certainly healthy, and I it would be nice to have you in
 the community.  We just have to find a way to keep the conflict down.

After all, what are we asking for?  Better commit messages.  Why are
you making such a big deal out of it?  You want diversity in length/
form of commit messages?
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/9] remote-bzr: trivial cleanups

2013-04-26 Thread Felipe Contreras
On Fri, Apr 26, 2013 at 2:30 PM, Ramkumar Ramachandra
artag...@gmail.com wrote:
 [completely off-topic; don't worry, we're just having a friendly chat]

 Felipe Contreras wrote:
 If you are not prepared to defend your review, so are others, why to
 you blame that on me? If you were right, you would be shown to be
 right. Period.

 Felipe, there are some things that are worth arguing about for a long
 time (like the new revision spec I'm proposing in [1]), and others
 that are not.

 [1]: 
 http://thread.gmane.org/gmane.comp.version-control.git/48/focus=222526

I agree, and I have discussed about issues with diff in the past,
unfortunately didn't reach any conclusion. I've tried to follow that
thread, but I don't really know what is actually being proposed
anymore.

If you are so keen in receiving feedback from your fellow developers,
you should eventually send an email summarizing the issues and the
proposal for everyone to understand.

In contrast, I take it you agree this trivial patch is not worth
discussing, which I agreed in my first reply.

 No, we operate in evidence and reason, *not* opinion. Any reasonable
 person would say well, I *think* this commit message needs more
 description, but I don't *know*, I don't have *evidence* for it, so
 I'm not going to fight to the death, as if I had.

 Don't you think you're taking reason to an extreme here?  Reason is a
 tool that I use when I want.  I don't want reason when I'm browsing
 Google Art Project or listening to Gentle Giant.  Arguments like is
 this commit message large enough? are really not worth the time and
 effort.

Reason is not a tool for appreciating art, reason is a tool for
discovering truth, and if when arguing you are not interested in what
is actually true, I'm not interested in arguing with you.

 Ultimately the decision to merge or not to merge comes to Junio, if
 you don't like his decision, go complain to him, but I would be
 prepared with points in time where people complained about these
 patches, and there are no complains, so you have no ammunition at all
 whatsoever.

 I have no desire to attack you, Felipe.  I respect you as a more
 experienced developer than myself, and am trying to offer constructive
 criticism.

 I don't have an ego (or consider myself important to the community).
 Whatever will happen will happen, with or without me.

I appreciate your criticism, but that doesn't mean I must agree with
it. And if I do agree, that doesn't mean I must act upon it.

 And this is how communities die. When everybody thinks the same, and
 everyone who thinks differently is displaced. A monoculture, a place
 full of yes-men where nobody criticizes anybody, a circlejerk where
 everyone palms the back of everyone else. Eventually things go south,
 and nobody around you understands why.

 Diversity in a community is healthy. If you don't like people who
 think differently, *you* have a problem. If you don't like standing up
 and defending your ideas, *you* have a problem. If you don't like
 discussing on the basis of evidence and reason, *you* have a problem.

 Diversity is certainly healthy, and I it would be nice to have you in
 the community.  We just have to find a way to keep the conflict down.

A fine way to start is to not rattle away in trivial inconsequential patches.

Cheers.

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


Re: [PATCH 1/9] remote-bzr: trivial cleanups

2013-04-26 Thread Ramkumar Ramachandra
Felipe Contreras wrote:
 A fine way to start is to not rattle away in trivial inconsequential patches.

I have something from Linus (TM) this time :)

https://lkml.org/lkml/2004/12/20/255
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/9] remote-bzr: trivial cleanups

2013-04-26 Thread Ramkumar Ramachandra
Felipe Contreras wrote:
 The importance of users changes all the time. The 15 year old kid in
 Sao Paulo might not be important today, but he might be the single
 most important contributor ten years from now. Hell, he might even
 replace Junio as the maintainer.

Yes, they do.  Did I say that they don't change?

 Where did I twist anything? You can see Linus talk himself:
 http://www.youtube.com/watch?v=kzKzUBLEzwk

Yes, I watched the talk when you posted the link last time.  And yes,
I learnt something.

 Should we willingly and knowingly neglect some git user-base? No, why
 would you want them to fork? In a way, git's UI has been so bad, that
 some kind-of-forks have happened, that tells us something; the UI
 needs some love, fortunately none of those forks worked, which tells
 us something too; it's not too atrocious.

No, we should never neglect.  I believe in including everyone.  In
fact I take it to an extreme: on many instances, I have pointed out
what I want specifically, and asked for a configuration option if it's
not necessarily a sane default.  Git is a toolkit, and should be
loaded with features that even a few users want.

 That's not to say we shouldn't fix the UI, we should, in a way that
 everyone's happy, which is hard, but we will do it, eventually.

On this, I think the way forward is complete-implicit'ness via
configuration variables.  I recently wrote remote.pushdefault to
simply 'git push', and proposed 'git push +ref1 ref2 ref3' to
automatically push to the correct pushdefaults (but that proposal was
rejected).
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/9] remote-bzr: trivial cleanups

2013-04-26 Thread Felipe Contreras
On Fri, Apr 26, 2013 at 2:56 PM, Ramkumar Ramachandra
artag...@gmail.com wrote:
 Felipe Contreras wrote:
 We all benefit from these patches being reviewed in the git mailing
 list, nobody has claimed otherwise. You are making the error of
 assuming that your review was actionable, that I should have done
 something, fix the commit message I suppose, but I don't think that's
 important.

 What I'm saying is that you can get more eyes.  A lot more eyes.  If
 you just write a proper commit message!

It is a trivial obvious patch that changes very few lines of code, it
doesn't need more eyes in my opinion. For the patches that do need
eyes I do send descriptive commit messages. And some patches that I
don't think need eyes, but I think I could do wrong, I also write
descriptive messages.

So far, it looks like I was right in thinking this patch didn't need
more eyes. And I think my original commit description, which I deleted
by mistake was more than enough Mostly from remote-hg. It's possible
that there's a fix to delete files with spaces. Because so far,
nobody has pointed out any actual issue, and it's not clear if this
patch would benefit from even more eyes... probably won't.

 Why are you hitting everyone's inboxes with such cryptic patches that
 require either:
 1. The reviewer to trust what you've done and move on.
 2. The reviewer to do a lot of digging before the patch becomes
 accessible to her.

Because there's no other way to get the changes into git.git. If you
wan't I can add DO NOT REVIEW in the title, but I think trivial
cleanups pretty much sums that what I feel, and actually I wouldn't
want people to _not_ review the patches, but rather to understand that
I think they are trivial, and shouldn't worry too much about them.

 You just got angry that your review didn't turn out to be helpful, is
 that it? Why do you want to steal helpful review from the users of
 remote-{bzr,hg}? If that's not the case, please stop doing that. All
 review is welcome, not all review should be acted upon.

 I'm not angry about anything, or trying to steal anything.

Good, so I'll keep sending the patches, because our users benefit from
the review.

 What happened:  New email.  Felipe's remote-hg fixes.  Okay, let's
 look at this.  Part 1.  What?!  [I wrote down what I was thinking as I
 was reading the email]

Write what you see, not what you feel. Your questions about the code
are fine, but making assumptions about what remote-bzr users must be
suffering by not having more descriptive commit messages are not. You
also assumed that I wanted to send that commit message, when that was
not true, I removed a chunk by mistake.

In general, you shouldn't make assumptions.

 This is where you _should_ apply reason: justify everything you've
 done in the patch in your commit message.  Why are you so stubborn
 about not wanting to change your ways despite so many people telling
 you?  Is it your pride*?

Stop asking these questions, I thought you already agreed this patch
was not worth discussing about. If you see *any other* patch that
doesn't have a good enough commit message, reply _there_. And if you
do want to pursue these questions irrespective of this patch, start a
new thread.

 * Yes, I noticed that you have a huge ego.  I consider it an undesirable 
 trait.

I don't think so, but even if I did, it doesn't matter, all that
matters is that my arguments are sound and valid, you should
concentrate on the ball, not on the man. The fact that I believe my
arguments are valid and sound doesn't make me egotistic, it might be
that they are actually valid and sound, and I'm simply assessing them
correctly. I of course I'm willing to admit otherwise, based on
evidence, and reason.

Cheers.

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


Re: [PATCH 1/9] remote-bzr: trivial cleanups

2013-04-26 Thread Ramkumar Ramachandra
Felipe Contreras wrote:
 If you are so keen in receiving feedback from your fellow developers,
 you should eventually send an email summarizing the issues and the
 proposal for everyone to understand.

Thanks.  I'll do that in the morning.

 Reason is not a tool for appreciating art, reason is a tool for
 discovering truth, and if when arguing you are not interested in what
 is actually true, I'm not interested in arguing with you.

There is no great truth to be discovered by arguing about the length
of commit messages, Felipe.  There are some guidelines or axioms
upon which we build reason.  If you want to argue till everything
breaks down to Peano's Axioms, do Foundations of mathematics or
Analytical philosophy.  From personal experience, it's much more
satisfying than arguing with other humans (who aren't exact
creatures).

 I appreciate your criticism, but that doesn't mean I must agree with
 it. And if I do agree, that doesn't mean I must act upon it.

Why not?  Am I being unreasonable in asking you to justify your
changes, so I can understand what you've done with one quick reading?
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/9] remote-bzr: trivial cleanups

2013-04-26 Thread Felipe Contreras
On Fri, Apr 26, 2013 at 3:03 PM, Ramkumar Ramachandra
artag...@gmail.com wrote:
 Felipe Contreras wrote:
 A fine way to start is to not rattle away in trivial inconsequential patches.

 I have something from Linus (TM) this time :)

 https://lkml.org/lkml/2004/12/20/255

I happen to agree with that, specially in the context of the Linux
kernel, but I don't see how that applies here. Linus is talking about
trivial patches from an entry-level developer, who has much to learn,
and this is one the best ways to do that.

But in particular, he is talking about the fact that prominent kernel
developers don't spend too much time on these trivial patches from
these entry-level developers, and that can be frustrating for these
entry-level developers, which can be problematic.

Nothing at all related to what we are facing here.

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


Re: git grep parallelism question

2013-04-26 Thread Linus Torvalds
On Fri, Apr 26, 2013 at 12:19 PM, Junio C Hamano gits...@pobox.com wrote:

 OK, you have to recompile at least once for experiment, so perhaps
 building the test binary with this patch may help.

So here's my experiment on my machine with this patch and the kernel
tree. First I did the warm-cache case:

  for i in 1 4 8 16 32 64
  do
echo $i:
for j in 1 2 3 4
do
  t=$(sh -c time git grep --threads=$i hjahsja 21 | grep real)
  echo $i $t
done
  done

and the numbers are pretty stable, here's just he summary (best of
four tries for each case):

   1 real 0m0.598s
   4 real 0m0.253s
   8 real 0m0.235s
  16 real 0m0.269s
  32 real 0m0.412s
  64 real 0m0.420s

so for this machine, 8 threads (our old number) is actually optimal
even if it has just four cores (actually, two cores with HT). I
suspect it's just because the load is slightly unbalanced, so a few
extra threads helps. Looks like anything in the 4-16 thread range is
ok, though. But 32 threads is clearly too much.

Then I did the exact same thing, but with the echo 3 
/proc/sys/vm/drop_caches just before the timing of the git grep.
Again, summarizing (best-of-four number, the variation wasn't that
big):

   1 real 0m17.866s
   4 real 0m6.367s
   8 real 0m4.855s
  16 real 0m4.307s
  32 real 0m4.153s
  64 real 0m4.128s

here, the numbers continue to improve up to 64 threads, although the
difference between 32 and 64 is starting to be in the noise. I suspect
it's a combination of better IO overlap (although not all SSD's will
even improve all that much from overlapping IO past a certain point)
and probably a more noticeable imbalance between threads.

Anyway, for *my* machine and for *this* particular load, I'd say that
we're already pretty close to optimal. I did some trials just to see,
but the best hot-cache numbers were fairly reliably for 7 or 8
threads.

Looking at the numbers, I can't really convince myself that it would
be worth it to do (say) 12 threads on this machine. Yes, the
cold-cache case improves from the 8-thread case (best-of-four for 12
threads: 0m4.467s), but the hot-cache case has gotten sufficiently
worse (0m0.251s) that I'm not sure..

Of course, in *absolute* numbers the cold-cache case is so much slower
that a half-second improvement from going to 16 threads might be
considered worth it, because while the the hot-cache case gets worse,
we may just not care because it's fast enough that it's not
noticeable.

Anyway, I think your patch is good if for no other reason that it
allows this kind of testing, but at least for my machine, clearly the
current default of eight threads is actually good enough. Maybe
somebody with a very different machine might want to run the above
script and see if how sensitive other machines are to this parameter..

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


Re: [PATCH 0/2] git add -A/--no-all finishing touches

2013-04-26 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes:

 Jonathan Nieder jrnie...@gmail.com writes:

 Maybe the warning should happen after add_file_to_index() has run,
 letting git compare the old and new index entries for that path?

 Yeah, new and deleted cases we do not have to worry about, so a
 no-op add_file_to_index() is the only case we have to be careful.
 There is a if verbose, say 'add %s' logic in the funciton, so it
 should be possible to enhance the API without affecting existing
 callers to extract that necessary information out of it.

I've thought about this a bit more.

One possible solution would go like this:

 - Extend add_file_to_index() (the logic is add_to_index() in
   read-cache.c) so that it can return an extra boolean I would add
   it, but that would be a no-op---the index already has that
   object to the caller.

 - In update_callback(), when we are comparing _all_ paths due to
   implicit-dot logic, check if the path is outside the current
   directory, instead of unconditionally calling warn_pathless_add():

   * If fix_unmerged_status() tells us that we would go to the
 remove_file_from_index() codepath, instead of calling it, call
 warn_pathless_add() instead.

   * If we are going to call add_file_to_index(), call it with
 ADD_CACHE_PRETEND on using the extended interface to see if it
 is adding already up-to-date contents. If not, call
 warn_pathless_add().

But I think it is a much better solution to just refresh the index
like the attached patch when implicit_dot is active and we are not
at the top level directory.  The paths that are stat-dirty but have
the up-to-date contents need to be hashed at least once _anyway_ to
see if the current contents match with what is in the index.  If we
use the approach outlined above, the rehashing will be done in the
extended add_file_to_index(). If we simply refresh the entire cache,
the same check will be done there.  The only performance penalty
would be that we may end up running lstat() twice.

Incidentally, I noticed that we set implicit_dot=1 even when we are
already at the top-level directory.  I suspect the code may become
somewhat simpler if we set it only when (prefix != NULL), but it
probably would not matter.


 builtin/add.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/builtin/add.c b/builtin/add.c
index daf02c6..ec2359c 100644
--- a/builtin/add.c
+++ b/builtin/add.c
@@ -495,6 +495,8 @@ int cmd_add(int argc, const char **argv, const char *prefix)
refresh(verbose, pathspec);
goto finish;
}
+   if (implicit_dot  !prefix)
+   refresh_cache(REFRESH_QUIET);
 
if (pathspec) {
int i;


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


Re: [PATCH 1/9] remote-bzr: trivial cleanups

2013-04-26 Thread Felipe Contreras
On Fri, Apr 26, 2013 at 3:28 PM, Ramkumar Ramachandra
artag...@gmail.com wrote:

 Reason is not a tool for appreciating art, reason is a tool for
 discovering truth, and if when arguing you are not interested in what
 is actually true, I'm not interested in arguing with you.

 There is no great truth to be discovered by arguing about the length
 of commit messages, Felipe.  There are some guidelines or axioms
 upon which we build reason.

And based on what do you build these guidelines and axioms if not
truth? Do you ask a computer to throw a number randomly from 0 to
infinite and that shall be the new axiom for what the perfect number
of words a commit message should have?

No, you determine that based on experience, and convenience. You find
a number that convenient to write, not hundreds of pages, and a number
that would help the reader if the patch in case a bug in the changes
is found on a later time, and that would help reviewers of code find
issues, and understand it. But most importantly, the number depends on
the complexity of the code changes. Note that I'm not saying on size,
because even one-liners can be extremely complex.

It's not arbitrary.

 If you want to argue till everything
 breaks down to Peano's Axioms, do Foundations of mathematics or
 Analytical philosophy.  From personal experience, it's much more
 satisfying than arguing with other humans (who aren't exact
 creatures).

I do not want to argue the fundamentals of logic and reason, but
unfortunately most people don't have a strong grasp on them.

So let me simply; truth matters, and how we find truth mattes. Which
is why the degree of certainty we have on certain facts matters; you
shouldn't act the same about a claim you are 10% sure it's true, than
with a claim you are 90% sure.

If you are 100% sure my commit messages are too short, then there's no
point in arguing with you. Nor if you think it doesn't matter if it's
90%, or 50%, or even 0%. Because it's an opinion, and an opinion
doesn't need any facts, or certainty, it just needs a person to hold
it, whatever unreasonable or unlikely it is.

 I appreciate your criticism, but that doesn't mean I must agree with
 it. And if I do agree, that doesn't mean I must act upon it.

 Why not?  Am I being unreasonable in asking you to justify your
 changes, so I can understand what you've done with one quick reading?

I did justify everything, I just didn't act the way you wanted. I
didn't immediately resend the series with a full description of the
changes, because the changes, as I described before, are trivial. I
simply dropped the change you had a problem with, and moved on. It's
perfectly reasonable.

Cheers.

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


Re: [PATCH 1/9] remote-bzr: trivial cleanups

2013-04-26 Thread Felipe Contreras
On Fri, Apr 26, 2013 at 3:17 PM, Ramkumar Ramachandra
artag...@gmail.com wrote:
 Felipe Contreras wrote:
 The importance of users changes all the time. The 15 year old kid in
 Sao Paulo might not be important today, but he might be the single
 most important contributor ten years from now. Hell, he might even
 replace Junio as the maintainer.

 Yes, they do.  Did I say that they don't change?

But you implied we shouldn't care about Thiago (our hypothetical
future overlord), because he is among the users we should't care for
(right now).

 Should we willingly and knowingly neglect some git user-base? No, why
 would you want them to fork? In a way, git's UI has been so bad, that
 some kind-of-forks have happened, that tells us something; the UI
 needs some love, fortunately none of those forks worked, which tells
 us something too; it's not too atrocious.

 No, we should never neglect.  I believe in including everyone.  In
 fact I take it to an extreme: on many instances, I have pointed out
 what I want specifically, and asked for a configuration option if it's
 not necessarily a sane default.  Git is a toolkit, and should be
 loaded with features that even a few users want.

 That's not to say we shouldn't fix the UI, we should, in a way that
 everyone's happy, which is hard, but we will do it, eventually.

 On this, I think the way forward is complete-implicit'ness via
 configuration variables.  I recently wrote remote.pushdefault to
 simply 'git push', and proposed 'git push +ref1 ref2 ref3' to
 automatically push to the correct pushdefaults (but that proposal was
 rejected).

Indeed, I learned about that, and I tried to use it, but I think
there's a lot that is missing, and I don't know myself what would be
ideal. I'm starting to think that a branch should have two upstreams;
one that is used for rebasing, and another that is used for pushing.
But I'm not sure.

Eventually, I would like to do 'git push' and I would push different
branches to different repositories in different destination branches
in a way that requires multiple commands right now 'git push github
fc/remote-old/hg:fc/remote/hg', 'git push --prune backup
refs/heads/*:refs/heads/* refs/tags/*:refs/tags/*'. And to figure
things out I'm also helping; I added the --prune option to push, and I
added color to visualize upstream branches in 'git branch'.

But I don't think any of those are as important as having a proper
'git stage' command, and getting rid of --cached and --index, which
will be a huge effort, but would pay even bigger dividends. Step by
step.

Cheers.

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


Re: Itches with the current rev spec

2013-04-26 Thread Junio C Hamano
Felipe Contreras felipe.contre...@gmail.com writes:

 I don't know what 'git rebase master' does, but I would expect 'git
 rebase --onto=master' to do the same thing. Then, if 'git rebase
 --onto=next master..topic' makes sense, so should 'git rebase next
 master..topic'.

 Moreover, it often annoys me that 'git rebase master' does exactly
 what I want, but 'git rebase --onto=master previous' doesn't find the
 commits that are already into 'master'. One would expect the more
 defined version to work better, but it doesn't =/

That all stems from the fact that rebase (not -i variant) predates
these nice A..B, A...B, and $(merge-base A B) concepts have been
ingrained in the user's mindset as the primary UI language of Git.

 - The UI language of rebase origin comes more from the workflow
   school.  I have built on 'origin'; I want to catch up with its
   current state.  To support that workflow, 'origin' is the only
   thing you need to say, and rebase origin matches that nicely.
   If you then add By the way, that statement expresses my wish for
   the 'topic' branch, not my current one, you get rebase origin
   topic.

 - If the UI language for rebase were designed following the
   composition using common elements like ranges and revisions
   school, it would have started from rebase --onto=X A..B.

Back then, we did not know which principle to design the UI language
would prevail, but we needed something that works to support the end
users.  So git log spoke A..B but git rebase took origin.

Over time, the composition school prevailed and these days we see
many commands accept and act on revision ranges or discrete
revisions.

The same thing happened to format-patch, whose original syntax was

format-patch origin

which is still accepted, but we have adjusted it to understand the
more prevalent

format-patch origin..

because it is far more understandable if you know other commands
that are based on composition UI language.  That adjustment
started making sense after it has become clear that composition
school of UI language is the way forward.

It's just that rebase is waiting for the same kind of adjustment.

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


[PATCH v3 0/9] remote-helpers: fixes and cleanups

2013-04-26 Thread Felipe Contreras
Updated the commit messages, so we say Bazaar instead of Mercurial, and stuff.

Here's a bunch of cleanups mostly to synchronize remote-bzr and remote-hg.

Felipe Contreras (9):
  remote-helpers: trivial cleanups
  remote-hg: remove extra check
  remote-bzr: fix bad state issue
  remote-bzr: add support to push URLs
  remote-hg: use hashlib instead of hg sha1 util
  remote-bzr: store converted URL
  remote-bzr: tell bazaar to be quiet
  remote-bzr: strip extra newline
  remote-bzr: use proper push method

 contrib/remote-helpers/git-remote-bzr | 55 ---
 contrib/remote-helpers/git-remote-hg  | 10 ++-
 2 files changed, 48 insertions(+), 17 deletions(-)

-- 
1.8.2.1.1031.g2ee5873

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


[PATCH v3 1/9] remote-helpers: trivial cleanups

2013-04-26 Thread Felipe Contreras
No functional changes. Typos, unused variables, redundant operations,
and white-spaces.

Signed-off-by: Felipe Contreras felipe.contre...@gmail.com
---
 contrib/remote-helpers/git-remote-bzr | 7 ---
 contrib/remote-helpers/git-remote-hg  | 2 +-
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/contrib/remote-helpers/git-remote-bzr 
b/contrib/remote-helpers/git-remote-bzr
index cc6609b..87c54bf 100755
--- a/contrib/remote-helpers/git-remote-bzr
+++ b/contrib/remote-helpers/git-remote-bzr
@@ -94,7 +94,7 @@ class Marks:
 return self.last_mark
 
 def is_marked(self, rev):
-return str(rev) in self.marks
+return rev in self.marks
 
 def new_mark(self, rev, mark):
 self.marks[rev] = mark
@@ -224,7 +224,7 @@ def export_files(tree, files):
 else:
 mode = '100644'
 
-# is the blog already exported?
+# is the blob already exported?
 if h in filenodes:
 mark = filenodes[h]
 final.append((mode, mark, path))
@@ -521,7 +521,7 @@ def c_style_unescape(string):
 return string
 
 def parse_commit(parser):
-global marks, blob_marks, bmarks, parsed_refs
+global marks, blob_marks, parsed_refs
 global mode
 
 parents = []
@@ -643,6 +643,7 @@ def do_export(parser):
 wt = repo.bzrdir.open_workingtree()
 wt.update()
 print ok %s % ref
+
 print
 
 def do_capabilities(parser):
diff --git a/contrib/remote-helpers/git-remote-hg 
b/contrib/remote-helpers/git-remote-hg
index fda4199..cfa96c1 100755
--- a/contrib/remote-helpers/git-remote-hg
+++ b/contrib/remote-helpers/git-remote-hg
@@ -12,7 +12,7 @@
 # For remote repositories a local clone is stored in
 # $GIT_DIR/hg/origin/clone/.hg/.
 
-from mercurial import hg, ui, bookmarks, context, util, encoding, node, error, 
extensions
+from mercurial import hg, ui, bookmarks, context, encoding, node, error, 
extensions
 
 import re
 import sys
-- 
1.8.2.1.1031.g2ee5873

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


[PATCH v3 2/9] remote-hg: remove extra check

2013-04-26 Thread Felipe Contreras
Not needed since we use xrange ourselves.

Signed-off-by: Felipe Contreras felipe.contre...@gmail.com
---
 contrib/remote-helpers/git-remote-hg | 4 
 1 file changed, 4 deletions(-)

diff --git a/contrib/remote-helpers/git-remote-hg 
b/contrib/remote-helpers/git-remote-hg
index cfa96c1..80b3606 100755
--- a/contrib/remote-helpers/git-remote-hg
+++ b/contrib/remote-helpers/git-remote-hg
@@ -373,10 +373,6 @@ def export_ref(repo, name, kind, head):
 ename = '%s/%s' % (kind, name)
 tip = marks.get_tip(ename)
 
-# mercurial takes too much time checking this
-if tip and tip == head.rev():
-# nothing to do
-return
 revs = xrange(tip, head.rev() + 1)
 count = 0
 
-- 
1.8.2.1.1031.g2ee5873

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


[PATCH v3 3/9] remote-bzr: fix bad state issue

2013-04-26 Thread Felipe Contreras
Carried from remote-hg.

The problem reportedly happened after doing a push that fails, the abort
causes the state of remote-hg to go bad, this happens because
remote-hg's marks are not stored, but 'git fast-export' marks are.

Ensure that the marks are _always_ stored.

Signed-off-by: Felipe Contreras felipe.contre...@gmail.com
---
 contrib/remote-helpers/git-remote-bzr | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/contrib/remote-helpers/git-remote-bzr 
b/contrib/remote-helpers/git-remote-bzr
index 87c54bf..7b6584e 100755
--- a/contrib/remote-helpers/git-remote-bzr
+++ b/contrib/remote-helpers/git-remote-bzr
@@ -32,6 +32,7 @@ import os
 import json
 import re
 import StringIO
+import atexit
 
 NAME_RE = re.compile('^([^]+)')
 AUTHOR_RE = re.compile('^([^]+?)? ?([^]*)$')
@@ -728,6 +729,7 @@ def main(args):
 blob_marks = {}
 parsed_refs = {}
 files_cache = {}
+marks = None
 
 gitdir = os.environ['GIT_DIR']
 dirname = os.path.join(gitdir, 'bzr', alias)
@@ -754,6 +756,10 @@ def main(args):
 die('unhandled command: %s' % line)
 sys.stdout.flush()
 
+def bye():
+if not marks:
+return
 marks.store()
 
+atexit.register(bye)
 sys.exit(main(sys.argv))
-- 
1.8.2.1.1031.g2ee5873

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


[PATCH v3 4/9] remote-bzr: add support to push URLs

2013-04-26 Thread Felipe Contreras
Just like in remote-hg.

Signed-off-by: Felipe Contreras felipe.contre...@gmail.com
---
 contrib/remote-helpers/git-remote-bzr | 16 +---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/contrib/remote-helpers/git-remote-bzr 
b/contrib/remote-helpers/git-remote-bzr
index 7b6584e..f1d6d5e 100755
--- a/contrib/remote-helpers/git-remote-bzr
+++ b/contrib/remote-helpers/git-remote-bzr
@@ -32,7 +32,7 @@ import os
 import json
 import re
 import StringIO
-import atexit
+import atexit, shutil, hashlib
 
 NAME_RE = re.compile('^([^]+)')
 AUTHOR_RE = re.compile('^([^]+?)? ?([^]*)$')
@@ -719,11 +719,11 @@ def main(args):
 global blob_marks
 global parsed_refs
 global files_cache
+global is_tmp
 
 alias = args[1]
 url = args[2]
 
-prefix = 'refs/bzr/%s' % alias
 tags = {}
 filenodes = {}
 blob_marks = {}
@@ -731,6 +731,13 @@ def main(args):
 files_cache = {}
 marks = None
 
+if alias[5:] == url:
+is_tmp = True
+alias = hashlib.sha1(alias).hexdigest()
+else:
+is_tmp = False
+
+prefix = 'refs/bzr/%s' % alias
 gitdir = os.environ['GIT_DIR']
 dirname = os.path.join(gitdir, 'bzr', alias)
 
@@ -759,7 +766,10 @@ def main(args):
 def bye():
 if not marks:
 return
-marks.store()
+if not is_tmp:
+marks.store()
+else:
+shutil.rmtree(dirname)
 
 atexit.register(bye)
 sys.exit(main(sys.argv))
-- 
1.8.2.1.1031.g2ee5873

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


[PATCH v3 5/9] remote-hg: use hashlib instead of hg sha1 util

2013-04-26 Thread Felipe Contreras
To be in sync with remote-bzr.

Signed-off-by: Felipe Contreras felipe.contre...@gmail.com
---
 contrib/remote-helpers/git-remote-hg | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/contrib/remote-helpers/git-remote-hg 
b/contrib/remote-helpers/git-remote-hg
index 80b3606..06920f2 100755
--- a/contrib/remote-helpers/git-remote-hg
+++ b/contrib/remote-helpers/git-remote-hg
@@ -22,7 +22,7 @@ import shutil
 import subprocess
 import urllib
 import atexit
-import urlparse
+import urlparse, hashlib
 
 #
 # If you want to switch to hg-git compatibility mode:
@@ -933,7 +933,7 @@ def main(args):
 
 if alias[4:] == url:
 is_tmp = True
-alias = util.sha1(alias).hexdigest()
+alias = hashlib.sha1(alias).hexdigest()
 else:
 is_tmp = False
 
-- 
1.8.2.1.1031.g2ee5873

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


[PATCH v3 7/9] remote-bzr: tell bazaar to be quiet

2013-04-26 Thread Felipe Contreras
Otherwise we get notification, progress bars, and what not.

Signed-off-by: Felipe Contreras felipe.contre...@gmail.com
---
 contrib/remote-helpers/git-remote-bzr | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/contrib/remote-helpers/git-remote-bzr 
b/contrib/remote-helpers/git-remote-bzr
index dda2932..8617e25 100755
--- a/contrib/remote-helpers/git-remote-bzr
+++ b/contrib/remote-helpers/git-remote-bzr
@@ -26,6 +26,7 @@ bzrlib.plugin.load_plugins()
 import bzrlib.generate_ids
 import bzrlib.transport
 import bzrlib.errors
+import bzrlib.ui
 
 import sys
 import os
@@ -755,6 +756,8 @@ def main(args):
 if not os.path.exists(dirname):
 os.makedirs(dirname)
 
+bzrlib.ui.ui_factory.be_quiet(True)
+
 repo = get_repo(url, alias)
 
 marks_path = os.path.join(dirname, 'marks-int')
-- 
1.8.2.1.1031.g2ee5873

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


[PATCH v3 6/9] remote-bzr: store converted URL

2013-04-26 Thread Felipe Contreras
Bazaar might convert the URL to something more appropriate, like an
absolute path. Lets store that instead of the original URL, which won't
work from a different working directory if it's relative.

Signed-off-by: Felipe Contreras felipe.contre...@gmail.com
---
 contrib/remote-helpers/git-remote-bzr | 13 -
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/contrib/remote-helpers/git-remote-bzr 
b/contrib/remote-helpers/git-remote-bzr
index f1d6d5e..dda2932 100755
--- a/contrib/remote-helpers/git-remote-bzr
+++ b/contrib/remote-helpers/git-remote-bzr
@@ -32,7 +32,7 @@ import os
 import json
 import re
 import StringIO
-import atexit, shutil, hashlib
+import atexit, shutil, hashlib, urlparse, subprocess
 
 NAME_RE = re.compile('^([^]+)')
 AUTHOR_RE = re.compile('^([^]+?)? ?([^]*)$')
@@ -713,6 +713,14 @@ def get_repo(url, alias):
 
 return branch
 
+def fix_path(alias, orig_url):
+url = urlparse.urlparse(orig_url, 'file')
+if url.scheme != 'file' or os.path.isabs(url.path):
+return
+abs_url = urlparse.urljoin(%s/ % os.getcwd(), orig_url)
+cmd = ['git', 'config', 'remote.%s.url' % alias, bzr::%s % abs_url]
+subprocess.call(cmd)
+
 def main(args):
 global marks, prefix, dirname
 global tags, filenodes
@@ -741,6 +749,9 @@ def main(args):
 gitdir = os.environ['GIT_DIR']
 dirname = os.path.join(gitdir, 'bzr', alias)
 
+if not is_tmp:
+fix_path(alias, url)
+
 if not os.path.exists(dirname):
 os.makedirs(dirname)
 
-- 
1.8.2.1.1031.g2ee5873

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


[PATCH v3 9/9] remote-bzr: use proper push method

2013-04-26 Thread Felipe Contreras
Not just randomly synchronize the revisions with no checks at all. This
is the way bazaar's UI does it.

Also, add a non-ff check.

Signed-off-by: Felipe Contreras felipe.contre...@gmail.com
---
 contrib/remote-helpers/git-remote-bzr | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/contrib/remote-helpers/git-remote-bzr 
b/contrib/remote-helpers/git-remote-bzr
index 9f56297..c19ed0e 100755
--- a/contrib/remote-helpers/git-remote-bzr
+++ b/contrib/remote-helpers/git-remote-bzr
@@ -639,12 +639,12 @@ def do_export(parser):
 for ref, revid in parsed_refs.iteritems():
 if ref == 'refs/heads/master':
 repo.generate_revision_history(revid, marks.get_tip('master'))
-revno, revid = repo.last_revision_info()
 if peer:
-if hasattr(peer, import_last_revision_info_and_tags):
-peer.import_last_revision_info_and_tags(repo, revno, revid)
-else:
-peer.import_last_revision_info(repo.repository, revno, 
revid)
+try:
+repo.push(peer, stop_revision=revid)
+except bzrlib.errors.DivergedBranches:
+print error %s non-fast forward % ref
+continue
 else:
 wt = repo.bzrdir.open_workingtree()
 wt.update()
-- 
1.8.2.1.1031.g2ee5873

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


[PATCH v3 8/9] remote-bzr: strip extra newline

2013-04-26 Thread Felipe Contreras
It's added by fast-export, the user didn't type it.

Signed-off-by: Felipe Contreras felipe.contre...@gmail.com
---
 contrib/remote-helpers/git-remote-bzr | 4 
 1 file changed, 4 insertions(+)

diff --git a/contrib/remote-helpers/git-remote-bzr 
b/contrib/remote-helpers/git-remote-bzr
index 8617e25..9f56297 100755
--- a/contrib/remote-helpers/git-remote-bzr
+++ b/contrib/remote-helpers/git-remote-bzr
@@ -549,6 +549,10 @@ def parse_commit(parser):
 parents.append(parser.get_mark())
 parser.next()
 
+# fast-export adds an extra newline
+if data[-1] == '\n':
+data = data[:-1]
+
 files = {}
 
 for line in parser:
-- 
1.8.2.1.1031.g2ee5873

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


Re: [PATCH 00/20] remote-bzr: massive changes

2013-04-26 Thread Felipe Contreras
On Fri, Apr 26, 2013 at 11:51 AM, Junio C Hamano gits...@pobox.com wrote:
 Felipe Contreras felipe.contre...@gmail.com writes:

 On Thu, Apr 25, 2013 at 8:07 PM, Felipe Contreras
 felipe.contre...@gmail.com wrote:

 I forgot to mention; these apply on top of the previous 'fixes and cleanups'.

 Then I should probably wait for v2 6/9 of that series is rerolled.

Done.

 There could be ones that you may want to reroll other than 6/9 in
 that, I didn't have time to look at the backlog. I'll be whipping
 the -rc0 into shape today and it is unlikely I'll have time to look
 at this or the previous one today.

I don't see any need to reroll more. All the concerns of v1 and v2
have been addressed in one way or the other.

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


Re: [PATCH 0/2] git add -A/--no-all finishing touches

2013-04-26 Thread Jonathan Nieder
Junio C Hamano wrote:

 --- a/builtin/add.c
 +++ b/builtin/add.c
 @@ -495,6 +495,8 @@ int cmd_add(int argc, const char **argv, const char 
 *prefix)
   refresh(verbose, pathspec);
   goto finish;
   }
 + if (implicit_dot  !prefix)
 + refresh_cache(REFRESH_QUIET);

I think you mean if (implicit_dot  prefix). :)

This strategy is much less invasive than the alternatives discussed,
so for what it's worth, with that correction,

Acked-by: Jonathan Nieder jrnie...@gmail.com

I'll try to get time to work on those promised tests this weekend.
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] git-remote-testgit: avoid process substitution

2013-04-26 Thread Felipe Contreras
On Thu, Apr 25, 2013 at 12:56 AM, Johannes Sixt j.s...@viscovery.net wrote:
 From: Johannes Sixt j...@kdbg.org

 Bash on Windows does not implement process substitution.

Nevermind, reporting all the refs creates a lot of irrelevant output,
this version is fine.

Acknowledged-by: Felipe Contreras felipe.contre...@gmail.com

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


Re: [PATCH v3 0/9] remote-helpers: fixes and cleanups

2013-04-26 Thread Junio C Hamano
Felipe Contreras felipe.contre...@gmail.com writes:

 Updated the commit messages, so we say Bazaar instead of Mercurial, and stuff.

 Here's a bunch of cleanups mostly to synchronize remote-bzr and remote-hg.

Thanks.  Will queue on 'pu' without looking.
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/9] remote-bzr: trivial cleanups

2013-04-26 Thread Felipe Contreras
On Fri, Apr 26, 2013 at 5:10 PM, Junio C Hamano gits...@pobox.com wrote:
 Felipe Contreras felipe.contre...@gmail.com writes:

 Good, so I'll keep sending the patches, because our users benefit from
 the review.

 Just for the record, a patch sent to the list which nobody bothered
 to read does not really count as reviewed.

No, but I did my part, which is sending them for review.

 You can either

  (1) pace yourself when people are otherwise busy; or

I would, if there was a reason to.

  (2) send them anyway but not claim this was sent to the list two
  weeks ago, nobody complained, so it must be perfect when it is
  not picked up after a few weeks.

When have I ever done that?

 Often (1) is a better strategy, as people who wanted to review but
 otherwise were busy tend to declare patch bankruptcy after their
 busy period ends.

Not for remote-{bzr,hg}. I've yet to see anybody claim they would
review the patches thoroughly, if only they were given time. I've yet
to see anybody claim they would review the patches thoroughly under
any circumstance at all. And by that I mean the patches that really
would benefit from reviewing.

 Also, a reason that a patch goes uncommented is when it is difficult
 to judge.  A patch with code change without sufficient explanation
 behind the motivation to justify the change, a reviewer finds it
 much harder to convince himself that the patch is a good change, and
 it also is much harder to find which part of the change is wrong and
 offer improvements, compared to a patch with the same change that is
 justified properly.

Yes, but is that the case *HERE*? And no, single line changes that are
trivial and obvious don't count. Show me an important patch that
surely would benefit from reviewing that doesn't have sufficient
explanation. Show me an important patch that anybody is not convinced
is a good patch. In the remote-{hg,bzr} context.

If there isn't any, I don't see why remote-{bzr,hg} should slow down.

For this patch, I don't care one iota.

Cheers.

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


Re: [PATCH v3 0/9] remote-helpers: fixes and cleanups

2013-04-26 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes:

 Felipe Contreras felipe.contre...@gmail.com writes:

 Updated the commit messages, so we say Bazaar instead of Mercurial, and 
 stuff.

 Here's a bunch of cleanups mostly to synchronize remote-bzr and remote-hg.

 Thanks.  Will queue on 'pu' without looking.

Actually, I was going to merge fc/remote-hg and fc/remote-bzr down
to master anyway, so I'll just apply them directly on 'master'.

By the way, I personally do not think the quality of the changes to
remote-bzr matters all that much at this point in its history.  It's
not like millions of people use it heavily from the v1.8.2 release.
A huge patch series from its original author and nobody else, either
reviewed or unreviwed, would not hurt them more than the one in the
v1.8.2 version anyway. And it is also not like bzr-to-git population
will grow significantly in the future to require us to pile a lot of
features on remote-bzr that makes the maintenance burden of it
becomes an issue.

Am I underestimating the pain of potentially breaking existing
remote-bzr userbase?
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] git-remote-testgit: avoid process substitution

2013-04-26 Thread Junio C Hamano
Felipe Contreras felipe.contre...@gmail.com writes:

 On Thu, Apr 25, 2013 at 12:56 AM, Johannes Sixt j.s...@viscovery.net wrote:
 From: Johannes Sixt j...@kdbg.org

 Bash on Windows does not implement process substitution.

 Nevermind, reporting all the refs creates a lot of irrelevant output,
 this version is fine.

When $before has this in it:

refs/heads/refs/heads/master 664059...126eaa7

and your read ref a got this in the input:

refs/heads/master 664059...126eaa7

would the pattern matching by case work corretly?


 Acknowledged-by: Felipe Contreras felipe.contre...@gmail.com
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v3 0/9] remote-helpers: fixes and cleanups

2013-04-26 Thread Felipe Contreras
On Fri, Apr 26, 2013 at 5:23 PM, Junio C Hamano gits...@pobox.com wrote:
 Junio C Hamano gits...@pobox.com writes:

 Felipe Contreras felipe.contre...@gmail.com writes:

 Updated the commit messages, so we say Bazaar instead of Mercurial, and 
 stuff.

 Here's a bunch of cleanups mostly to synchronize remote-bzr and remote-hg.

 Thanks.  Will queue on 'pu' without looking.

 Actually, I was going to merge fc/remote-hg and fc/remote-bzr down
 to master anyway, so I'll just apply them directly on 'master'.

 By the way, I personally do not think the quality of the changes to
 remote-bzr matters all that much at this point in its history.  It's
 not like millions of people use it heavily from the v1.8.2 release.
 A huge patch series from its original author and nobody else, either
 reviewed or unreviwed, would not hurt them more than the one in the
 v1.8.2 version anyway. And it is also not like bzr-to-git population
 will grow significantly in the future to require us to pile a lot of
 features on remote-bzr that makes the maintenance burden of it
 becomes an issue.

 Am I underestimating the pain of potentially breaking existing
 remote-bzr userbase?

No, I think it's reasonable. 1.8.2 was better because 1.8.1 didn't ave
any support whatsoever, and 1.8.3 will be better, because 1.8.2 was
barely usable for any real-world project. Will there be any
regressions? I doubt it, and if there are, it's unlikely that they
would be found in the review process, in 'pu', or in 'next', specially
since very few people actually use remote-bzr, in part because it
wasn't very useful, and in part because few people use bzr in the
first place.

Of course, I would prefer if people reviewed the patches for the
massive changes, the _important_ patches, and I would gladly explain
the reasoning and update the commit messages if needed. But nobody is
volunteering to review that. The only exception was for a few
irrelevant patches that could be easily dropped.

remote-hg is a different story, and so I'm being more careful with the
changes there, and I actually think the current patches are more than
enough for 1.8.3, they should be tested in an actual release, and the
rest would have to wait. For the rest, I'm still juggling in which
order I should send them, and I want to send first the ones that
should maximize the benefits for the users, with minimum possibility
of breakage, but even then I wouldn't be confident with those landing
in 1.8.3, so 1.8.4 it is.

Cheers.

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


Re: [PATCH] git-remote-testgit: avoid process substitution

2013-04-26 Thread Felipe Contreras
On Fri, Apr 26, 2013 at 5:25 PM, Junio C Hamano gits...@pobox.com wrote:
 Felipe Contreras felipe.contre...@gmail.com writes:

 On Thu, Apr 25, 2013 at 12:56 AM, Johannes Sixt j.s...@viscovery.net wrote:
 From: Johannes Sixt j...@kdbg.org

 Bash on Windows does not implement process substitution.

 Nevermind, reporting all the refs creates a lot of irrelevant output,
 this version is fine.

 When $before has this in it:

 refs/heads/refs/heads/master 664059...126eaa7

 and your read ref a got this in the input:

 refs/heads/master 664059...126eaa7

 would the pattern matching by case work corretly?

No, it wouldn't, but I don't think there's any way to do \\ or \b in globs.

Alternatively, we could use the same $before and $after, and simply
store the output somewhere; $GIT_DIR/testgit-before, for example. This
should decrease the amount of changes needed, but I don't know if
anybody would have problems with the use of 'join'.

Cheers.

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


Re: [PATCH v4 01/11] Add new git-related helper to contrib

2013-04-26 Thread Felipe Contreras
Hi,

On Thu, Apr 25, 2013 at 2:59 PM, Felipe Contreras
felipe.contre...@gmail.com wrote:
 This script find people that might be interested in a patch, by going
 back through the history for each single hunk modified, and finding
 people that reviewed, acknowledge, signed, or authored the code the
 patch is modifying.

 It does this by running 'git blame' incrementally on each hunk, and then
 parsing the commit message. After gathering all the relevant people, it
 groups them to show what exactly was their role when the participated in
 the development of the relevant commit, and on how many relevant commits
 they participated. They are only displayed if they pass a minimum
 threshold of participation.

Is this patch still not understandable? If so, I would gladly strip
away functionality, like the ability to show the roles. But for the
functionality it provides, I don't see how it could be any simpler.

Sure, code comments might help, but first I would like to make the
code as self-documenting as possible, so I would give a try at a
simplified version first, and then perhaps adding a Person object.

Better for me if the code was good enough as it is though.

Cheers.

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


Re: [PATCH v4 01/11] Add new git-related helper to contrib

2013-04-26 Thread Junio C Hamano
Felipe Contreras felipe.contre...@gmail.com writes:

 On Thu, Apr 25, 2013 at 2:59 PM, Felipe Contreras
 felipe.contre...@gmail.com wrote:
 This script find people that might be interested in a patch, by going
 back through the history for each single hunk modified, and finding
 people that reviewed, acknowledge, signed, or authored the code the
 patch is modifying.

 It does this by running 'git blame' incrementally on each hunk, and then
 parsing the commit message. After gathering all the relevant people, it
 groups them to show what exactly was their role when the participated in
 the development of the relevant commit, and on how many relevant commits
 they participated. They are only displayed if they pass a minimum
 threshold of participation.

 Is this patch still not understandable?

Among the people who review patches here and give usable feedback,
earlier this week Peff said he is away from his mailbox for the rest
of the week, and I am not reviewing any new topics that are not in
'next', being busy in preparation for -rc0, so I wouldn't be able to
answer that question.

I do not know about the others, but it is understandable from time
to time there is a period a series is not being reviewed by anybody.


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


Re: [PATCH v4 01/11] Add new git-related helper to contrib

2013-04-26 Thread Felipe Contreras
On Fri, Apr 26, 2013 at 6:01 PM, Junio C Hamano gits...@pobox.com wrote:
 Felipe Contreras felipe.contre...@gmail.com writes:

 On Thu, Apr 25, 2013 at 2:59 PM, Felipe Contreras
 felipe.contre...@gmail.com wrote:
 This script find people that might be interested in a patch, by going
 back through the history for each single hunk modified, and finding
 people that reviewed, acknowledge, signed, or authored the code the
 patch is modifying.

 It does this by running 'git blame' incrementally on each hunk, and then
 parsing the commit message. After gathering all the relevant people, it
 groups them to show what exactly was their role when the participated in
 the development of the relevant commit, and on how many relevant commits
 they participated. They are only displayed if they pass a minimum
 threshold of participation.

 Is this patch still not understandable?

 Among the people who review patches here and give usable feedback,
 earlier this week Peff said he is away from his mailbox for the rest
 of the week, and I am not reviewing any new topics that are not in
 'next', being busy in preparation for -rc0, so I wouldn't be able to
 answer that question.

 I do not know about the others, but it is understandable from time
 to time there is a period a series is not being reviewed by anybody.

That's fine, I was mostly asking Ramkumar who earlier argued earlier
versions of this patch were not understandable.

Cheers.

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


Re* [PATCH] git-remote-testgit: avoid process substitution

2013-04-26 Thread Junio C Hamano
Felipe Contreras felipe.contre...@gmail.com writes:

 No, it wouldn't, but I don't think there's any way to do \\ or \b in globs.

This should do in the meantime, but it further needs:

 - J6t's sign off for the follow-up part to remove remaining
   bash-isms to complete this patch (the last part of the patch is
   from 5178c583.6000...@viscovery.net and we can take half the
   log message from there);

 - Rename it to git-remote-testgit.sh and tell Makefile to replace
   the shebang line with SHELL_PATH like other scripts;

 - Remove the we need to have bash because we will run remote-testgit
   logic from t5801



diff --git a/git-remote-testgit b/git-remote-testgit
index b395c8d..ffac950 100755
--- a/git-remote-testgit
+++ b/git-remote-testgit
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/bin/sh
 # Copyright (c) 2012 Felipe Contreras
 
 alias=$1
@@ -23,7 +23,6 @@ then
testgitmarks=$dir/testgit.marks
test -e $gitmarks || $gitmarks
test -e $testgitmarks || $testgitmarks
-   testgitmarks_args=( --{import,export}-marks=$testgitmarks )
 fi
 
 while read line
@@ -62,22 +61,31 @@ do
echo feature export-marks=$gitmarks
fi
echo feature done
-   git fast-export ${testgitmarks_args[@]} $refs |
+   git fast-export \
+   ${testgitmarks:+--import-marks=$testgitmarks} \
+   ${testgitmarks:+--export-marks=$testgitmarks} \
+   $refs |
sed -e s#refs/heads/#${prefix}/heads/#g
echo done
;;
export)
before=$(git for-each-ref --format='%(refname) %(objectname)')
 
-   git fast-import ${testgitmarks_args[@]} --quiet
-
-   after=$(git for-each-ref --format='%(refname) %(objectname)')
+   git fast-export \
+   ${testgitmarks:+--import-marks=$testgitmarks} \
+   ${testgitmarks:+--export-marks=$testgitmarks} \
+   --quiet
 
# figure out which refs were updated
-   join -e 0 -o '0 1.2 2.2' -a 2 (echo $before) (echo 
$after) |
-   while read ref a b
+   LF=$'\n'
+   git for-each-ref --format='%(refname) %(objectname)' |
+   while read ref a
do
-   test $a == $b  continue
+   case $LF$before$LF in
+   *$LF$ref $a$LF*)
+   continue
+   ;;
+   esac
echo ok $ref
done
 
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 12/20] remote-bzr: split marks file

2013-04-26 Thread Felipe Contreras
On Thu, Apr 25, 2013 at 8:08 PM, Felipe Contreras
felipe.contre...@gmail.com wrote:
 This way all the remotes can share the same git objects, and the same
 marks. The information we want to store per remote is very small.

 The code transparently converts from one organization of marks, to the
 other. It's rather smooth and there shouldn't be any issues.

Please drop this patch. While testing essentially the same
functionality in remote-hg I noticed that it doesn't work when dealing
with more than one remote. It's not clear if the marks can be shared
at all, and if possible, it would be very tricky.

Better drop it for now. I've tested that dropping this patch doesn't
cause an conflicts for the rest of the series.

And in case anybody is thinking that remote-bzr is really a too fast
moving target; even if this managed to land in 'master', it's likely
that people were not able to push at all, and in fact, many were not
even able to clone in 1.8.2. So, hardly could be considered a
regression. Nevertheless, I caught it in time.

Cheers.

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


Re: [PATCH 12/20] remote-bzr: split marks file

2013-04-26 Thread Junio C Hamano
Felipe Contreras felipe.contre...@gmail.com writes:

 And in case anybody is thinking that remote-bzr is really a too fast
 moving target; even if this managed to land in 'master', it's likely
 that people were not able to push at all, and in fact, many were not
 even able to clone in 1.8.2. So, hardly could be considered a
 regression. Nevertheless, I caught it in time.

You didn't.  I am already way too deep into today's 1.8.3-rc0
integration cycle and I won't waste a couple of hours work just to
revert this.

But from your description it sounds like with or without the patch
the helper is equally broken and it does not make that much of a
difference.
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ANNOUNCE] Git v1.8.2.2

2013-04-26 Thread Junio C Hamano
The latest maintenance release Git v1.8.2.2 is now available at
the usual places.

The release tarballs are found at:

http://code.google.com/p/git-core/downloads/list

and their SHA-1 checksums are:

47a86a0a4f92998f21ada77be146676ecfd2e4af  git-1.8.2.2.tar.gz
8f334c0f5433ad7513680ffd0bf0f29dd5821450  git-htmldocs-1.8.2.2.tar.gz
ffde312471c4b391a47426948be25629582a77ab  git-manpages-1.8.2.2.tar.gz

Also the following public repositories all have a copy of the v1.8.2.2
tag and the maint branch that the tag points at:

  url = https://kernel.googlesource.com/pub/scm/git/git
  url = git://repo.or.cz/alt-git.git
  url = https://code.google.com/p/git-core/
  url = git://git.sourceforge.jp/gitroot/git-core/git.git
  url = git://git-core.git.sourceforge.net/gitroot/git-core/git-core
  url = https://github.com/gitster/git

Git v1.8.2.2 Release Notes
==

Fixes since v1.8.2.1


 * Zsh completion forgot that '%' character used to signal untracked
   files needs to be escaped with another '%'.

 * A commit object whose author or committer ident are malformed
   crashed some code that trusted that a name, an email and an
   timestamp can always be found in it.

 * The new core.commentchar configuration was not applied to a few
   places.

 * git pull --rebase did not pass -v/-q options to underlying
   git rebase.

 * When receive-pack detects error in the pack header it received in
   order to decide which of unpack-objects or index-pack to run, it
   returned without closing the error stream, which led to a hang
   sideband thread.

 * git diff --diff-algorithm=algo was understood by the command line
   parser, but git diff --diff-algorithm algo was not.

 * git log -S/-G started paying attention to textconv filter, but
   there was no way to disable this.  Make it honor --no-textconv
   option.

 * git merge $(git rev-parse v1.8.2) behaved quite differently from
   git merge v1.8.2, as if v1.8.2 were written as v1.8.2^0 and did
   not pay much attention to the annotated tag payload.  Make the code
   notice the type of the tag object, in addition to the dwim_ref()
   based classification the current code uses (i.e. the name appears
   in refs/tags/) to decide when to special case merging of tags.

 * git cherry-pick and git revert can take more than one commit
   on the command line these days, but it was not mentioned on the usage
   text.

 * Perl scripts like git-svn closed (not redirecting to /dev/null)
   the standard error stream, which is not a very smart thing to do.
   Later open may return file descriptor #2 for unrelated purpose, and
   error reporting code may write into them.

 * git apply --whitespace=fix was not prepared to see a line getting
   longer after fixing whitespaces (e.g. tab-in-indent aka Python).

 * git diff/log --cc did not work well with options that ignore
   whitespace changes.

 * Documentation on setting up a http server that requires
   authentication only on the push but not fetch has been clarified.

 * A few bugfixes to git rerere working on corner case merge
   conflicts have been applied.

 * git bundle did not like a bundle created using a commit without
   any message as its one of the prerequistes.



Changes since v1.8.2.1 are as follows:

Adam Spiers (1):
  t: make PIPE a standard test prerequisite

Antoine Pelisse (2):
  fix clang -Wtautological-compare with unsigned enum
  Allow combined diff to ignore white-spaces

Benoit Bourbie (1):
  Typo fix: replacing it's - its

Carlos Martín Nieto (1):
  Documentation/git-commit: reword the --amend explanation

David Aguilar (1):
  help.c: add a compatibility comment to cmd_version()

Felipe Contreras (2):
  remote-hg: fix commit messages
  prompt: fix untracked files for zsh

Jakub Narębski (1):
  gitweb/INSTALL: Simplify description of GITWEB_CONFIG_SYSTEM

Jeff King (13):
  submodule: clarify logic in show_submodule_summary
  filter-branch: return to original dir after filtering
  diffcore-pickaxe: remove fill_one()
  diffcore-pickaxe: unify code for log -S/-G
  show-branch: use strbuf instead of static buffer
  doc/http-backend: clarify half-auth repo configuration
  doc/http-backend: give some lighttpd config examples
  doc/http-backend: match query-string in apache half-auth example
  t/test-lib.sh: drop $test variable
  usage: allow pluggable die-recursion checks
  run-command: use thread-aware die_is_recursing routine
  cat-file: print tags raw for cat-file -p
  receive-pack: close sideband fd on early pack errors

Jiang Xin (1):
  i18n: make the translation of -u advice in one go

Johannes Sixt (3):
  rerere forget: grok files containing NUL
  rerere forget: do not segfault if not all stages are present
  t6200: avoid path mangling issue on Windows

John Keeping (5):
  diffcore-break: don't divide by 

[ANNOUNCE] Git v1.8.3-rc0

2013-04-26 Thread Junio C Hamano
A release candidate preview Git v1.8.3-rc0 is now available for
testing at the usual places.

The release tarballs are found at:

http://code.google.com/p/git-core/downloads/list

and their SHA-1 checksums are:

f0b0b415f0c693865895c1918859b12c4a7d5b17  git-1.8.3.rc0.tar.gz
089efc61b3d45504cb53003719d1bb3d953a41a8  git-htmldocs-1.8.3.rc0.tar.gz
57a6e889667597f2699e4d6fb97c8cf6e595cb4a  git-manpages-1.8.3.rc0.tar.gz

Also the following public repositories all have a copy of the v1.8.3-rc0
tag and the master branch that the tag points at:

  url = https://kernel.googlesource.com/pub/scm/git/git
  url = git://repo.or.cz/alt-git.git
  url = https://code.google.com/p/git-core/
  url = git://git.sourceforge.jp/gitroot/git-core/git.git
  url = git://git-core.git.sourceforge.net/gitroot/git-core/git-core
  url = https://github.com/gitster/git

Git v1.8.3 Release Notes (draft)


Backward compatibility notes (for Git 2.0)
--

When git push [$there] does not say what to push, we have used the
traditional matching semantics so far (all your branches were sent
to the remote as long as there already are branches of the same name
over there).  In Git 2.0, the default will change to the simple
semantics that pushes the current branch to the branch with the same
name, only when the current branch is set to integrate with that
remote branch.  There is a user preference configuration variable
push.default to change this.  If you are an old-timer who is used
to the matching semantics, you can set it to matching to keep the
traditional behaviour.  If you want to live in the future early,
you can set it to simple today without waiting for Git 2.0.

When git add -u and git add -A, that does not specify what paths
to add on the command line is run from inside a subdirectory, these
commands will operate on the entire tree in Git 2.0 for consistency
with git commit -a and other commands. Because there will be no
mechanism to make git add -u behave as if git add -u ., it is
important for those who are used to git add -u (without pathspec)
updating the index only for paths in the current subdirectory to start
training their fingers to explicitly say git add -u . when they mean
it before Git 2.0 comes.  A warning is issued when these commands are
run without a pathspec and when you have local changes outside the
current directory, because the behaviour in Git 2.0 will be different
from today's version in such a situation.

In Git 2.0, git add path will behave as git add -A path, so
that git add dir/ will notice paths you removed from the directory
and record the removal.  Versions before Git 2.0, including this
release, will keep ignoring removals, but the users who rely on this
behaviour is encouraged to use git add --ignore-removal path and
get used to it.


Updates since v1.8.2


Foreign interface

 * remote-hg and remote-bzr helpers (in contrib/) have been updated.


UI, Workflows  Features

 * git branch --vv learned to paint the name of the branch it
   integrates with in a different color (color.branch.upstream,
   which defaults to blue).

 * In a sparsely populated working tree, git checkout pathspec no
   longer unmarks paths that match the given pathspec that were
   originally ignored with --sparse (use --ignore-skip-worktree-bits
   option to resurrect these paths out of the index if you really want
   to).

 * git log --format specifier learned %C(auto) token that tells Git
   to use color when interpolating %d (decoration), %h (short commit
   object name), etc. for terminal output.

 * git bisect leaves the final outcome as a comment in its bisect
   log file.

 * git clone --reference can now refer to a gitfile textual symlink
   that points at the real location of the repository.

 * git count-objects learned --human-readable aka -H option to
   show various large numbers in Ki/Mi/GiB scaled as necessary.

 * git cherry-pick $blob and git cherry-pick $tree are nonsense,
   and a more readable error message e.g. can't cherry-pick a tree
   is given (we used to say expected exactly one commit).

 * The --annotate option to git send-email can be turned on (or
   off) by default with sendemail.annotate configuration variable (you
   can use --no-annotate from the command line to override it).

 * The --cover-letter option to git format-patch can be turned on
   (or off) by default with format.coverLetter configuration
   variable. By setting it to 'auto', you can turn it on only for a
   series with two or more patches.

 * The bash completion support (in contrib/) learned that cherry-pick
   takes a few more options than it already knew about.

 * git help learned -g option to show the list of guides just like
   list of commands are given with -a.

 * A triangular pull from one place, push to another place workflow
   is supported better by new remote.pushdefault (overrides the
   origin thing) and branch.*.pushremote (overrides 

What's cooking in git.git (Apr 2013, #09; Fri, 26)

2013-04-26 Thread Junio C Hamano
Here are the topics that have been cooking.  Commits prefixed with
'-' are only in 'pu' (proposed updates) while commits prefixed with
'+' are in 'next'.

The release candidate preview 1.8.3-rc0 has been tagged. I'd like to
see people focus on catching and fixing last minute regressions and
incompleteness in the topics that have already in 'master' for the
upcoming release. New topics that are not relevant for the goal to
release a regression-free and complete 1.8.3 may not be queued even
on 'pu' until final to reduce hassles on integration testing (I do
not mean that it is forbidden to work on and discussing new topics
on the list. It is just the patches won't be considered as formal
submission and they won't hit 'pu').

As to the topics still cooking on 'next', I unfortunately do not see
anything that I feel comfortable merging for 1.8.3; but I am open to
suggestions.

You can find the changes described here in the integration branches
of the repositories listed at

http://git-blame.blogspot.com/p/git-public-repositories.html

--
[Graduated to master]

* fc/remote-hg (2013-04-22) 16 commits
  (merged to 'next' on 2013-04-25 at 152cb06)
 + remote-hg: strip extra newline
 + remote-hg: use marks instead of inlined files
 + remote-hg: small performance improvement
 + remote-hg: allow refs with spaces
 + remote-hg: don't update bookmarks unnecessarily
 + remote-hg: add support for schemes extension
 + remote-hg: improve email sanitation
 + remote-hg: add custom local tag write code
 + remote-hg: write tags in the appropriate branch
 + remote-hg: custom method to write tags
 + remote-hg: add support for tag objects
 + remote-hg: add branch_tip() helper
 + remote-hg: properly mark branches up-to-date
 + remote-hg: use python urlparse
 + remote-hg: safer bookmark pushing
 + remote-helpers: avoid has_key

 Further updates to remote-hg (in contrib/).


* jc/add-ignore-removal (2013-04-22) 2 commits
  (merged to 'next' on 2013-04-24 at c85c5a7)
 + git add: rephrase -A/--no-all warning
 + git add: --ignore-removal is a better named --no-all
 (this branch is used by jc/add-2.0-ignore-removal.)

 Introduce --ignore-removal as a synonym to --no-all for git
 add, and improve the 2.0 migration warning with it.


* jk/remote-helper-with-signed-tags (2013-04-15) 3 commits
  (merged to 'next' on 2013-04-21 at 0231d45)
 + transport-helper: add 'signed-tags' capability
 + transport-helper: pass --signed-tags=warn-strip to fast-export
 + fast-export: add --signed-tags=warn-strip mode

 Allows remote-helpers to declare they can handle signed tags, and
 issue a warning when using those that don't.


* jn/glossary-revision (2013-04-21) 1 commit
  (merged to 'next' on 2013-04-24 at 70efbe7)
 + glossary: a revision is just a commit

 The wording for revision in the glossary wanted to say it refers
 to commit (noun) as a concept but it was badly phrased.

 This may need further updates to hint that in contexts where it is
 clear, the word may refer to an object name, not necessarily a
 commit. But the patch as-is is already an improvement.


* ph/rebase-original (2013-04-23) 1 commit
  (merged to 'next' on 2013-04-24 at c643dcd)
 + rebase: find orig_head unambiguously


* rr/shortlog-doc (2013-04-22) 8 commits
  (merged to 'next' on 2013-04-25 at a95a3fc)
 + builtin/shortlog.c: make usage string consistent with log
 + builtin/log.c: make usage string consistent with doc
 + git-shortlog.txt: make SYNOPSIS match log, update OPTIONS
 + git-log.txt: rewrite note on why -- may be required
 + git-log.txt: generalize since..until
 + git-log.txt: order OPTIONS properly; move since..until
 + revisions.txt: clarify the .. and ... syntax
 + git-shortlog.txt: remove (-h|--help) from OPTIONS

 Update documentation for log and shortlog.


* th/bisect-skipped-log (2013-04-23) 1 commit
  (merged to 'next' on 2013-04-25 at 1de189b)
 + bisect: Log possibly bad, skipped commits at bisection end

--
[New Topics]

* kb/full-history-compute-treesame-carefully (2013-04-24) 2 commits
 - t6012: update test for tweaked full-history traversal
 - Make --full-history consider more merges


* tr/remote-tighten-commandline-parsing (2013-04-24) 3 commits
 - remote: 'show' and 'prune' can take more than one remote
 - remote: check for superfluous arguments in 'git remote add'
 - remote: add a test for extra arguments, according to docs

 Will merge to 'next'.


* zk/prompt-rebase-step (2013-04-25) 1 commit
  (merged to 'next' on 2013-04-25 at a8264bf)
 + bash-prompt.sh: show where rebase is at when stopped


* rr/pp-user-info-without-extra-allocation (2013-04-25) 3 commits
 - pretty: remove intermediate strbufs from pp_user_info()
 - pretty: simplify output line length calculation in pp_user_info()
 - pretty: simplify input line length calculation in pp_user_info()

 Will merge to 'next'.

--
[Stalled]

* 

Re: [PATCH 12/20] remote-bzr: split marks file

2013-04-26 Thread Felipe Contreras
On Fri, Apr 26, 2013 at 7:17 PM, Junio C Hamano gits...@pobox.com wrote:
 Felipe Contreras felipe.contre...@gmail.com writes:

 And in case anybody is thinking that remote-bzr is really a too fast
 moving target; even if this managed to land in 'master', it's likely
 that people were not able to push at all, and in fact, many were not
 even able to clone in 1.8.2. So, hardly could be considered a
 regression. Nevertheless, I caught it in time.

 You didn't.  I am already way too deep into today's 1.8.3-rc0
 integration cycle and I won't waste a couple of hours work just to
 revert this.

All right, if you already merged this patch series, you could do what
I did in my public branch: revert it, it's a single command, doesn't
take hours.

But I don't see this series in origin/master, am I missing something?

 But from your description it sounds like with or without the patch
 the helper is equally broken and it does not make that much of a
 difference.

Indeed. Many people would need this patch series to push, and this
patch breaks the push for more than one remote. So if you merged the
whole thing quite likely their situation would improve; they could at
least push to one remote, instead of zero. Of course, if you remove
this patch, they would be able to push to many.

But I don't see it merged.

Cheers.

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


  1   2   >