[PATCH 1/2] help: include common-cmds.h only in one file

2013-01-19 Thread Junio C Hamano
This header not only declares but also defines the contents of the
array that holds the list of command names and help text.  Do not
include it in multiple places to waste text space.

Signed-off-by: Junio C Hamano gits...@pobox.com
---

 * This is a real cleanup patch.

 builtin/help.c | 18 --
 help.c | 17 +
 2 files changed, 17 insertions(+), 18 deletions(-)

diff --git a/builtin/help.c b/builtin/help.c
index bd86253..6067a61 100644
--- a/builtin/help.c
+++ b/builtin/help.c
@@ -6,7 +6,6 @@
 #include cache.h
 #include builtin.h
 #include exec_cmd.h
-#include common-cmds.h
 #include parse-options.h
 #include run-command.h
 #include column.h
@@ -287,23 +286,6 @@ static int git_help_config(const char *var, const char 
*value, void *cb)
 
 static struct cmdnames main_cmds, other_cmds;
 
-void list_common_cmds_help(void)
-{
-   int i, longest = 0;
-
-   for (i = 0; i  ARRAY_SIZE(common_cmds); i++) {
-   if (longest  strlen(common_cmds[i].name))
-   longest = strlen(common_cmds[i].name);
-   }
-
-   puts(_(The most commonly used git commands are:));
-   for (i = 0; i  ARRAY_SIZE(common_cmds); i++) {
-   printf(   %s   , common_cmds[i].name);
-   mput_char(' ', longest - strlen(common_cmds[i].name));
-   puts(_(common_cmds[i].help));
-   }
-}
-
 static int is_git_command(const char *s)
 {
return is_in_cmdlist(main_cmds, s) ||
diff --git a/help.c b/help.c
index 2a42ec6..1dfa0b0 100644
--- a/help.c
+++ b/help.c
@@ -223,6 +223,23 @@ void list_commands(unsigned int colopts,
}
 }
 
+void list_common_cmds_help(void)
+{
+   int i, longest = 0;
+
+   for (i = 0; i  ARRAY_SIZE(common_cmds); i++) {
+   if (longest  strlen(common_cmds[i].name))
+   longest = strlen(common_cmds[i].name);
+   }
+
+   puts(_(The most commonly used git commands are:));
+   for (i = 0; i  ARRAY_SIZE(common_cmds); i++) {
+   printf(   %s   , common_cmds[i].name);
+   mput_char(' ', longest - strlen(common_cmds[i].name));
+   puts(_(common_cmds[i].help));
+   }
+}
+
 int is_in_cmdlist(struct cmdnames *c, const char *s)
 {
int i;
-- 
1.8.1.1.454.g48d39c0

--
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] help --standard: list standard commands

2013-01-19 Thread Junio C Hamano
If you run make on a branch that adds git check-ignore, checkout
an older branch that did not know about the command without make clean,
and the run t9902 test, the completion script fails to exclude the
check-ignore command from candidates to complete check.

This is because the completion script asks git help -a to show
every executable that begins with git- in the GIT_EXEC_PATH, and
because we run tests with GIT_EXEC_PATH set to the top of the
working tree, that has the executable we just built, in order to
test these before installing.  Leftover git check-ignore that we
did not build for the current version gets in the way.

One way to solve this is to restrict the completion to only the
commands we know about.

Note that this will make the completion useless in real life for
some people, as they do want to get their custom commands on their
$PATH to be included in the completion.

Signed-off-by: Junio C Hamano gits...@pobox.com
---

 * This is not a real patch, for the reasons stated.

 builtin/help.c | 17 ++---
 command-list.txt   |  4 ++--
 contrib/completion/git-completion.bash | 14 +-
 generate-cmdlist.sh| 13 -
 help.c | 30 --
 help.h |  1 +
 6 files changed, 58 insertions(+), 21 deletions(-)

diff --git a/builtin/help.c b/builtin/help.c
index 6067a61..32e7d64 100644
--- a/builtin/help.c
+++ b/builtin/help.c
@@ -35,11 +35,16 @@ enum help_format {
 
 static const char *html_path;
 
-static int show_all = 0;
+#define HELP_SHOW_ALL 1
+#define HELP_SHOW_STANDARD 2
+static int show_what;
 static unsigned int colopts;
 static enum help_format help_format = HELP_FORMAT_NONE;
 static struct option builtin_help_options[] = {
-   OPT_BOOLEAN('a', all, show_all, N_(print all available commands)),
+   OPT_SET_INT('a', all, show_what, N_(print all available commands),
+   HELP_SHOW_ALL),
+   OPT_SET_INT(0, standard, show_what, N_(print all available 
commands),
+   HELP_SHOW_STANDARD),
OPT_SET_INT('m', man, help_format, N_(show man page), 
HELP_FORMAT_MAN),
OPT_SET_INT('w', web, help_format, N_(show manual in web browser),
HELP_FORMAT_WEB),
@@ -424,12 +429,18 @@ int cmd_help(int argc, const char **argv, const char 
*prefix)
builtin_help_usage, 0);
parsed_help_format = help_format;
 
-   if (show_all) {
+   if (show_what == HELP_SHOW_ALL) {
git_config(git_help_config, NULL);
printf(_(usage: %s%s), _(git_usage_string), \n\n);
list_commands(colopts, main_cmds, other_cmds);
printf(%s\n, _(git_more_info_string));
return 0;
+   } else if (show_what == HELP_SHOW_STANDARD) {
+   int i;
+   limit_to_standard(main_cmds);
+   for (i = 0; i  main_cmds.cnt; i++)
+   printf(%s\n, main_cmds.names[i]-name);
+   return 0;
}
 
if (!argv[0]) {
diff --git a/command-list.txt b/command-list.txt
index 7e8cfec..94ce8ec 100644
--- a/command-list.txt
+++ b/command-list.txt
@@ -116,8 +116,8 @@ git-showmainporcelain common
 git-show-branch ancillaryinterrogators
 git-show-index  plumbinginterrogators
 git-show-refplumbinginterrogators
-git-sh-i18n purehelpers
-git-sh-setuppurehelpers
+git-sh-i18n purehelpers nocomplete
+git-sh-setuppurehelpers nocomplete
 git-stash   mainporcelain
 git-status  mainporcelain common
 git-stripspace  purehelpers
diff --git a/contrib/completion/git-completion.bash 
b/contrib/completion/git-completion.bash
index a4c48e1..46f22af 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -531,23 +531,11 @@ __git_complete_strategy ()
return 1
 }
 
-__git_list_all_commands ()
-{
-   local i IFS= $'\n'
-   for i in $(git help -a|egrep '^  [a-zA-Z0-9]')
-   do
-   case $i in
-   *--*) : helper pattern;;
-   *) echo $i;;
-   esac
-   done
-}
-
 __git_all_commands=
 __git_compute_all_commands ()
 {
test -n $__git_all_commands ||
-   __git_all_commands=$(__git_list_all_commands)
+   __git_all_commands=$(git help --standard)
 }
 
 __git_list_porcelain_commands ()
diff --git a/generate-cmdlist.sh b/generate-cmdlist.sh
index 9a4c9b9..7800af3 100755
--- a/generate-cmdlist.sh
+++ b/generate-cmdlist.sh
@@ -9,7 +9,7 @@ struct cmdname_help {
 static struct cmdname_help common_cmds[] = {
 
 sed -n -e 's/^git-\([^ 

[PATCH 0/2] GIT, Git, git

2013-01-19 Thread Thomas Ackermann

Git changed its 'official' system name from 'GIT' to 'Git' in v1.6.5.3
(as can be seen in the corresponding release note where 'GIT' was 
changed to 'Git' in the header line).

Alas the documention uses 'GIT', 'Git' or even 'git' to refer to the
Git system. So change every occurrence of 'GIT and 'git' to 'Git'
whenever Git as a system is referred to (but don't do this change
in the release notes because they constitute a history orthogonal
to the history versioned by Git).

[PATCH 1/2] Change old system name 'GIT' to 'Git'
[PATCH 2/2] Change 'git' to 'Git' whenever the whole system is referred to

 Documentation/CodingGuidelines |  14 +-
 Documentation/SubmittingPatches|  12 +-
 Documentation/asciidoc.conf|   2 +-
 Documentation/blame-options.txt|   4 +-
 Documentation/config.txt   | 106 +--
 Documentation/diff-config.txt  |   2 +-
 Documentation/diff-options.txt |   4 +-
 Documentation/everyday.txt |  10 +-
 Documentation/git-apply.txt|   2 +-
 Documentation/git-archimport.txt   |  14 +-
 Documentation/git-archive.txt  |   2 +-
 Documentation/git-bisect-lk2009.txt|  22 +--
 Documentation/git-bisect.txt   |   4 +-
 Documentation/git-blame.txt|   2 +-
 Documentation/git-branch.txt   |   2 +-
 Documentation/git-bundle.txt   |   2 +-
 Documentation/git-check-ref-format.txt |   4 +-
 Documentation/git-checkout.txt |   4 +-
 Documentation/git-clean.txt|   6 +-
 Documentation/git-clone.txt|  12 +-
 Documentation/git-commit-tree.txt  |   2 +-
 Documentation/git-commit.txt   |   6 +-
 Documentation/git-credential-cache.txt |   4 +-
 Documentation/git-credential-store.txt |   6 +-
 Documentation/git-credential.txt   |   6 +-
 Documentation/git-cvsexportcommit.txt  |   6 +-
 Documentation/git-cvsimport.txt|  10 +-
 Documentation/git-cvsserver.txt|  20 +-
 Documentation/git-daemon.txt   |  10 +-
 Documentation/git-describe.txt |   2 +-
 Documentation/git-diff.txt |   2 +-
 Documentation/git-difftool.txt |   2 +-
 Documentation/git-fetch.txt|   2 +-
 Documentation/git-filter-branch.txt|   4 +-
 Documentation/git-format-patch.txt |  10 +-
 Documentation/git-fsck.txt |   6 +-
 Documentation/git-grep.txt |   2 +-
 Documentation/git-hash-object.txt  |   2 +-
 Documentation/git-help.txt |   2 +-
 Documentation/git-http-backend.txt |   2 +-
 Documentation/git-index-pack.txt   |   6 +-
 Documentation/git-init.txt |  16 +-
 Documentation/git-log.txt  |   2 +-
 Documentation/git-ls-files.txt |   2 +-
 Documentation/git-merge-index.txt  |   4 +-
 Documentation/git-merge.txt|   4 +-
 Documentation/git-mergetool--lib.txt   |   2 +-
 Documentation/git-mktag.txt|   4 +-
 Documentation/git-mv.txt   |   2 +-
 Documentation/git-p4.txt   |  66 +++
 Documentation/git-pack-objects.txt |  12 +-
 Documentation/git-pull.txt |   8 +-
 Documentation/git-push.txt |   8 +-
 Documentation/git-quiltimport.txt  |   4 +-
 Documentation/git-rebase.txt   |   2 +-
 Documentation/git-reflog.txt   |   2 +-
 Documentation/git-remote-ext.txt   |  14 +-
 Documentation/git-remote-fd.txt|  10 +-
 Documentation/git-remote-helpers.txt   |  46 ++---
 Documentation/git-replace.txt  |   2 +-
 Documentation/git-rev-list.txt |   2 +-
 Documentation/git-rev-parse.txt|   4 +-
 Documentation/git-rm.txt   |   8 +-
 Documentation/git-send-email.txt   |   2 +-
 Documentation/git-send-pack.txt|   2 +-
 Documentation/git-sh-setup.txt |   4 +-
 Documentation/git-show-index.txt   |   2 +-
 Documentation/git-status.txt   |   8 +-
 Documentation/git-stripspace.txt   |   2 +-
 Documentation/git-submodule.txt|   2 +-
 Documentation/git-svn.txt  |  88 -
 Documentation/git-tag.txt   

[PATCH 1/2] Change old system name 'GIT' to 'Git'

2013-01-19 Thread Thomas Ackermann

Signed-off-by: Thomas Ackermann th.ac...@arcor.de
---
 Documentation/asciidoc.conf |  2 +-
 Documentation/everyday.txt  |  4 ++--
 Documentation/git-clone.txt |  2 +-
 Documentation/git-cvsexportcommit.txt   |  2 +-
 Documentation/git-cvsserver.txt |  8 
 Documentation/git-daemon.txt|  4 ++--
 Documentation/git-mv.txt|  2 +-
 Documentation/git-send-email.txt|  2 +-
 Documentation/git-tools.txt | 14 +++---
 Documentation/git-update-ref.txt|  2 +-
 Documentation/git.txt   |  2 +-
 Documentation/gitcore-tutorial.txt  |  4 ++--
 Documentation/gitglossary.txt   |  2 +-
 Documentation/gittutorial.txt   |  2 +-
 Documentation/gitweb.txt|  2 +-
 Documentation/gitworkflows.txt  |  2 +-
 Documentation/glossary-content.txt  |  2 +-
 Documentation/howto-index.sh|  2 +-
 Documentation/howto/rebase-from-internal-branch.txt |  6 +++---
 Documentation/howto/revert-branch-rebase.txt|  4 ++--
 Documentation/howto/setup-git-server-over-http.txt  |  4 ++--
 Documentation/technical/api-index-skel.txt  |  4 ++--
 Documentation/technical/index-format.txt|  6 +++---
 Documentation/technical/pack-format.txt |  4 ++--
 Documentation/user-manual.txt   |  4 ++--
 25 files changed, 46 insertions(+), 46 deletions(-)

diff --git a/Documentation/asciidoc.conf b/Documentation/asciidoc.conf
index 1273a85..2c16c53 100644
--- a/Documentation/asciidoc.conf
+++ b/Documentation/asciidoc.conf
@@ -4,7 +4,7 @@
 #
 # Note, {0} is the manpage section, while {target} is the command.
 #
-# Show GIT link as: command(section); if section is defined, else just show
+# Show Git link as: command(section); if section is defined, else just show
 # the command.
 
 [macros]
diff --git a/Documentation/everyday.txt b/Documentation/everyday.txt
index 048337b..6acfd33 100644
--- a/Documentation/everyday.txt
+++ b/Documentation/everyday.txt
@@ -1,4 +1,4 @@
-Everyday GIT With 20 Commands Or So
+Everyday Git With 20 Commands Or So
 ===
 
 Individual Developer (Standalone) commands are essential for
@@ -229,7 +229,7 @@ commands in addition to the ones needed by participants.
 Examples
 
 
-My typical GIT day.::
+My typical Git day.::
 +
 
 $ git status 1
diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt
index 7fefdb0..597048b 100644
--- a/Documentation/git-clone.txt
+++ b/Documentation/git-clone.txt
@@ -125,7 +125,7 @@ objects from the source repository into a pack in the 
cloned repository.
No checkout of HEAD is performed after the clone is complete.
 
 --bare::
-   Make a 'bare' GIT repository.  That is, instead of
+   Make a 'bare' Git repository.  That is, instead of
creating `directory` and placing the administrative
files in `directory/.git`, make the `directory`
itself the `$GIT_DIR`. This obviously implies the `-n`
diff --git a/Documentation/git-cvsexportcommit.txt 
b/Documentation/git-cvsexportcommit.txt
index 7f79cec..a671e22 100644
--- a/Documentation/git-cvsexportcommit.txt
+++ b/Documentation/git-cvsexportcommit.txt
@@ -15,7 +15,7 @@ SYNOPSIS
 
 DESCRIPTION
 ---
-Exports a commit from GIT to a CVS checkout, making it easier
+Exports a commit from Git to a CVS checkout, making it easier
 to merge patches from a git repository into a CVS repository.
 
 Specify the name of a CVS checkout using the -w switch or execute it
diff --git a/Documentation/git-cvsserver.txt b/Documentation/git-cvsserver.txt
index 88d814a..36d069b 100644
--- a/Documentation/git-cvsserver.txt
+++ b/Documentation/git-cvsserver.txt
@@ -72,9 +72,9 @@ plugin. Most functionality works fine with both of these 
clients.
 LIMITATIONS
 ---
 
-CVS clients cannot tag, branch or perform GIT merges.
+CVS clients cannot tag, branch or perform Git merges.
 
-'git-cvsserver' maps GIT branches to CVS modules. This is very different
+'git-cvsserver' maps Git branches to CVS modules. This is very different
 from what most CVS users would expect since in CVS modules usually represent
 one or more directories.
 
@@ -130,7 +130,7 @@ Then provide your password via the pserver method, for 
example:
 --
cvs -d:pserver:someuser:somepassword at server/path/repo.git co 
HEAD_name
 --
-No special setup is needed for SSH access, other than having GIT tools
+No special setup is needed for SSH access, other than having Git tools
 in the PATH. If you have clients that do not accept the CVS_SERVER
 environment variable, you can rename 'git-cvsserver' to `cvs`.
 
@@ -197,7 +197,7 @@ allowing access over SSH.
shell 

Re: t9902 fails

2013-01-19 Thread Jean-Noël AVILA
Le samedi 19 janvier 2013 06:38:54, Torsten Bögershausen a écrit :
 On 18.01.13 23:23, Jean-Noël AVILA wrote:
  Le vendredi 18 janvier 2013 21:15:23, Junio C Hamano a écrit :
  Junio C Hamano gits...@pobox.com writes:
  How about doing something like this and set that variable in the
  test instead?  If STD_ONLY is not set, you will get everything, but
  when STD_ONLY is set, we will stop reading from help -a when it
  starts listing additional stuff.
  
  I tried both of your propositions but none made test 10 of t9902 pass.
  
  Am I supposed to run make install before running the test?
 
 No. The test suite could (and should) be run before you make install.
 So a typical sequence could be:
 Run test suite, and if that passes, install the binaries on my system.
 This could look like this on the command line:
 make test  sudo make install
 
 Jean-Noël,
 would it be possible to run
 git status
 and share the result with us?
 
 And did you try Jonathans patch?
 
 /Torsten


Hi all,

My workdir is clean. 


jnavila@cayenne git (master)]$ make
GEN perl/PM.stamp
SUBDIR gitweb
SUBDIR ../
make[2]: « GIT-VERSION-FILE » est à jour.
GEN git-instaweb
SUBDIR git-gui
SUBDIR gitk-git
make[1]: Rien à faire pour « all ».
SUBDIR perl
SUBDIR git_remote_helpers
SUBDIR templates
[jnavila@cayenne git (master)]$ git branch -vv
  attr_pattern   3cb6a4c Add directory pattern matching to attributes
  fix_test_t9902 02f55e6 Merge git://bogomips.org/git-svn
  maint  611fa18 Add directory pattern matching to attributes
* master 02f55e6 [origin/master] Merge git://bogomips.org/git-svn
  next   82c5000 [origin/next: ahead 157, behind 550] Merge branch 
'jc/doc-diff-blobs' into next
  pu 25f269c [origin/pu: ahead 68, behind 137] Merge branch 
'mp/diff-algo-config' into pu
  todo   70e0e3e [origin/todo: behind 1] What's cooking (2013/01 #06)
[jnavila@cayenne git (master)]$ git status
# On branch master
# Untracked files:
#   (use git add file... to include in what will be committed)
#
#   gitk-git/gitk-wish
nothing added to commit but untracked files present (use git add to track)
[jnavila@cayenne git (master)]$ ls -l | grep git-check
-rwxr-xr-x 108 jnavila jnavila 7677476 janv. 19 10:30 git-check-attr
-rwxr-xr-x 108 jnavila jnavila 7677476 janv. 19 10:30 git-checkout
-rwxr-xr-x 108 jnavila jnavila 7677476 janv. 19 10:30 git-checkout-index
-rwxr-xr-x 108 jnavila jnavila 7677476 janv. 19 10:30 git-check-ref-format


If I move git-checkout-branches out of /usr/bin, the test passes. So somehow 
GIT_EXEC_PATH is not what is expected.


--
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 2/2] help --standard: list standard commands

2013-01-19 Thread Jean-Noël AVILA
Le samedi 19 janvier 2013 09:02:13, Junio C Hamano a écrit :
 If you run make on a branch that adds git check-ignore, checkout
 an older branch that did not know about the command without make clean,
 and the run t9902 test, the completion script fails to exclude the
 check-ignore command from candidates to complete check.
 
 This is because the completion script asks git help -a to show
 every executable that begins with git- in the GIT_EXEC_PATH, and
 because we run tests with GIT_EXEC_PATH set to the top of the
 working tree, that has the executable we just built, in order to
 test these before installing.  Leftover git check-ignore that we
 did not build for the current version gets in the way.
 
 One way to solve this is to restrict the completion to only the
 commands we know about.
 
 Note that this will make the completion useless in real life for
 some people, as they do want to get their custom commands on their
 $PATH to be included in the completion.
 
 Signed-off-by: Junio C Hamano gits...@pobox.com
 ---
 
  * This is not a real patch, for the reasons stated.
 
  builtin/help.c | 17 ++---
  command-list.txt   |  4 ++--
  contrib/completion/git-completion.bash | 14 +-
  generate-cmdlist.sh| 13 -
  help.c | 30 --
  help.h |  1 +
  6 files changed, 58 insertions(+), 21 deletions(-)
 
 diff --git a/builtin/help.c b/builtin/help.c
 index 6067a61..32e7d64 100644
 --- a/builtin/help.c
 +++ b/builtin/help.c
 @@ -35,11 +35,16 @@ enum help_format {
 
  static const char *html_path;
 
 -static int show_all = 0;
 +#define HELP_SHOW_ALL 1
 +#define HELP_SHOW_STANDARD 2
 +static int show_what;
  static unsigned int colopts;
  static enum help_format help_format = HELP_FORMAT_NONE;
  static struct option builtin_help_options[] = {
 - OPT_BOOLEAN('a', all, show_all, N_(print all available commands)),
 + OPT_SET_INT('a', all, show_what, N_(print all available commands),
 + HELP_SHOW_ALL),
 + OPT_SET_INT(0, standard, show_what, N_(print all available
 commands), + HELP_SHOW_STANDARD),
   OPT_SET_INT('m', man, help_format, N_(show man page),
 HELP_FORMAT_MAN), OPT_SET_INT('w', web, help_format, N_(show manual in
 web browser), HELP_FORMAT_WEB),
 @@ -424,12 +429,18 @@ int cmd_help(int argc, const char **argv, const char
 *prefix) builtin_help_usage, 0);
   parsed_help_format = help_format;
 
 - if (show_all) {
 + if (show_what == HELP_SHOW_ALL) {
   git_config(git_help_config, NULL);
   printf(_(usage: %s%s), _(git_usage_string), \n\n);
   list_commands(colopts, main_cmds, other_cmds);
   printf(%s\n, _(git_more_info_string));
   return 0;
 + } else if (show_what == HELP_SHOW_STANDARD) {
 + int i;
 + limit_to_standard(main_cmds);
 + for (i = 0; i  main_cmds.cnt; i++)
 + printf(%s\n, main_cmds.names[i]-name);
 + return 0;
   }
 
   if (!argv[0]) {
 diff --git a/command-list.txt b/command-list.txt
 index 7e8cfec..94ce8ec 100644
 --- a/command-list.txt
 +++ b/command-list.txt
 @@ -116,8 +116,8 @@ git-showmainporcelain
 common git-show-branch ancillaryinterrogators
  git-show-index  plumbinginterrogators
  git-show-refplumbinginterrogators
 -git-sh-i18n purehelpers
 -git-sh-setuppurehelpers
 +git-sh-i18n purehelpers nocomplete
 +git-sh-setuppurehelpers nocomplete
  git-stash   mainporcelain
  git-status  mainporcelain common
  git-stripspace  purehelpers
 diff --git a/contrib/completion/git-completion.bash
 b/contrib/completion/git-completion.bash index a4c48e1..46f22af 100644
 --- a/contrib/completion/git-completion.bash
 +++ b/contrib/completion/git-completion.bash
 @@ -531,23 +531,11 @@ __git_complete_strategy ()
   return 1
  }
 
 -__git_list_all_commands ()
 -{
 - local i IFS= $'\n'
 - for i in $(git help -a|egrep '^  [a-zA-Z0-9]')
 - do
 - case $i in
 - *--*) : helper pattern;;
 - *) echo $i;;
 - esac
 - done
 -}
 -
  __git_all_commands=
  __git_compute_all_commands ()
  {
   test -n $__git_all_commands ||
 - __git_all_commands=$(__git_list_all_commands)
 + __git_all_commands=$(git help --standard)
  }
 
  __git_list_porcelain_commands ()
 diff --git a/generate-cmdlist.sh b/generate-cmdlist.sh
 index 9a4c9b9..7800af3 100755
 --- a/generate-cmdlist.sh
 +++ b/generate-cmdlist.sh
 @@ -9,7 +9,7 @@ struct cmdname_help {
  static struct cmdname_help 

Re: [PATCH 1/2] Change old system name 'GIT' to 'Git'

2013-01-19 Thread David Aguilar
On Sat, Jan 19, 2013 at 1:59 AM, Thomas Ackermann th.ac...@arcor.de wrote:
 @@ -55,7 +55,7 @@ History Viewers

 - *gitweb* (shipped with git-core)

 -   GITweb provides full-fledged web interface for GIT repositories.
 +   GITweb provides full-fledged web interface for Git repositories.

What about GITweb?

 diff --git a/Documentation/git-update-ref.txt 
 b/Documentation/git-update-ref.txt
 index d377a35..0df13ff 100644
 --- a/Documentation/git-update-ref.txt
 +++ b/Documentation/git-update-ref.txt
 @@ -73,7 +73,7 @@ in ref value.  Log lines are formatted as:
  Where oldsha1 is the 40 character hexadecimal value previously
  stored in ref, newsha1 is the 40 character hexadecimal value of
  newvalue and committer is the committer's name, email address
 -and date in the standard GIT committer ident format.
 +and date in the standard Git committer ident format.

IMO some of these look nicer when everything is lowercase.
e.g. standard git committer ident format.

 diff --git a/Documentation/gitweb.txt b/Documentation/gitweb.txt
 index 168e8bf..d364c3a 100644
 --- a/Documentation/gitweb.txt
 +++ b/Documentation/gitweb.txt
 @@ -504,7 +504,7 @@ repositories, you can configure Apache like this:

  The above configuration expects your public repositories to live under
  '/pub/git' and will serve them as `http://git.domain.org/dir-under-pub-git`,
 -both as cloneable GIT URL and as browseable gitweb interface.  If you then
 +both as cloneable Git URL and as browseable gitweb interface.  If you then
  start your linkgit:git-daemon[1] with `--base-path=/pub/git --export-all`
  then you can even use the `git://` URL with exactly the same path.

Git but not Gitweb?  IMO it reads nicer as cloneable git URL,
which also avoids this mismatch, but like I said that's my opinion.

$ git grep 'git repositor' | wc -l
226

These changes touch, for example, git-clone.txt to make it
say: Make a 'bare' Git repository.  Why not lowercase?

In that same file it has git repository, in lowercase,
in a later paragraph.  I'm not sure which way is preferred,
but I think they should be consistent.

Anyways, just some small notes.
cheers,
-- 
David
--
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] unpack-trees: do not abort when overwriting an existing file with the same content

2013-01-19 Thread Nguyễn Thái Ngọc Duy

Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com
---
 The git reset as illustrated in the test case is one case people
 may be hit by this. We can also do the same for uptodate check, but
 I'm not sure how that could happen.

 t/t1011-read-tree-sparse-checkout.sh |  3 ++-
 t/t2021-checkout-overwrite.sh|  8 
 unpack-trees.c   | 27 +++
 3 files changed, 37 insertions(+), 1 deletion(-)

diff --git a/t/t1011-read-tree-sparse-checkout.sh 
b/t/t1011-read-tree-sparse-checkout.sh
index 5c0053a..38f9899 100755
--- a/t/t1011-read-tree-sparse-checkout.sh
+++ b/t/t1011-read-tree-sparse-checkout.sh
@@ -238,7 +238,8 @@ test_expect_success 'print errors when failed to update 
worktree' '
echo sub .git/info/sparse-checkout 
git checkout -f init 
mkdir sub 
-   touch sub/added sub/addedtoo 
+   echo modified sub/added 
+   echo modified sub/addedtoo 
test_must_fail git checkout top 2actual 
cat expected \EOF 
 error: The following untracked working tree files would be overwritten by 
checkout:
diff --git a/t/t2021-checkout-overwrite.sh b/t/t2021-checkout-overwrite.sh
index 5da63e9..4163449 100755
--- a/t/t2021-checkout-overwrite.sh
+++ b/t/t2021-checkout-overwrite.sh
@@ -47,4 +47,12 @@ test_expect_success SYMLINKS 'checkout commit with dir must 
not remove untracked
test -h a/b
 '
 
+test_expect_success 'do not abort on overwriting an existing file with the 
same content' '
+   echo abc bar 
+   git add bar 
+   git commit -m new file 
+   git reset HEAD^ 
+   git checkout HEAD@{1}
+'
+
 test_done
diff --git a/unpack-trees.c b/unpack-trees.c
index 0e1a196..16adc03 100644
--- a/unpack-trees.c
+++ b/unpack-trees.c
@@ -1363,6 +1363,7 @@ static int check_ok_to_remove(const char *name, int len, 
int dtype,
  struct unpack_trees_options *o)
 {
struct cache_entry *result;
+   unsigned long ce_size;
 
/*
 * It may be that the 'lstat()' succeeded even though
@@ -1405,6 +1406,32 @@ static int check_ok_to_remove(const char *name, int len, 
int dtype,
return 0;
}
 
+   /*
+* If it has the same content that we are going to write down,
+* there's no point in complaining. We still overwrite it in the
+* end though. Permission is not checked so it may be lost.
+*/
+   if (ce 
+   S_ISREG(st-st_mode)  S_ISREG(ce-ce_mode) 
+   st-st_size  1024 * 1024  /* should be configurable */
+   sha1_object_info(ce-sha1, ce_size) == OBJ_BLOB 
+   ce_size == st-st_size) {
+   void *buffer = NULL;
+   unsigned long size;
+   enum object_type type;
+   struct strbuf sb = STRBUF_INIT;
+   int matched =
+   strbuf_read_file(sb, ce-name, ce_size) == ce_size 
+   (buffer = read_sha1_file(ce-sha1, type, size)) != 
NULL 
+   type == OBJ_BLOB 
+   size == ce_size 
+   !memcmp(buffer, sb.buf, size);
+   free(buffer);
+   strbuf_release(sb);
+   if (matched)
+   return 0;
+   }
+
return o-gently ? -1 :
add_rejected_path(o, error_type, name);
 }
-- 
1.8.0.rc2.23.g1fb49df

--
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-svn: do not escape certain characters in paths

2013-01-19 Thread Eric Wong
Peter Wu lekenst...@gmail.com wrote:
 Signed-off-by: Peter Wu lekenst...@gmail.com

Thanks, Signed-off-by: Eric Wong normalper...@yhbt.net

Will push.
--
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: git-svn seg fault during 'git svn fetch' due to perl 5.10

2013-01-19 Thread Eric Wong
Durham Goode dur...@fb.com wrote:
 In git 1.8.1, when we do 'git svn fetch' on a large repo, we're seeing a
 seg fault.  It's caused by git-svn trying to parse a large yaml file
 (introduced in 
 https://github.com/git/git/commit/68f532f4ba888f277637a94b4a49136054df0540
 ) which encounters a perl regex stack overflow bug that was present in
 perl  5.10 (https://bugzilla.redhat.com/show_bug.cgi?id=192400).
 
 We'll find a work around, but it'd be nice if there was a config setting
 to let us choose not to use the yaml format.

Maybe try a libyaml-based YAML module?  I'm not too familiar
with YAML parsers in the Perl world.  Hopefully Jonathan can help.

 Let me know if there's a better place to report this.

Yes, feel free to Cc: folks who signed-off/acked the change which
introduced the problem for you.
--
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] INSTALL: git-p4 doesn't support Python 3

2013-01-19 Thread John Keeping
git-p4 supports Python 2.6 and later versions of Python 2.  Since Pyhton
2.8 will never exist [1], it is most concise to just list the supported
versions.

[1] http://www.python.org/dev/peps/pep-0404/

Signed-off-by: John Keeping j...@keeping.me.uk
---
 INSTALL | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/INSTALL b/INSTALL
index 28f34bd..c456d1c 100644
--- a/INSTALL
+++ b/INSTALL
@@ -131,7 +131,7 @@ Issues of note:
  use English. Under autoconf the configure script will do this
  automatically if it can't find libintl on the system.
 
-   - Python version 2.6 or later is needed to use the git-p4
+   - Python version 2.6 or 2.7 is needed to use the git-p4
  interface to Perforce.
 
  - Some platform specific issues are dealt with Makefile rules,
-- 
1.8.1
--
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


tar-tree.c dereferencing pointer to incomplete type

2013-01-19 Thread 白い熊
Hello:

I'm building v 1.8.1.1 on Android. The build chokes on the builtins
phase on tar-tree.c with:

CC builtin/tar-tree.o
builtin/tar-tree.c: In function 'cmd_get_tar_commit_id':
builtin/tar-tree.c:93:12: error: dereferencing pointer to incomplete type
make: *** [builtin/tar-tree.o] Error 1

The line that's causing this in tar-tree.c is:

if (header-typeflag[0] != 'g')

from

int cmd_get_tar_commit_id(int argc, const char **argv, const char *prefix)
{
char buffer[HEADERSIZE];
struct ustar_header *header = (struct ustar_header *)buffer;
char *content = buffer + RECORDSIZE;
ssize_t n;

if (argc != 1)
usage(builtin_get_tar_commit_id_usage);

n = read_in_full(0, buffer, HEADERSIZE);
if (n  HEADERSIZE)
die(git get-tar-commit-id: read error);
if (header-typeflag[0] != 'g')
return 1;
if (memcmp(content, 52 comment=, 11))
return 1;

n = write_in_full(1, content + 11, 41);
if (n  41)
die_errno(git get-tar-commit-id: write error);

return 0;
}

But why?

What's messed up with my setup.

I can compile no probs on other machines. I'm trying to get my head
round this, but don't see the problem?
-- 
白い熊
--
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: Re* t9902 fails

2013-01-19 Thread Jean-Noël AVILA
Le samedi 19 janvier 2013 08:52:25, Junio C Hamano a écrit :
  (2) instead of being inclusive, collecting all executable in
  GIT_EXEC_PATH that happens to be named git-, add a mode to
  git help that lists those that we know to be standard
  commands that the users may want to complete from the command
  line.

Am I wrong when I say that git help -a already provides the difference 
between core git commands and other commands available through path?

If we use this, then we can instruct git-completion that we are in test mode 
and that it should not provide additional completions.

---
 contrib/completion/git-completion.bash | 13 +++--
 t/t9902-completion.sh  |  2 +-
 2 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-
completion.bash
index 14dd5e7..dc0ea5b 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -23,6 +23,8 @@
 #3) Consider changing your PS1 to also show the current branch,
 #   see git-prompt.sh for details.
 
+__testing_git=$1
+
 case $COMP_WORDBREAKS in
 *:*) : great ;;
 *)   COMP_WORDBREAKS=$COMP_WORDBREAKS:
@@ -533,8 +535,15 @@ __git_complete_strategy ()
 
 __git_list_all_commands ()
 {
-   local i IFS= $'\n'
-   for i in $(git help -a|egrep '^  [a-zA-Z0-9]')
+   local i cmdlist IFS= $'\n'
+
+   if [ x$__testing_git != xTEST ]; then
+   cmdlist=$(git help -a|egrep '^  [a-zA-Z0-9]')
+   else
+   cmdlist=$(git help -a| egrep -m 1 -B1000 PATH | egrep '^  
[a-zA-Z0-9]')
+   fi
+
+   for i in $cmdlist
do
case $i in
*--*) : helper pattern;;
diff --git a/t/t9902-completion.sh b/t/t9902-completion.sh
index 3cd53f8..51463b2 100755
--- a/t/t9902-completion.sh
+++ b/t/t9902-completion.sh
@@ -13,7 +13,7 @@ complete ()
return 0
 }
 
-. $GIT_BUILD_DIR/contrib/completion/git-completion.bash
+. $GIT_BUILD_DIR/contrib/completion/git-completion.bash TEST
 
 # We don't need this function to actually join words or do anything special.
 # Also, it's cleaner to avoid touching bash's internal completion variables.
-- 
1.8.1.1.271.g02f55e6

--
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] INSTALL: git-p4 doesn't support Python 3

2013-01-19 Thread Pete Wyckoff
j...@keeping.me.uk wrote on Sat, 19 Jan 2013 12:01 +:
 git-p4 supports Python 2.6 and later versions of Python 2.  Since Pyhton
 2.8 will never exist [1], it is most concise to just list the supported
 versions.
 
 [1] http://www.python.org/dev/peps/pep-0404/
 
 Signed-off-by: John Keeping j...@keeping.me.uk
[..]
 - - Python version 2.6 or later is needed to use the git-p4
 + - Python version 2.6 or 2.7 is needed to use the git-p4

This is indeed more accurate.

Acked-by: Pete Wyckoff p...@padd.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: tar-tree.c dereferencing pointer to incomplete type

2013-01-19 Thread 白い熊
On Sat, Jan 19, 2013 at 5:37 PM, Duy Nguyen pclo...@gmail.com wrote:
 There is another tar.h somewhere in your system? Stopping the
 compilation after proprocessing should show if it includes the correct
 tar.h.

Thank you, this must've been it, as it was finding tar.h from glibc.

Moved it and compiles fine. In fact I moved it back now, so it should
be finding it again and it still builds fine, no trace of the prior
error. I'm dumbfounded! But at least it compiles...
-- 
白い熊
--
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: tar-tree.c dereferencing pointer to incomplete type

2013-01-19 Thread 白い熊
On Sat, Jan 19, 2013 at 6:26 PM, 白い熊 shiroik...@shiroikuma.org wrote:
 Thank you, this must've been it, as it was finding tar.h from glibc.

 Moved it and compiles fine. In fact I moved it back now, so it should
 be finding it again and it still builds fine, no trace of the prior
 error. I'm dumbfounded! But at least it compiles...

OK, figured it out. It was indeed the wrong tar.h, the one that was
making it bomb was the kernel headers tar.h from the Android source.
That explains it quite well.

All's good now. Thank you :@)
-- 
白い熊
--
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


Aw: Re: [PATCH 1/2] Change old system name 'GIT' to 'Git'

2013-01-19 Thread Thomas Ackermann
 
 
 What about GITweb?
 
You are right; I missed that because I grepped only for 'GIT' as a whole word.
'gitweb' and 'GITweb' should be changed to 'Gitweb'.

 
 IMO some of these look nicer when everything is lowercase.
 e.g. standard git committer ident format.
 
IMHO what seems nicer here is the spelling we are all accustomed to.
The whole point of my patch is to use 'Git' consistently when 
we are talking about the system and not the individual command.

 
 $ git grep 'git repositor' | wc -l
 226
 
 These changes touch, for example, git-clone.txt to make it
 say: Make a 'bare' Git repository.  Why not lowercase?

When you also apply my second patch you only get 17 occurences of git 
repository 
which I missed to change to 'Git repository' ...

Thanks for looking into this!


---
Thomas
--
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] am: invoke perl's strftime in C locale

2013-01-19 Thread Jeff King
On Fri, Jan 18, 2013 at 12:36:46PM -0800, Junio C Hamano wrote:

  diff --git a/git-am.sh b/git-am.sh
  index c682d34..8677d8c 100755
  --- a/git-am.sh
  +++ b/git-am.sh
  @@ -334,7 +334,8 @@ split_patches () {
  # Since we cannot guarantee that the commit message is 
  in
  # git-friendly format, we put no Subject: line and just 
  consume
  # all of the message as the body
  -   perl -M'POSIX qw(strftime)' -ne 'BEGIN { $subject = 0 }
  +   perl -M'POSIX qw(strftime :locale_h)' -ne '
  +   BEGIN { setlocale(LC_TIME, C); $subject = 0 }
 
 I still haven't convinced myself that this is an improvement over
 the simple LC_ALL=C LANG=C perl ... approach.

Yeah, I was the one who brought it up, but I think I was probably being
too nit-picky. It almost certainly doesn't matter, and the alternatives
are just as likely to cause problems.

 I am tempted to use the previous one that puts the whole process
 under LC_ALL=C instead, unless I hear a we already depend on that
 elsewhere, look at $that_code.

I'm fine with that.

-Peff
--
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] Hiding some refs in ls-remote

2013-01-19 Thread Jeff King
On Fri, Jan 18, 2013 at 04:37:04PM -0800, Junio C Hamano wrote:

 This is an early preview of reducing the network cost while talking
 with a repository with tons of refs, most of which are of use by
 very narrow audiences (e.g. refs under Gerrit's refs/changes/ are
 useful only for people who are interested in the changes under
 review).  As long as these narrow audiences have a way to learn the
 names of refs or objects pointed at by the refs out-of-band, it is
 not necessary to advertise these refs.
 
 On the server end, you tell upload-pack that some refs do not have
 to be advertised with the uploadPack.hiderefs multi-valued
 configuration variable:
 
   [uploadPack]
   hiderefs = refs/changes

Would you want to do the same thing on receive-pack? It could benefit
from the same reduction in network cost (although it tends to be invoked
less frequently than upload-pack).

At GitHub, we have a similar patch (we even call it hiderefs), but we do
it only for receive-pack. In our case, it is not about network traffic,
but rather that we provide a set of read-only refs in the refs/pull
hierarchy. These are generated upstream by the creation of pull
requests, and we reject any updates to them via the git protocol using a
pre-receive hook.

However, if a client without these refs uses git push --mirror, it
will attempt to delete them (which will fail). Meaning that a mirror
push will always report failure, because it will always fail to push the
refs/pull deletions.

I don't know much about Gerrit's inner workings. Are refs/changes also
read-only?

-Peff
--
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] Hiding some refs in ls-remote

2013-01-19 Thread Junio C Hamano
Duy Nguyen pclo...@gmail.com writes:

 Should the client side learn how to list hidden refs too? I'm thinking
 of an extreme case where upload-pack advertises nothing (or maybe just
 refs/heads/master) and it's up to the client to ask for the ref
 selection it's interested in. upload-pack may need more updates to do
 that, I think.

What you are talking about is a different goal.

Look at this as a mechanism for the repository owner to control the
clutter in what is shown to the intended audience of what s/he
publishes in the repository.  Network bandwidth reduction of
advertisement is a side effect of clutter reduction, and not
necessarily the primary goal.

It lets me as the repository owner to say do not list them to make
these discoverable; letting the client side learn defeats the whole
point of this mechanism.

For example, if you mirror-clone from either of my repositories from
GitHub:

git clone --mirror git://github.com/git/git/
git clone --mirror git://github.com/gitster/git/

you will see stuff that does not belong to the project; objects that
are only reachable from refs/pull/* are not something I approved to
be placed in my repository; I as the project owner do not want to
give these objects to a cloner as if they are part of my project.

The server side can hide refs/pull/ and refs/pull-request-tags/ so
that clones (and ls-remote) will not see clutter, and nobody gets
hurt.

These refs are there only to support GitHub pull requests; the
advertisement of them to ls-remote and appearance of them in mirror
clones are undesirable side effects of how GitHub happened to
implement the feature.  GitHub has its way to notify of these pull
requests, and it makes these pull requests discoverable out of band
without involving Git.

Ability to say git fetch origin $SHA1 (or git fetch origin
pull/1) is the only thing lacking, in order to get rid of these
clutter.  The patches do the get rid of clutter part by letting
you hide these refs from ls-remote and clone; allowing fetch by tip
SHA1 needs to come latter.

Another example.  If you run ls-remote against the above two
repositories, you will notice that the latter has tons more
branches.  The former are to publish only the primary integration
branches, while the latter are to show individual topics.

I wish I didn't have to do this if I could.

We have periodical What's cooking postings that let interested
parties learn topics out-of-band.  If I can hide refs/heads/??/*
from normal users' clones while actually keeping individual topics
there at the same place, I do not have to push into two places.
--
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 2/3] t0050: honor CASE_INSENSITIVE_FS in add (with different case)

2013-01-19 Thread Torsten Bögershausen
On 19.01.13 08:19, Torsten Bögershausen wrote:
 The test case add (with different case) indicates a
 known breakage when run on a case sensitive file system.
 
 The test is invalid for case sensitive file system,
 check the precondition CASE_INSENSITIVE_FS before running it.
Sorry,
this should have been:

 The test case add (with different case) indicates a
 known breakage when run on a case insensitive file system.

--
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] am: invoke perl's strftime in C locale

2013-01-19 Thread Dmitry V. Levin
On Fri, Jan 18, 2013 at 12:36:46PM -0800, Junio C Hamano wrote:
 Dmitry V. Levin l...@altlinux.org writes:
 
  This fixes hg patch format support for locales other than C and en_*.
  Before the change, git-am was making Date: line from hg changeset
  metadata according to the current locale, and this line was rejected
  later with invalid date format diagnostics because localized date
  strings are not supported.
 
  Reported-by: Gleb Fotengauer-Malinovskiy gle...@altlinux.org
  Signed-off-by: Dmitry V. Levin l...@altlinux.org
  ---
 
   v3: alternative implementation using setlocale(LC_TIME, C)
 
   git-am.sh | 3 ++-
   1 file changed, 2 insertions(+), 1 deletion(-)
 
  diff --git a/git-am.sh b/git-am.sh
  index c682d34..8677d8c 100755
  --- a/git-am.sh
  +++ b/git-am.sh
  @@ -334,7 +334,8 @@ split_patches () {
  # Since we cannot guarantee that the commit message is 
  in
  # git-friendly format, we put no Subject: line and just 
  consume
  # all of the message as the body
  -   perl -M'POSIX qw(strftime)' -ne 'BEGIN { $subject = 0 }
  +   perl -M'POSIX qw(strftime :locale_h)' -ne '
  +   BEGIN { setlocale(LC_TIME, C); $subject = 0 }
 
 I still haven't convinced myself that this is an improvement over
 the simple LC_ALL=C LANG=C perl ... approach.

Personally I prefer 2nd edition that is simpler and does the right thing
(not that LC_ALL=C is necessary and sufficient, you neither need to add
things like LANG=C nor can relax it to LC_TIME=C).


-- 
ldv


pgp3AH6oqBPnI.pgp
Description: PGP signature


Re: tar-tree.c dereferencing pointer to incomplete type

2013-01-19 Thread Jonathan Nieder
白い熊 wrote:
 On Sat, Jan 19, 2013 at 6:26 PM, 白い熊 shiroik...@shiroikuma.org wrote:

 Moved it and compiles fine. In fact I moved it back now, so it should
 be finding it again and it still builds fine, no trace of the prior
 error. I'm dumbfounded! But at least it compiles...

 OK, figured it out. It was indeed the wrong tar.h, the one that was
 making it bomb was the kernel headers tar.h from the Android source.
 That explains it quite well.

Hm.  Is there anything to do to make our headers specified with -I
take precedence over unrelated system headers when processing
'#include foo.h' directives?

Thanks,
Jonathan
--
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] git rm -u

2013-01-19 Thread Eric James Michael Ritz

Hello everyone,

I am thinking about implementing a feature but I would appreciate any
feedback before I begin, because more experienced Git developers and
users may see some major problem that I do not.

Earlier today I deleted a file from a repository.  I deleted it
normally, not by using `git rm`.  So when I looked at `git status` on
my terminal it told me about the file no longer being there.  In my
sleepy state of mind I ran `git rm -u` without thinking about.  I did
this because I have a habit of using `git add -u`.  I know `git rm`
does not support that option, but I tried it anyways without thinking
about it.

When I came to my senses and realized that does not work I began to
wonder if `git rm -u` should exist.  If any deleted, tracked files are
not part of the index to commit then `git rm -u` would add that change
to the index.  This would save users the effort of having to type out
`git rm filename`, and could be useful when a user is deleting
multiple files.

Does this sound like a reasonable, useful feature to Git?  Or is there
already a way to accomplish this which I have missed out of ignorance?
Any thoughts and feedback would be greatly appreciated.

--
ejmr
南無妙法蓮華經
--
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] git rm -u

2013-01-19 Thread Tomas Carnecky
On Sat, 19 Jan 2013 16:35:18 -0500, Eric James Michael Ritz 
lobbyjo...@gmail.com wrote:
 Hello everyone,
 
 I am thinking about implementing a feature but I would appreciate any
 feedback before I begin, because more experienced Git developers and
 users may see some major problem that I do not.
 
 Earlier today I deleted a file from a repository.  I deleted it
 normally, not by using `git rm`.  So when I looked at `git status` on
 my terminal it told me about the file no longer being there.  In my
 sleepy state of mind I ran `git rm -u` without thinking about.  I did
 this because I have a habit of using `git add -u`.  I know `git rm`
 does not support that option, but I tried it anyways without thinking
 about it.
 
 When I came to my senses and realized that does not work I began to
 wonder if `git rm -u` should exist.  If any deleted, tracked files are
 not part of the index to commit then `git rm -u` would add that change
 to the index.  This would save users the effort of having to type out
 `git rm filename`, and could be useful when a user is deleting
 multiple files.
 
 Does this sound like a reasonable, useful feature to Git?  Or is there
 already a way to accomplish this which I have missed out of ignorance?
 Any thoughts and feedback would be greatly appreciated.

Does `git add -A` do what you want?
--
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] git rm -u

2013-01-19 Thread Jonathan Nieder
Eric James Michael Ritz wrote:

 When I came to my senses and realized that does not work I began to
 wonder if `git rm -u` should exist.  If any deleted, tracked files are
 not part of the index to commit then `git rm -u` would add that change
 to the index.

I like it.  If you have time to write such a patch, I'll be happy to
read it.

Thanks,
Jonathan
--
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] git rm -u

2013-01-19 Thread Antoine Pelisse
I think `git add -u` would be closer. It would stage removal of files,
but would not stage untracked files.
It would stage other type of changes though.

On Sat, Jan 19, 2013 at 10:47 PM, Tomas Carnecky
tomas.carne...@gmail.com wrote:
 On Sat, 19 Jan 2013 16:35:18 -0500, Eric James Michael Ritz 
 lobbyjo...@gmail.com wrote:
 Hello everyone,

 I am thinking about implementing a feature but I would appreciate any
 feedback before I begin, because more experienced Git developers and
 users may see some major problem that I do not.

 Earlier today I deleted a file from a repository.  I deleted it
 normally, not by using `git rm`.  So when I looked at `git status` on
 my terminal it told me about the file no longer being there.  In my
 sleepy state of mind I ran `git rm -u` without thinking about.  I did
 this because I have a habit of using `git add -u`.  I know `git rm`
 does not support that option, but I tried it anyways without thinking
 about it.

 When I came to my senses and realized that does not work I began to
 wonder if `git rm -u` should exist.  If any deleted, tracked files are
 not part of the index to commit then `git rm -u` would add that change
 to the index.  This would save users the effort of having to type out
 `git rm filename`, and could be useful when a user is deleting
 multiple files.

 Does this sound like a reasonable, useful feature to Git?  Or is there
 already a way to accomplish this which I have missed out of ignorance?
 Any thoughts and feedback would be greatly appreciated.

 Does `git add -A` do what you want?
 --
 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: [RFC] git rm -u

2013-01-19 Thread Eric James Michael Ritz

On 01/19/2013 04:49 PM, Antoine Pelisse wrote:
 I think `git add -u` would be closer. It would stage removal of
 files, but would not stage untracked files.  It would stage other
 type of changes though.

On Sat, Jan 19, 2013 at 10:47 PM, Tomas Carnecky
 Does `git add -A` do what you want?

Thank you Tomas and Antoine.  Both of these commands do what I want:
stage deleted files on the index.  But does the idea of a `git rm -u`
still sound useful since these commands also stage changes besides
deleted files?

--
ejmr
南無妙法蓮華經

--
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] git rm -u

2013-01-19 Thread Eric James Michael Ritz

On 01/19/2013 04:49 PM, Jonathan Nieder wrote:
 Eric James Michael Ritz wrote:

 When I came to my senses and realized that does not work I began to
 wonder if `git rm -u` should exist.  If any deleted, tracked files
 are not part of the index to commit then `git rm -u` would add that
 change to the index.

 I like it.  If you have time to write such a patch, I'll be happy to
 read it.

Thank you for the offer Jonathan.  I must go ahead and apologize for
my rusty ability with C; I haven’t needed to use the language in
years.  But I will familiarize myself with the Git source and try to
put a patch (or series of patches) together over the next week or two.

--
ejmr
南無妙法蓮華經

--
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, Git, git

2013-01-19 Thread Jonathan Nieder
Hi Thomas,

Thomas Ackermann wrote:

 Git changed its 'official' system name from 'GIT' to 'Git' in v1.6.5.3
 (as can be seen in the corresponding release note where 'GIT' was 
 changed to 'Git' in the header line).

 Alas the documention uses 'GIT', 'Git' or even 'git' to refer to the
 Git system. So change every occurrence of 'GIT and 'git' to 'Git'
 whenever Git as a system is referred to (but don't do this change
 in the release notes because they constitute a history orthogonal
 to the history versioned by Git).

I don't have any opinion about the subject at hand, except that making
a consistent convention and documenting it somewhere to avoid future
churn sounds like a fine idea.

Instead, I'm writing for a procedural nitpick ;-): please move the
above rationale to one of the commit messages, so it gets recorded
somewhere that future readers can easily find it.

Hope that helps,
Jonathan
--
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: Re: [PATCH 1/2] Change old system name 'GIT' to 'Git'

2013-01-19 Thread David Aguilar
On Sat, Jan 19, 2013 at 7:01 AM, Thomas Ackermann th.ac...@arcor.de wrote:


 What about GITweb?

 You are right; I missed that because I grepped only for 'GIT' as a whole word.
 'gitweb' and 'GITweb' should be changed to 'Gitweb'.


 IMO some of these look nicer when everything is lowercase.
 e.g. standard git committer ident format.

 IMHO what seems nicer here is the spelling we are all accustomed to.
 The whole point of my patch is to use 'Git' consistently when
 we are talking about the system and not the individual command.


 $ git grep 'git repositor' | wc -l
 226

 These changes touch, for example, git-clone.txt to make it
 say: Make a 'bare' Git repository.  Why not lowercase?

 When you also apply my second patch you only get 17 occurences of git 
 repository
 which I missed to change to 'Git repository' ...

 Thanks for looking into this!

Thank *you* for tackling these last 226 and listening to my silly opinions.
The end result will be much nicer all around.
-- 
David
--
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] INSTALL: git-p4 doesn't support Python 3

2013-01-19 Thread David Aguilar
On Sat, Jan 19, 2013 at 4:01 AM, John Keeping j...@keeping.me.uk wrote:
  Since Pyhton
 2.8 will never exist [1]

Tiny typo: Python misspelled as Pyhton
-- 
David
--
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