{"thread":{"id":"25269","subject":"Pull request for msysGit patches","startedAt":"2010-09-28T09:46:40Z","lastAt":"2010-11-07T19:11:04Z","messageCount":38,"participants":["Pat Thoyts","Junio C Hamano","Johannes Sixt","Erik Faye-Lund","Jonathan Nieder","Ævar Arnfjörð Bjarmason","Eric Sunshine","yj2133011","Ramsay Jones","Heiko Voigt"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"151889","messageId":"87ocbitd33.fsf@fox.patthoyts.tk","threadId":"25269","inReplyTo":null,"subject":"Pull request for msysGit patches","fromName":"Pat Thoyts","fromEmail":"patthoyts@users.sourceforge.net","sentAt":"2010-09-28T09:46:40Z","receivedAt":"2010-09-28T09:46:40Z","isPatch":false,"sender":{"key":"patthoyts@users.sourceforge.net","avatar":"https://avatars.githubusercontent.com/u/30739?v=4"},"body":"Junio,\n\nThe msysGit tree currently tracks some 50+ patches on top of 'next'. I\nhave gathered 42 of these that look good to move upstream. \nPlease pull from\n  git://repo.or.cz/git/mingw/4msysgit.git work/pt/for-junio\nalso visible for inspection at\n  http://repo.or.cz/w/git/mingw/4msysgit.git/shortlog/refs/heads/work/pt/for-junio\n\nOutput of git-request-pull....\n\nThe following changes since commit 2a10b71f738b8b77ba8d243574f537a54dbf9a62:\n\n  Merge branch 'mg/reset-doc' into next (2010-09-22 09:38:57 -0700)\n\nare available in the git repository at:\n\n  git://repo.or.cz/git/mingw/4msysgit.git work/pt/for-junio\n\nEric Sunshine (6):\n      Fix 'clone' failure at DOS root directory.\n      Fix Windows-specific macro redefinition warning.\n      Add MinGW-specific execv() override.\n      Side-step MSYS-specific path \"corruption\" leading to t5560 failure.\n      Side-step sed line-ending \"corruption\" leading to t6038 failure.\n      Side-step line-ending corruption leading to t3032 failures.\n\nErik Faye-Lund (6):\n      core.hidedotfiles: hide '.git' dir by default\n      mingw: do not hide bare repositories\n      mingw: fix st_mode for symlink dirs\n      send-email: accept absolute path even on Windows\n      config.c: trivial fix for compile-time warning\n      mingw: do not crash on open(NULL, ...)\n\nHeiko Voigt (4):\n      mingw: move unlink wrapper to mingw.c\n      mingw: work around irregular failures of unlink on windows\n      mingw: make failures to unlink or move raise a question\n      mingw: add fallback for rmdir in case directory is in use\n\nJohannes Schindelin (11):\n      Avoid TAGS/tags warning from GNU Make\n      When initializing .git/, record the current setting of core.hideDotFiles\n      git-am: fix absolute path logic on Windows\n      mingw_rmdir: set errno=ENOTEMPTY when appropriate\n      Add a Windows-specific fallback to getenv(\"HOME\");\n      Tests: make sure that $DIFF is non-empty\n      merge-octopus: Work around environment issue on Windows\n      Make sure that git_getpass() never returns NULL\n      Give commit message reencoding for output on MinGW a chance\n      Fix typo in pack-objects' usage\n      Fix compile error on MinGW\n\nJohannes Sixt (1):\n      criss cross rename failure workaround\n\nKarsten Blees (4):\n      Enable color output in Windows cmd.exe\n      Support Unicode console output on Windows\n      Detect console streams more reliably on Windows\n      Warn if the Windows console font doesn't support Unicode\n\nPat Thoyts (6):\n      Skip t1300.70 and 71 on msysGit.\n      fix mingw stat() and lstat() implementations for handling symlinks\n      Report errors when failing to launch the html browser in mingw.\n      mingw: add tests for the hidden attribute on the git directory\n      Do not strip CR when grepping HTTP headers.\n      Skip 'git archive --remote' test on msysGit\n\nSebastian Schuberth (2):\n      MinGW: Use pid_t more consequently, introduce uid_t for greater compatibility\n      MinGW: Add missing file mode bit defines\n\nbert Dvornik (2):\n      mingw: Don't ask the user yes/no questions if they can't see the question.\n      send-email: handle Windows paths for display just like we do for processing\n\n Documentation/config.txt            |    6 +\n Makefile                            |    2 +\n abspath.c                           |    7 +-\n builtin/config.c                    |    4 +-\n builtin/init-db.c                   |    1 +\n builtin/pack-objects.c              |    2 +-\n cache.h                             |    7 +\n compat/mingw.c                      |  296 +++++++++++++++++++++++++++++++++--\n compat/mingw.h                      |   63 +++++---\n compat/regex/regexec.c              |   20 ++-\n compat/winansi.c                    |  132 ++++++++++++----\n config.c                            |   11 ++-\n connect.c                           |    8 +-\n environment.c                       |    1 +\n git-am.sh                           |    2 +-\n git-compat-util.h                   |    8 +\n git-merge-octopus.sh                |    5 +\n git-send-email.perl                 |    4 +-\n log-tree.c                          |    3 +-\n path.c                              |    2 +-\n t/t0001-init.sh                     |   28 ++++\n t/t1300-repo-config.sh              |    6 +-\n t/t3032-merge-recursive-options.sh  |   11 +-\n t/t4130-apply-criss-cross-rename.sh |    4 +-\n t/t5000-tar-tree.sh                 |    2 +-\n t/t5503-tagfollow.sh                |    9 +-\n t/t5560-http-backend-noserver.sh    |    5 +-\n t/t6038-merge-text-auto.sh          |    4 +-\n t/test-lib.sh                       |    4 +\n 29 files changed, 556 insertions(+), 101 deletions(-)\n"},{"id":"151950","messageId":"7vocbhsn03.fsf@alter.siamese.dyndns.org","threadId":"25269","inReplyTo":"87ocbitd33.fsf@fox.patthoyts.tk","subject":"Re: Pull request for msysGit patches","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-09-28T19:10:04Z","receivedAt":"2010-09-28T19:10:04Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Pat Thoyts <patthoyts@users.sourceforge.net> writes:\n\n> Junio,\n>\n> The msysGit tree currently tracks some 50+ patches on top of 'next'. I\n> have gathered 42 of these that look good to move upstream. \n> Please pull from\n>   git://repo.or.cz/git/mingw/4msysgit.git work/pt/for-junio\n> also visible for inspection at\n>   http://repo.or.cz/w/git/mingw/4msysgit.git/shortlog/refs/heads/work/pt/for-junio\n\nSorry, I cannot pull anything based directly on top of 'next'.  However,\nexcept for the one that touch t/t3032-merge-recursive-options.sh at the\ntip, the series seem to apply cleanly to the tip of 'master'.\n\nThere seem to be many patches that touch outside compat/ area.  Have they\nbeen reviewed and discussed here already?\n\nA quick and superficial review follows.\n\n----------------------------------------------------------------\nabspath.c\n\n@@ -108,10 +108,15 @@ const char *make_nonrelative_path(const char *path)\n \t\tif (strlcpy(buf, path, PATH_MAX) >= PATH_MAX)\n \t\t\tdie(\"Too long path: %.*s\", 60, path);\n \t} else {\n+\t\tsize_t len;\n+\t\tconst char *fmt;\n \t\tconst char *cwd = get_pwd_cwd();\n \t\tif (!cwd)\n \t\t\tdie_errno(\"Cannot determine the current working directory\");\n-\t\tif (snprintf(buf, PATH_MAX, \"%s/%s\", cwd, path) >= PATH_MAX)\n+\t\tlen = strlen(cwd);\n+\t\t/* For cwd c:/, return c:/foo rather than URL-like c://foo */\n\nFor the patch to be regression free, the logic described by this comment\nrequires get_pwd_cmd() to return a string with trailing dir-sep only at\nslash.  IOW, if you see any non-root path returned with a trailing dir-sep\nfor whatever reason, you are changing the behaviour in that case as well,\nand that clearly is not \"fix at the root level\".\n\nBut if you label this as \"avoid duplicated dir-sep\", everything flows\nsmoothly ;-).\n\n+\t\tfmt = len > 0 && is_dir_sep(cwd[len-1]) ? \"%s%s\" : \"%s/%s\";\n\nPlease have () around \"len > 0 && is_dir_sep(cwd[len-1])\" for readability.\n\n+\t\tif (snprintf(buf, PATH_MAX, fmt, cwd, path) >= PATH_MAX)\n \t\t\tdie(\"Too long path: %.*s\", 60, path);\n\n----------------------------------------------------------------\nget_home_directory()\n\nThe patch looks fine, but the commit log message is way insufficient.  Can\nyou restate what problem it addresses, and why it is the best solution?\n\n----------------------------------------------------------------\nHide dotfiles\n\nIt is somewhat unfortunate that this Windows-only hack needs to touch\ncache.h and environment.c.\n\nhidedotfiles may currently be the only platform specific configuration\nvariable, but we might want to futureproof by abstracting this out,\nperhaps by adding a call to platform_core_config() at the end of\ngit_default_core_config(), provide a default implementation that is a\nno-op, and allow platforms to override it, or something like that?\n\n----------------------------------------------------------------\npack-objects.c usage string\nconnect.c use of unchecked git_getpass()\n\nGood eyes, but these should not be part of the series but applied to\nmaint.  If possible please send them separately.\n\n----------------------------------------------------------------\ncompat/regex/regexec.c\n\nThanks for fixing up my mess ;-)\n\n----------------------------------------------------------------\ngit-am.sh\n\nThis is questionable.  Does this mean that on POSIX boxes I cannot have my\npatch mailbox named 0:pt.patch, 1:pt.patch, etc.?\n\nAdding \"is_absolute_path\" helper that has a different implementation\ndepending on the platform in git-sh-setup and using it here would limit\nthe extent of damage?\n\n----------------------------------------------------------------\ngit-merge-octopus.sh\n\nTransliterating a-z to A-z may happen to work because A-z is A-Z with a\nlot of garbage concatenated at the end that won't be used, but it feels\nsloppy.\n\nWhy isn't upcasing necessary for all the other uses of environment\nvariables?  For example, we pass reflog action by exporting a variable,\nand we use GIT_AUTHOR_NAME and friends to override configuration\nvariables.  Do they get upcased?\n\nWhat I am getting at is that this might be just fixing a symptom, and\nbetween applying similar band-aid to many other places and finding out why\nundesired upcaing happens and fixing that, I'd rather see the latter done.\n\n----------------------------------------------------------------\ngit-send-email.perl\n\nSimilar comment as is_absolute_path(), although in Perl environment I\nsuspect we can just use an existing package without adding our own.\n\n----------------------------------------------------------------\nt/test-lib.sh\n\nIs \"DIFF=${DIFF:-diff}\" needed?  How is the existing initialization (in\n'maint') of GIT_TEST_CMP working?\n\n----------------------------------------------------------------\n\nI didn't look at tests very deeply.  Other changes outside compat/ that I\ndidn't mention above looked fine.\n\nThanks.\n"},{"id":"151957","messageId":"201009282252.25688.j6t@kdbg.org","threadId":"25269","inReplyTo":"87ocbitd33.fsf@fox.patthoyts.tk","subject":"Re: [msysGit] Pull request for msysGit patches","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2010-09-28T20:52:25Z","receivedAt":"2010-09-28T20:52:25Z","isPatch":false,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"On Dienstag, 28. September 2010, Pat Thoyts wrote:\n> Junio,\n>\n> The msysGit tree currently tracks some 50+ patches on top of 'next'. I\n> have gathered 42 of these that look good to move upstream.\n> Please pull from\n>   git://repo.or.cz/git/mingw/4msysgit.git work/pt/for-junio\n> also visible for inspection at\n>  \n> http://repo.or.cz/w/git/mingw/4msysgit.git/shortlog/refs/heads/work/pt/for-\n>junio\n\nThanks for picking up the baton.\n\nI've browsed through the list, and I'll annotate my opinion below. When I \nsay 'OK', then this means that the patch looks good, but it doesn't imply \nthat I have tested it.\n\n> Eric Sunshine (6):\n>       Fix 'clone' failure at DOS root directory.\n>       Fix Windows-specific macro redefinition warning.\n>       Add MinGW-specific execv() override.\n>       Side-step MSYS-specific path \"corruption\" leading to t5560 failure.\n>       Side-step sed line-ending \"corruption\" leading to t6038 failure.\n\nThese 5 are OK.\n\n>       Side-step line-ending corruption leading to t3032 failures.\n\nThis one has non-portable 'export foo=bar', but it is in a MinGW specific \npath, so it should be fine. But why do we need to export GREP_OPTIONS, but \nnot SED_OPTIONS?\n\n> Erik Faye-Lund (6):\n>       core.hidedotfiles: hide '.git' dir by default\n\nThis one was heavily disputed. Contrary to the subject line, the patch hides \nnot only .git, but all dot-files. I'm not exactly a friend of this behavior. \nTo hide only .git is OK, but every dot-file? The default setting of \ncore.hidedotfiles should be different, IMO.\n\nThe subject line must be fixed, and unlike Erik's claim in a post earlier this \nweek on the msysgit list, mingw_freopen blows up if filename ever happens to \nbe NULL when core.hidedotfiles is true.\n\n>       mingw: do not hide bare repositories\n\nOK if it is decided that the above goes in; but could also be squashed.\n\n>       mingw: fix st_mode for symlink dirs\n\nThis is a fix of Pat's \"fix mingw stat...for handling symlinks\" and should be \nsquashed into that one.\n\n>       send-email: accept absolute path even on Windows\n\nI'm neutral. I don't use send-email.\n\n>       config.c: trivial fix for compile-time warning\n\nThis is a fix for Dscho's getenv(\"HOME\") patch and must be squashed - \notherwise the commit message references a non-existent commit.\n\n>       mingw: do not crash on open(NULL, ...)\n\nThis one is bogus, and as it stands, it must have my Ack removed. :) Needs the \nsame fix in mingw_fopen as mingw_freopen. (There remains an unprotected \ndereference of filename.)\n\n> Heiko Voigt (4):\n>       mingw: move unlink wrapper to mingw.c\n\nOK, whether or not the next patch goes in.\n\n>       mingw: work around irregular failures of unlink on windows\n\nThe workaround is to retry the unlink() after a delay when it failed with \nEACCES. What happens if the EACCES is for a good reason? Doesn't this delay \nthe process by 71ms per unlink() invocation? Can't this become a problem if \nmany unlink()s are tried by git code?\n\n>       mingw: make failures to unlink or move raise a question\n\nGaah! But people seem to like it. Since the question is only triggered after \nall retries fail, I can live with this.\n\nBut isn't the implementation a bit sloppy? Can strlen(answer)-2 be negative? \nWhat happens if the user typed more than 4 characters? Wouldn't it leave data \nin the buffer for the next question?\n\n>       mingw: add fallback for rmdir in case directory is in use\n\nDepends on the previous patch. OK.\n\n> Johannes Schindelin (11):\n>       Avoid TAGS/tags warning from GNU Make\n\nOK.\n\n>       When initializing .git/, record the current setting of\n> core.hideDotFiles\n\nI'm neutral on this one. The commit message does not say why the change is \nneeded.\n\n>       git-am: fix absolute path logic on Windows \n\nThis mistakes a file that has a colon in the second position as absolute, even \non non-Windows. IIUC, this patch is not intended for upstream git.\n\n>       mingw_rmdir: set errno=ENOTEMPTY when appropriate\n\nOK. Good catch!\n\n>       Add a Windows-specific fallback to getenv(\"HOME\");\n\nIntroduces get_home_directory(). I'm a bit worried that it leaks the string \nthat it constructed.\n\n>       Tests: make sure that $DIFF is non-empty\n\nHasn't this been fixed in upstream already?\n\n>       merge-octopus: Work around environment issue on Windows\n\nThis works around MSYS DLL's \"feature\" to uppercase all environment variables. \nThis destroys the original names GITHEAD_$SHA1.\n\nThere is a small typo in the second range argument of the tr invocation: it \nshould be: tr a-z A-Z\n\n>       Make sure that git_getpass() never returns NULL\n\nThis is not Windows specific. OK.\n\n>       Give commit message reencoding for output on MinGW a chance\n\nThis is a change in log-tree.c, but has an effect only on Windows. OK.\n\n>       Fix typo in pack-objects' usage\n\nOK.\n\n>       Fix compile error on MinGW\n\nThis has been fixed in a different way in upstream. Please eject this patch.\n\n> Johannes Sixt (1):\n>       criss cross rename failure workaround\n\nThe patch text is OK, but I should really write a better commit message...\n\n> Karsten Blees (4):\n>       Enable color output in Windows cmd.exe\n\nThis makes it so that \"winansi\" is return by getenv(\"TERM\") when TERM is not \nset in the environment. What are the implications? It won't affect me because \nI've set TERM=cygwin. I'm neutral.\n\n>       Support Unicode console output on Windows\n\nI'm negative on this one because I think it will be a regression for me.\n\nIt assumes that all text written to the console is UTF8. I don't think that \nthis is a generally valid assumption. It might be for msysgit, but not when \ngit on Windows is used outside the msysgit bash or without the git.cmd \nwrapper.\n\n>       Detect console streams more reliably on Windows\n\nLooks good. OK.\n\n>       Warn if the Windows console font doesn't support Unicode\n\nMight be a good idea. The warning appears only when multi-byte characters are \nprinted. I can't tell how this behaves in non-western locales.\n\nDepends on the Unicode console output patch above.\n\n> Pat Thoyts (6):\n>       Skip t1300.70 and 71 on msysGit.\n>       fix mingw stat() and lstat() implementations for handling symlinks\n>       Report errors when failing to launch the html browser in mingw.\n\nThese 3 are OK.\n\n>       mingw: add tests for the hidden attribute on the git directory\n\nThe tests of the non-bare repository should be marked expect_failure or be \nsquashed into the core.hidedotfiles patch.\n\n>       Do not strip CR when grepping HTTP headers.\n\nexport foo=bar again. Is it necessary to export GREP_OPTIONS?\n\n>       Skip 'git archive --remote' test on msysGit\n\nOK, though the failure is not due missing git daemon support, but because we \ndo not have fork().\n\n> Sebastian Schuberth (2):\n>       MinGW: Use pid_t more consequently, introduce uid_t for greater\n> compatibility\n\nOK.\n\n>       MinGW: Add missing file mode bit defines \n\nOK, why not. It is not strictly necessary, I think, otherwise I would observe \nbuild failures, but I do not.\n\n> bert Dvornik (2):\n>       mingw: Don't ask the user yes/no questions if they can't see the\n> question.\n\nShould be squashed into the ask-yes-no patch.\n\n>       send-email: handle Windows paths for display just like we do for \n> processing\n\nI'm neutral. The solution is analogous to the git-am patch above, but slightly \nmore restrictive.\n\n-- Hannes\n"},{"id":"151959","messageId":"AANLkTikSxpXJkeneWbJQ_2g32w1bV-CEdyk2_5G2Xd+u@mail.gmail.com","threadId":"25269","inReplyTo":"201009282252.25688.j6t@kdbg.org","subject":"Re: [msysGit] Pull request for msysGit patches","fromName":"Erik Faye-Lund","fromEmail":"kusmabite@gmail.com","sentAt":"2010-09-28T20:58:13Z","receivedAt":"2010-09-28T20:58:13Z","isPatch":false,"sender":{"key":"kusmabite@gmail.com","avatar":"https://avatars.githubusercontent.com/u/47073?v=4"},"body":"On Tue, Sep 28, 2010 at 10:52 PM, Johannes Sixt <j6t@kdbg.org> wrote:\n>>       mingw: do not crash on open(NULL, ...)\n>\n> This one is bogus, and as it stands, it must have my Ack removed. :) Needs the\n> same fix in mingw_fopen as mingw_freopen. (There remains an unprotected\n> dereference of filename.)\n>\n\nI believe the version in for-junio already has this fix squashed in.\nThe following hunk, taken from\nhttp://repo.or.cz/w/git/mingw/4msysgit.git/blobdiff/4e93566b07dcf47ecb6484d225418c04c1eedee6..b18500977d88b13803ecc60cf383538139ec09d8:/compat/mingw.c\nshows that it is... Or are you thinking of something else?\n\n@@ -346,7 +346,7 @@ FILE *mingw_fopen (const char *filename, const char *otype)\n \tif (hide_dotfiles == HIDE_DOTFILES_TRUE &&\n \tbasename((char*)filename)[0] == '.')\n \t\thide = access(filename, F_OK);\n-\tif (!strcmp(filename, \"/dev/null\"))\n+\tif (filename && !strcmp(filename, \"/dev/null\"))\n \t\tfilename = \"nul\";\n \tfile = fopen(filename, otype);\n \tif (file && hide && make_hidden(filename))\n"},{"id":"151960","messageId":"20100928210837.GA8317@capella.cs.uchicago.edu","threadId":"25269","inReplyTo":"201009282252.25688.j6t@kdbg.org","subject":"Re: [msysGit] Pull request for msysGit patches","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2010-09-28T21:08:38Z","receivedAt":"2010-09-28T21:08:38Z","isPatch":false,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Johannes Sixt wrote:\n> On Dienstag, 28. September 2010, Pat Thoyts wrote:\n\n>> Johannes Schindelin (11):\n>>       Avoid TAGS/tags warning from GNU Make\n>\n> OK.\n\nWasn't this one reviewed on-list recently?\n\n-- 8< --\nFrom: Junio C Hamano <gitster@pobox.com>\nSubject: MinGW: avoid collisions between \"tags\" and \"TAGS\"\n\nOn case insensitive filesystems, \"tags\" and \"TAGS\" target will try to\noverwrite the same file.  Allow MinGW to use \"ETAGS\" instead.\n\nThese two targets do produce real files; do not put them on .PHONY target\nlist.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\nSigned-off-by: Jonathan Nieder <jrnieder@gmail.com>\n---\n Makefile |   15 +++++++++------\n 1 files changed, 9 insertions(+), 6 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex b7a62cf..d3dcfb1 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -390,6 +390,8 @@ SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH)) \\\n \t  $(patsubst %.py,%,$(SCRIPT_PYTHON)) \\\n \t  git-instaweb\n \n+ETAGS_TARGET = TAGS\n+\n # Empty...\n EXTRA_PROGRAMS =\n \n@@ -1122,6 +1124,7 @@ ifneq (,$(findstring MINGW,$(uname_S)))\n \tNO_REGEX = YesPlease\n \tNO_PYTHON = YesPlease\n \tBLK_SHA1 = YesPlease\n+\tETAGS_TARGET = ETAGS\n \tCOMPAT_CFLAGS += -D__USE_MINGW_ACCESS -DNOGDI -Icompat -Icompat/fnmatch -Icompat/win32\n \tCOMPAT_CFLAGS += -DSTRIP_EXTENSION=\\\".exe\\\"\n \tCOMPAT_OBJS += compat/mingw.o compat/fnmatch/fnmatch.o compat/winansi.o \\\n@@ -1961,11 +1964,11 @@ info:\n pdf:\n \t$(MAKE) -C Documentation pdf\n \n-TAGS:\n-\t$(RM) TAGS\n-\t$(FIND) . -name '*.[hcS]' -print | xargs etags -a\n+$(ETAGS_TARGET): FORCE\n+\t$(RM) $(ETAGS_TARGET)\n+\t$(FIND) . -name '*.[hcS]' -print | xargs etags -a -o $(ETAGS_TARGET)\n \n-tags:\n+tags: FORCE\n \t$(RM) tags\n \t$(FIND) . -name '*.[hcS]' -print | xargs ctags -a\n \n@@ -2235,7 +2238,7 @@ clean:\n \t$(RM) $(TEST_PROGRAMS)\n \t$(RM) -r bin-wrappers\n \t$(RM) -r $(dep_dirs)\n-\t$(RM) *.spec *.pyc *.pyo */*.pyc */*.pyo common-cmds.h TAGS tags cscope*\n+\t$(RM) *.spec *.pyc *.pyo */*.pyc */*.pyo common-cmds.h $(ETAGS_TARGET) tags cscope*\n \t$(RM) -r autom4te.cache\n \t$(RM) config.log config.mak.autogen config.mak.append config.status config.cache\n \t$(RM) -r $(GIT_TARNAME) .doc-tmp-dir\n@@ -2259,7 +2262,7 @@ endif\n \n .PHONY: all install clean strip\n .PHONY: shell_compatibility_test please_set_SHELL_PATH_to_a_more_modern_shell\n-.PHONY: FORCE TAGS tags cscope\n+.PHONY: FORCE cscope\n \n ### Check documentation\n #\n-- \n1.7.3.1.gd86b1\n"},{"id":"151962","messageId":"201009282311.01703.j6t@kdbg.org","threadId":"25269","inReplyTo":"7vocbhsn03.fsf@alter.siamese.dyndns.org","subject":"Re: [msysGit] Re: Pull request for msysGit patches","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2010-09-28T21:11:01Z","receivedAt":"2010-09-28T21:11:01Z","isPatch":false,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"On Dienstag, 28. September 2010, Junio C Hamano wrote:\n> git-merge-octopus.sh\n>\n> Why isn't upcasing necessary for all the other uses of environment\n> variables?  For example, we pass reflog action by exporting a variable,\n> and we use GIT_AUTHOR_NAME and friends to override configuration\n> variables.  Do they get upcased?\n\nIt is the environment variable *names* that get upper-cased, not the values. \nThe variable name that was set for use by git-merge-octopus is of the form \nGITHEAD_deadbeef, but inside git-merge-octopus, the name is GITHEAD_DEADBEEF. \nOnly MSYS programs like bash, but not native Windows programs like git, \nsuffer from this.\n\n-- Hannes\n"},{"id":"151963","messageId":"201009282313.48278.j6t@kdbg.org","threadId":"25269","inReplyTo":"AANLkTikSxpXJkeneWbJQ_2g32w1bV-CEdyk2_5G2Xd+u@mail.gmail.com","subject":"Re: [msysGit] Pull request for msysGit patches","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2010-09-28T21:13:48Z","receivedAt":"2010-09-28T21:13:48Z","isPatch":false,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"On Dienstag, 28. September 2010, Erik Faye-Lund wrote:\n> On Tue, Sep 28, 2010 at 10:52 PM, Johannes Sixt <j6t@kdbg.org> wrote:\n> >>       mingw: do not crash on open(NULL, ...)\n> >\n> > This one is bogus, and as it stands, it must have my Ack removed. :)\n> > Needs the same fix in mingw_fopen as mingw_freopen. (There remains an\n> > unprotected dereference of filename.)\n>\n> I believe the version in for-junio already has this fix squashed in.\n> The following hunk, taken from\n> http://repo.or.cz/w/git/mingw/4msysgit.git/blobdiff/4e93566b07dcf47ecb6484d\n>225418c04c1eedee6..b18500977d88b13803ecc60cf383538139ec09d8:/compat/mingw.c\n> shows that it is... Or are you thinking of something else?\n>\n> @@ -346,7 +346,7 @@ FILE *mingw_fopen (const char *filename, const char\n>\tif (hide_dotfiles == HIDE_DOTFILES_TRUE &&\n>  \tbasename((char*)filename)[0] == '.')\n                        ^^^^^^^^\nThis can crash, too.\n\n>  \t\thide = access(filename, F_OK);\n> -\tif (!strcmp(filename, \"/dev/null\"))\n> +\tif (filename && !strcmp(filename, \"/dev/null\"))\n>  \t\tfilename = \"nul\";\n>  \tfile = fopen(filename, otype);\n>  \tif (file && hide && make_hidden(filename))\n\n-- Hannes\n"},{"id":"151964","messageId":"AANLkTikpDwEJR8rAk+R0auXN5y-G1Cd4z8djoL0VzTYw@mail.gmail.com","threadId":"25269","inReplyTo":"201009282313.48278.j6t@kdbg.org","subject":"Re: [msysGit] Pull request for msysGit patches","fromName":"Erik Faye-Lund","fromEmail":"kusmabite@gmail.com","sentAt":"2010-09-28T21:20:38Z","receivedAt":"2010-09-28T21:20:38Z","isPatch":false,"sender":{"key":"kusmabite@gmail.com","avatar":"https://avatars.githubusercontent.com/u/47073?v=4"},"body":"On Tue, Sep 28, 2010 at 11:13 PM, Johannes Sixt <j6t@kdbg.org> wrote:\n> On Dienstag, 28. September 2010, Erik Faye-Lund wrote:\n>> On Tue, Sep 28, 2010 at 10:52 PM, Johannes Sixt <j6t@kdbg.org> wrote:\n>> >>       mingw: do not crash on open(NULL, ...)\n>> >\n>> > This one is bogus, and as it stands, it must have my Ack removed. :)\n>> > Needs the same fix in mingw_fopen as mingw_freopen. (There remains an\n>> > unprotected dereference of filename.)\n>>\n>> I believe the version in for-junio already has this fix squashed in.\n>> The following hunk, taken from\n>> http://repo.or.cz/w/git/mingw/4msysgit.git/blobdiff/4e93566b07dcf47ecb6484d\n>>225418c04c1eedee6..b18500977d88b13803ecc60cf383538139ec09d8:/compat/mingw.c\n>> shows that it is... Or are you thinking of something else?\n>>\n>> @@ -346,7 +346,7 @@ FILE *mingw_fopen (const char *filename, const char\n>>       if (hide_dotfiles == HIDE_DOTFILES_TRUE &&\n>>       basename((char*)filename)[0] == '.')\n>                        ^^^^^^^^\n> This can crash, too.\n>\n\nAh, indeed. Thanks for pointing that out! I'll send out a new version,\nwith this squashed on top:\n\ndiff --git a/compat/mingw.c b/compat/mingw.c\nindex 2fbe381..2584e9f 100644\n--- a/compat/mingw.c\n+++ b/compat/mingw.c\n@@ -343,11 +343,13 @@ FILE *mingw_fopen (const char *filename, const\nchar *otype)\n {\n \tint hide = 0;\n \tFILE *file;\n-\tif (hide_dotfiles == HIDE_DOTFILES_TRUE &&\n-\t    basename((char*)filename)[0] == '.')\n-\t\thide = access(filename, F_OK);\n-\tif (filename && !strcmp(filename, \"/dev/null\"))\n-\t\tfilename = \"nul\";\n+\tif (filename) {\n+\t\tif (hide_dotfiles == HIDE_DOTFILES_TRUE &&\n+\t\t    basename((char*)filename)[0] == '.')\n+\t\t\thide = access(filename, F_OK);\n+\t\tif (!strcmp(filename, \"/dev/null\"))\n+\t\t\tfilename = \"nul\";\n+\t}\n \tfile = fopen(filename, otype);\n \tif (file && hide && make_hidden(filename))\n \t\twarning(\"Could not mark '%s' as hidden.\", filename);\n@@ -359,11 +361,13 @@ FILE *mingw_freopen (const char *filename, const\nchar *otype, FILE *stream)\n {\n \tint hide = 0;\n \tFILE *file;\n-\tif (hide_dotfiles == HIDE_DOTFILES_TRUE &&\n-\t    basename((char*)filename)[0] == '.')\n-\t\thide = access(filename, F_OK);\n-\tif (filename && !strcmp(filename, \"/dev/null\"))\n-\t\tfilename = \"nul\";\n+\tif (filename) {\n+\t\tif (hide_dotfiles == HIDE_DOTFILES_TRUE &&\n+\t\t    basename((char*)filename)[0] == '.')\n+\t\t\thide = access(filename, F_OK);\n+\t\tif (!strcmp(filename, \"/dev/null\"))\n+\t\t\tfilename = \"nul\";\n+\t}\n \tfile = freopen(filename, otype, stream);\n \tif (file && hide && make_hidden(filename))\n \t\twarning(\"Could not mark '%s' as hidden.\", filename);\n"},{"id":"151965","messageId":"AANLkTinpSwuhT1_wtqNBeXLCud-F0bLBUgbohdtPp+8R@mail.gmail.com","threadId":"25269","inReplyTo":"7vocbhsn03.fsf@alter.siamese.dyndns.org","subject":"Re: Pull request for msysGit patches","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-09-28T21:23:19Z","receivedAt":"2010-09-28T21:23:19Z","isPatch":false,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Tue, Sep 28, 2010 at 19:10, Junio C Hamano <gitster@pobox.com> wrote:\n\n> git-send-email.perl\n>\n> Similar comment as is_absolute_path(), although in Perl environment I\n> suspect we can just use an existing package without adding our own.\n\nIt seems to me that the code added by Erik Faye-Lund in\n33b2e81f84875bf515b4c0de830eeddfd04227dc and this new code in\n\"send-email: handle Windows paths for display just like we do for\nprocessing\" by bert could both be replaced by:\n\n    use File::Spec::Functions qw(file_name_is_absolute);\n    file_name_is_absolute($some_path);\n\nAnd by doing so we'd also be compatible with e.g. VMS. Can the people\nwith the odd non-Unix systems maybe try this out and see if it works?\n:)\n"},{"id":"151967","messageId":"AANLkTincfqV08juL0LPi4k_neCemqeS=13XSBgEq6FPK@mail.gmail.com","threadId":"25269","inReplyTo":"AANLkTikpDwEJR8rAk+R0auXN5y-G1Cd4z8djoL0VzTYw@mail.gmail.com","subject":"Re: [msysGit] Pull request for msysGit patches","fromName":"Erik Faye-Lund","fromEmail":"kusmabite@gmail.com","sentAt":"2010-09-28T21:35:38Z","receivedAt":"2010-09-28T21:35:38Z","isPatch":false,"sender":{"key":"kusmabite@gmail.com","avatar":"https://avatars.githubusercontent.com/u/47073?v=4"},"body":"On Tue, Sep 28, 2010 at 11:20 PM, Erik Faye-Lund <kusmabite@gmail.com> wrote:\n> On Tue, Sep 28, 2010 at 11:13 PM, Johannes Sixt <j6t@kdbg.org> wrote:\n>> On Dienstag, 28. September 2010, Erik Faye-Lund wrote:\n>>> On Tue, Sep 28, 2010 at 10:52 PM, Johannes Sixt <j6t@kdbg.org> wrote:\n>>> >>       mingw: do not crash on open(NULL, ...)\n>>> >\n>>> > This one is bogus, and as it stands, it must have my Ack removed. :)\n>>> > Needs the same fix in mingw_fopen as mingw_freopen. (There remains an\n>>> > unprotected dereference of filename.)\n>>>\n>>> I believe the version in for-junio already has this fix squashed in.\n>>> The following hunk, taken from\n>>> http://repo.or.cz/w/git/mingw/4msysgit.git/blobdiff/4e93566b07dcf47ecb6484d\n>>>225418c04c1eedee6..b18500977d88b13803ecc60cf383538139ec09d8:/compat/mingw.c\n>>> shows that it is... Or are you thinking of something else?\n>>>\n>>> @@ -346,7 +346,7 @@ FILE *mingw_fopen (const char *filename, const char\n>>>       if (hide_dotfiles == HIDE_DOTFILES_TRUE &&\n>>>       basename((char*)filename)[0] == '.')\n>>                        ^^^^^^^^\n>> This can crash, too.\n>>\n>\n> Ah, indeed. Thanks for pointing that out! I'll send out a new version,\n> with this squashed on top:\n>\n\nAnd now that I assemble it, I all of a sudden understand where your\ncomplaint came from. The issue wasn't in the original patch, it was\nintroduced when the patch was applied.\n\nBasically, I introduced a similar crash-bug to the one this patch\nfixes in the original hide-dotfiles patch, and my this patch was\nwritten against junio's master, which doesn't contain that newer bug.\n\nI also seem to remember there being some controversy over the\nhide-dotfiles series, whether or not it was in git's scope to allow\nhiding non-dotgit files at all etc. So, perhaps what makes the most\nsense would be to eject the hide-dotfiles stuff out of for-junio, and\nrework it on top, going through the main git mailing list? That series\ndid get quite a bit messy as patches were applied a little too quickly\nIMO.\n"},{"id":"152008","messageId":"4CA29E06.705@sunshineco.com","threadId":"25269","inReplyTo":"7vocbhsn03.fsf@alter.siamese.dyndns.org","subject":"Re: [msysGit] Re: Pull request for msysGit patches","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2010-09-29T02:01:42Z","receivedAt":"2010-09-29T02:01:42Z","isPatch":false,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"Hi Junio,\n\nOn 9/28/2010 3:10 PM, Junio C Hamano wrote:\n> Pat Thoyts<patthoyts@users.sourceforge.net>  writes:\n>> Junio,\n>> The msysGit tree currently tracks some 50+ patches on top of 'next'. I\n>> have gathered 42 of these that look good to move upstream.\n>\n> A quick and superficial review follows.\n> ----------------------------------------------------------------\n> abspath.c\n>\n> @@ -108,10 +108,15 @@ const char *make_nonrelative_path(const char *path)\n>   \t\tif (strlcpy(buf, path, PATH_MAX)>= PATH_MAX)\n>   \t\t\tdie(\"Too long path: %.*s\", 60, path);\n>   \t} else {\n> +\t\tsize_t len;\n> +\t\tconst char *fmt;\n>   \t\tconst char *cwd = get_pwd_cwd();\n>   \t\tif (!cwd)\n>   \t\t\tdie_errno(\"Cannot determine the current working directory\");\n> -\t\tif (snprintf(buf, PATH_MAX, \"%s/%s\", cwd, path)>= PATH_MAX)\n> +\t\tlen = strlen(cwd);\n> +\t\t/* For cwd c:/, return c:/foo rather than URL-like c://foo */\n>\n> For the patch to be regression free, the logic described by this comment\n> requires get_pwd_cmd() to return a string with trailing dir-sep only at\n> slash.  IOW, if you see any non-root path returned with a trailing dir-sep\n> for whatever reason, you are changing the behaviour in that case as well,\n> and that clearly is not \"fix at the root level\".\n> But if you label this as \"avoid duplicated dir-sep\", everything flows\n> smoothly ;-).\n\nI am the author of this patch. Do I understand correctly that your \nprimary concern is that you find the comment misleading? I consider the code\n\n   fmt = (len > 0 && is_dir_sep(cwd[len-1])) ? \"%s%s\" : \"%s/%s\";\n\nsufficiently self-documenting that the comment is superfluous, and would \nbe happy to remove the comment. Would you prefer the patch submitted \nwith the comment removed?\n\n-- ES\n"},{"id":"152009","messageId":"4CA2A32E.3050802@sunshineco.com","threadId":"25269","inReplyTo":"201009282252.25688.j6t@kdbg.org","subject":"Re: [msysGit] Pull request for msysGit patches","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2010-09-29T02:23:42Z","receivedAt":"2010-09-29T02:23:42Z","isPatch":false,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"Hi Hannes,\n\nOn 9/28/2010 4:52 PM, Johannes Sixt wrote:\n> On Dienstag, 28. September 2010, Pat Thoyts wrote:\n>> Junio,\n>>\n>> The msysGit tree currently tracks some 50+ patches on top of 'next'. I\n>> have gathered 42 of these that look good to move upstream.\n>\n> I've browsed through the list, and I'll annotate my opinion below. When I\n> say 'OK', then this means that the patch looks good, but it doesn't imply\n> that I have tested it.\n>\n>>        Side-step line-ending corruption leading to t3032 failures.\n>\n> This one has non-portable 'export foo=bar', but it is in a MinGW specific\n> path, so it should be fine. But why do we need to export GREP_OPTIONS, but\n> not SED_OPTIONS?\n\nI also normally avoid unportable 'export foo=bar'. In the particular \ncase of GREP_OPTIONS, when commenting on my original patch submission, \nDscho suggested 'test_have_prereq MINGW && export GREP_OPTIONS=foo' so \nthat is the form which made it into the final patch. While considering \nwhether this unportable usage was worthwhile, I took into consideration \nthe fact that a much more senior project member preferred it, that the \nMinGW-specific build environment is Bash-based, and that a couple other \ntest scripts (t1509, t5560) also employ this form. If preferred, the \npatches can be re-submitted to avoid the unportable usage.\n\nRegarding exporting GREP_OPTIONS but not SED_OPTIONS: grep explicitly \nrecognizes the GREP_OPTIONS environment variable. My original patch did \nnot export GREP_OPTIONS, but instead referenced it as $GREP_OPTIONS in \nthe grep invocation. Upon review, Dscho preferred the variable to be \nexported rather than referenced manually as $GREP_OPTIONS. sed, on the \nother hand, does not recognize any 'options' environment variable. It is \nnecessary, therefore, to interpolate $SED_OPTIONS directly during the \nsed invocation. This variable is therefore local to the script and need \nnot be exported.\n\n-- ES\n"},{"id":"152010","messageId":"7vfwwtrzi7.fsf@alter.siamese.dyndns.org","threadId":"25269","inReplyTo":"4CA2A32E.3050802@sunshineco.com","subject":"Re: [msysGit] Pull request for msysGit patches","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-09-29T03:37:36Z","receivedAt":"2010-09-29T03:37:36Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Eric Sunshine <sunshine@sunshineco.com> writes:\n\n> I also normally avoid unportable 'export foo=bar'. In the particular\n> case of GREP_OPTIONS, when commenting on my original patch submission,\n> Dscho suggested 'test_have_prereq MINGW && export GREP_OPTIONS=foo' so\n> that is the form which made it into the final patch.\n\nWell, since bbc09c2 (grep: rip out support for external grep, 2010-01-12)\nwe do not run external grep at all, so GREP_OPTIONS is irrelevant.\n\nUnless you are planning to run tests on installed version of git older\nthan v1.7.0, that is ;-).\n"},{"id":"152011","messageId":"7v4od9rzb8.fsf@alter.siamese.dyndns.org","threadId":"25269","inReplyTo":"201009282311.01703.j6t@kdbg.org","subject":"Re: [msysGit] Re: Pull request for msysGit patches","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-09-29T03:41:47Z","receivedAt":"2010-09-29T03:41:47Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Sixt <j6t@kdbg.org> writes:\n\n> On Dienstag, 28. September 2010, Junio C Hamano wrote:\n>> git-merge-octopus.sh\n>>\n>> Why isn't upcasing necessary for all the other uses of environment\n>> variables?  For example, we pass reflog action by exporting a variable,\n>> and we use GIT_AUTHOR_NAME and friends to override configuration\n>> variables.  Do they get upcased?\n>\n> It is the environment variable *names* that get upper-cased, not the values. \n\nAh, of course. I should have noticed it if I read the patch more carefully.\n\nThanks for an explanation.\n"},{"id":"152012","messageId":"4CA2B869.6090207@sunshineco.com","threadId":"25269","inReplyTo":"7vbp7hrzhb.fsf@alter.siamese.dyndns.org","subject":"Re: [msysGit] Re: Pull request for msysGit patches","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2010-09-29T03:54:17Z","receivedAt":"2010-09-29T03:54:17Z","isPatch":false,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On 9/28/2010 11:38 PM, Junio C Hamano wrote:\n> Eric Sunshine<sunshine@sunshineco.com>  writes:\n>\n>> I am the author of this patch. Do I understand correctly that your\n>> primary concern is that you find the comment misleading? I consider\n>> the code\n>>\n>>    fmt = (len>  0&&  is_dir_sep(cwd[len-1])) ? \"%s%s\" : \"%s/%s\";\n>>\n>> sufficiently self-documenting that the comment is superfluous, and\n>> would be happy to remove the comment. Would you prefer the patch\n>> submitted with the comment removed?\n>\n> Yeah, that sounds sensible.  Thanks.\n\nThank you for the response. I will re-submit the patch with the noted \nchanges: (1) parentheses surrounding conditional expression, (2) removal \nof superfluous comment.\n\n-- ES\n"},{"id":"152013","messageId":"4CA2BDDE.6040100@sunshineco.com","threadId":"25269","inReplyTo":"7vfwwtrzi7.fsf@alter.siamese.dyndns.org","subject":"Re: [msysGit] Pull request for msysGit patches","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2010-09-29T04:17:34Z","receivedAt":"2010-09-29T04:17:34Z","isPatch":false,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On 9/28/2010 11:37 PM, Junio C Hamano wrote:\n> Eric Sunshine<sunshine@sunshineco.com>  writes:\n>> I also normally avoid unportable 'export foo=bar'. In the particular\n>> case of GREP_OPTIONS, when commenting on my original patch submission,\n>> Dscho suggested 'test_have_prereq MINGW&&  export GREP_OPTIONS=foo' so\n>> that is the form which made it into the final patch.\n>\n> Well, since bbc09c2 (grep: rip out support for external grep, 2010-01-12)\n> we do not run external grep at all, so GREP_OPTIONS is irrelevant.\n>\n> Unless you are planning to run tests on installed version of git older\n> than v1.7.0, that is ;-).\n\nThe patches in question involve test scripts which themselves invoke \nexternal grep for various reasons. An example is t5560 where external \ngrep is invoked to extract the Status: header from an HTTP response. The \npatches fix instances where grep invocations give incorrect results on \nWindows due to grep undesirably swallowing CR from CRLF line-terminators \nin the few tests where those terminators are actually significant (such \nas t5560). In the context of these test scripts, external grep is still \nemployed, so GREP_OPTIONS may still be relevant.\n\n-- ES\n"},{"id":"152021","messageId":"1285740685987-5582620.post@n2.nabble.com","threadId":"25269","inReplyTo":"87ocbitd33.fsf@fox.patthoyts.tk","subject":"Re: Pull request for msysGit patches","fromName":"yj2133011","fromEmail":"274040551@qq.com","sentAt":"2010-09-29T06:11:25Z","receivedAt":"2010-09-29T06:11:25Z","isPatch":false,"sender":{"key":"274040551@qq.com","avatar":null},"body":"\nThis struct for now is just a wrapper for the current pathspec form:\nconst char **. It is intended to be extended with more useful\npathspec-related information over time.\n\nThe data structure for passing pathspec around remains const char **,\nstruct pathspec will be initialized locally to be used and destroyed.\nHopefully all pathspec related code will be gradually migrated to pass\nthis struct instead.\n\n\n-----\nThe voice input and output is very good in this \nhttp://www.tomtop.com/black-ps3-wireless-bluetooth-headset-for-playstation-3.html?aid=z\nWireless PS3 Headset . It is compatible with all PS3 games.Buy from Reliable \nhttp://www.tomtop.com/google-android-7-notebook-3g-tablet-pc-umpc-wifi-mid-pda.html?aid=z\nGoogle Android PC  apad Wholesalers.\n-- \nView this message in context: http://git.661346.n2.nabble.com/Pull-request-for-msysGit-patches-tp5578682p5582620.html\nSent from the git mailing list archive at Nabble.com.\n"},{"id":"152071","messageId":"7vhbh8o2ui.fsf@alter.siamese.dyndns.org","threadId":"25269","inReplyTo":"20100928210837.GA8317@capella.cs.uchicago.edu","subject":"Re: [msysGit] Pull request for msysGit patches","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-09-29T17:51:17Z","receivedAt":"2010-09-29T17:51:17Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jonathan Nieder <jrnieder@gmail.com> writes:\n\n> Johannes Sixt wrote:\n>> On Dienstag, 28. September 2010, Pat Thoyts wrote:\n>\n>>> Johannes Schindelin (11):\n>>>       Avoid TAGS/tags warning from GNU Make\n>>\n>> OK.\n>\n> Wasn't this one reviewed on-list recently?\n\nYeah, I remember it vaguely ;-)\n\nAlthough I do not care very much either way, this probably is a better\napproach, I think, if there are people on MinGW and/or OS/X who use\ntags/etags.\n\nWill queue.\n\n> -- 8< --\n> From: Junio C Hamano <gitster@pobox.com>\n> Subject: MinGW: avoid collisions between \"tags\" and \"TAGS\"\n>\n> On case insensitive filesystems, \"tags\" and \"TAGS\" target will try to\n> overwrite the same file.  Allow MinGW to use \"ETAGS\" instead.\n>\n> These two targets do produce real files; do not put them on .PHONY target\n> list.\n>\n> Signed-off-by: Junio C Hamano <gitster@pobox.com>\n> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>\n> ---\n>  Makefile |   15 +++++++++------\n>  1 files changed, 9 insertions(+), 6 deletions(-)\n>\n> diff --git a/Makefile b/Makefile\n> index b7a62cf..d3dcfb1 100644\n> --- a/Makefile\n> +++ b/Makefile\n> @@ -390,6 +390,8 @@ SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH)) \\\n>  \t  $(patsubst %.py,%,$(SCRIPT_PYTHON)) \\\n>  \t  git-instaweb\n>  \n> +ETAGS_TARGET = TAGS\n> +\n>  # Empty...\n>  EXTRA_PROGRAMS =\n>  \n> @@ -1122,6 +1124,7 @@ ifneq (,$(findstring MINGW,$(uname_S)))\n>  \tNO_REGEX = YesPlease\n>  \tNO_PYTHON = YesPlease\n>  \tBLK_SHA1 = YesPlease\n> +\tETAGS_TARGET = ETAGS\n>  \tCOMPAT_CFLAGS += -D__USE_MINGW_ACCESS -DNOGDI -Icompat -Icompat/fnmatch -Icompat/win32\n>  \tCOMPAT_CFLAGS += -DSTRIP_EXTENSION=\\\".exe\\\"\n>  \tCOMPAT_OBJS += compat/mingw.o compat/fnmatch/fnmatch.o compat/winansi.o \\\n> @@ -1961,11 +1964,11 @@ info:\n>  pdf:\n>  \t$(MAKE) -C Documentation pdf\n>  \n> -TAGS:\n> -\t$(RM) TAGS\n> -\t$(FIND) . -name '*.[hcS]' -print | xargs etags -a\n> +$(ETAGS_TARGET): FORCE\n> +\t$(RM) $(ETAGS_TARGET)\n> +\t$(FIND) . -name '*.[hcS]' -print | xargs etags -a -o $(ETAGS_TARGET)\n>  \n> -tags:\n> +tags: FORCE\n>  \t$(RM) tags\n>  \t$(FIND) . -name '*.[hcS]' -print | xargs ctags -a\n>  \n> @@ -2235,7 +2238,7 @@ clean:\n>  \t$(RM) $(TEST_PROGRAMS)\n>  \t$(RM) -r bin-wrappers\n>  \t$(RM) -r $(dep_dirs)\n> -\t$(RM) *.spec *.pyc *.pyo */*.pyc */*.pyo common-cmds.h TAGS tags cscope*\n> +\t$(RM) *.spec *.pyc *.pyo */*.pyc */*.pyo common-cmds.h $(ETAGS_TARGET) tags cscope*\n>  \t$(RM) -r autom4te.cache\n>  \t$(RM) config.log config.mak.autogen config.mak.append config.status config.cache\n>  \t$(RM) -r $(GIT_TARNAME) .doc-tmp-dir\n> @@ -2259,7 +2262,7 @@ endif\n>  \n>  .PHONY: all install clean strip\n>  .PHONY: shell_compatibility_test please_set_SHELL_PATH_to_a_more_modern_shell\n> -.PHONY: FORCE TAGS tags cscope\n> +.PHONY: FORCE cscope\n>  \n>  ### Check documentation\n>  #\n> -- \n> 1.7.3.1.gd86b1\n"},{"id":"152180","messageId":"4CA3A614.1010203@ramsay1.demon.co.uk","threadId":"25269","inReplyTo":"87ocbitd33.fsf@fox.patthoyts.tk","subject":"Re: Pull request for msysGit patches","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsay1.demon.co.uk","sentAt":"2010-09-29T20:48:20Z","receivedAt":"2010-09-29T20:48:20Z","isPatch":false,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"Pat Thoyts wrote:\n> Junio,\n> \n> The msysGit tree currently tracks some 50+ patches on top of 'next'. I\n> have gathered 42 of these that look good to move upstream. \n> Please pull from\n>   git://repo.or.cz/git/mingw/4msysgit.git work/pt/for-junio\n> also visible for inspection at\n>   http://repo.or.cz/w/git/mingw/4msysgit.git/shortlog/refs/heads/work/pt/for-junio\n> \n> Output of git-request-pull....\n\nI am carrying a patch by Peter Harris (Modify MSVC wrapper script) in my\nrepo, which I would hope could be included soon. I have never used 4msysgit.git\n(I thought it was no longer used, except for building installers!), but I\njust had a quick look via the web interface - the commit I'm referring to is\ncommit 358f1be616da601b2169463521d409a8aa86466a (Modify MSVC wrapper script,\n2010-07-05).\n\n[Note the \"Fix MSVC build\" companion commit was not needed on git.git]\n\nATB,\nRamsay Jones\n"},{"id":"152097","messageId":"1285798953-15320-1-git-send-email-patthoyts@users.sourceforge.net","threadId":"25269","inReplyTo":"7vocbhsn03.fsf@alter.siamese.dyndns.org","subject":"msysGit patches for upstream","fromName":"Pat Thoyts","fromEmail":"patthoyts@users.sourceforge.net","sentAt":"2010-09-29T22:22:31Z","receivedAt":"2010-09-29T22:22:31Z","isPatch":false,"sender":{"key":"patthoyts@users.sourceforge.net","avatar":"https://avatars.githubusercontent.com/u/30739?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> pack-objects.c usage string\n> connect.c use of unchecked git_getpass()\n>\n> Good eyes, but these should not be part of the series but applied to\n> maint.  If possible please send them separately.\n\nFollowing up on this comment here are the two patches from msysGit.\n\nPat.\n"},{"id":"152098","messageId":"1285798953-15320-2-git-send-email-patthoyts@users.sourceforge.net","threadId":"25269","inReplyTo":"7vocbhsn03.fsf@alter.siamese.dyndns.org","subject":"[PATCH 1/2] Make sure that git_getpass() never returns NULL","fromName":"Pat Thoyts","fromEmail":"patthoyts@users.sourceforge.net","sentAt":"2010-09-29T22:22:32Z","receivedAt":"2010-09-29T22:22:32Z","isPatch":true,"sender":{"key":"patthoyts@users.sourceforge.net","avatar":"https://avatars.githubusercontent.com/u/30739?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nThe result of git_getpass() is used without checking for NULL, so let's\njust die() instead of returning NULL.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n connect.c |    8 ++++++--\n 1 files changed, 6 insertions(+), 2 deletions(-)\n\ndiff --git a/connect.c b/connect.c\nindex 3450cab..57dc20c 100644\n--- a/connect.c\n+++ b/connect.c\n@@ -631,8 +631,12 @@ char *git_getpass(const char *prompt)\n \t\taskpass = askpass_program;\n \tif (!askpass)\n \t\taskpass = getenv(\"SSH_ASKPASS\");\n-\tif (!askpass || !(*askpass))\n-\t\treturn getpass(prompt);\n+\tif (!askpass || !(*askpass)) {\n+\t\tchar *result = getpass(prompt);\n+\t\tif (!result)\n+\t\t\tdie_errno(\"Could not read password\");\n+\t\treturn result;\n+\t}\n \n \targs[0] = askpass;\n \targs[1]\t= prompt;\n-- \n1.7.3\n"},{"id":"152099","messageId":"1285798953-15320-3-git-send-email-patthoyts@users.sourceforge.net","threadId":"25269","inReplyTo":"7vocbhsn03.fsf@alter.siamese.dyndns.org","subject":"[PATCH 2/2] Fix typo in pack-objects' usage","fromName":"Pat Thoyts","fromEmail":"patthoyts@users.sourceforge.net","sentAt":"2010-09-29T22:22:33Z","receivedAt":"2010-09-29T22:22:33Z","isPatch":true,"sender":{"key":"patthoyts@users.sourceforge.net","avatar":"https://avatars.githubusercontent.com/u/30739?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n builtin/pack-objects.c |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/builtin/pack-objects.c b/builtin/pack-objects.c\nindex 0e81673..3756cf3 100644\n--- a/builtin/pack-objects.c\n+++ b/builtin/pack-objects.c\n@@ -30,7 +30,7 @@ static const char pack_usage[] =\n   \"        [--no-reuse-delta] [--no-reuse-object] [--delta-base-offset]\\n\"\n   \"        [--threads=N] [--non-empty] [--revs [--unpacked | --all]*]\\n\"\n   \"        [--reflog] [--stdout | base-name] [--include-tag]\\n\"\n-  \"        [--keep-unreachable | --unpack-unreachable \\n\"\n+  \"        [--keep-unreachable | --unpack-unreachable]\\n\"\n   \"        [<ref-list | <object-list]\";\n \n struct object_entry {\n-- \n1.7.3\n"},{"id":"152100","messageId":"AANLkTimbiKGLKKxF-OL7SA7QQG2j4SRgD-MpOHPdW4sA@mail.gmail.com","threadId":"25269","inReplyTo":"7vhbh8o2ui.fsf@alter.siamese.dyndns.org","subject":"Re: [msysGit] Pull request for msysGit patches","fromName":"Pat Thoyts","fromEmail":"patthoyts@gmail.com","sentAt":"2010-09-29T22:29:57Z","receivedAt":"2010-09-29T22:29:57Z","isPatch":false,"sender":{"key":"patthoyts@gmail.com","avatar":"https://gravatar.com/avatar/bee887a777c790bd241f398217723fbe4b854428671db83db32216a28654cb25?d=mp&s=160"},"body":"On 29 September 2010 18:51, Junio C Hamano <gitster@pobox.com> wrote:\n> Jonathan Nieder <jrnieder@gmail.com> writes:\n>\n>> Johannes Sixt wrote:\n>>> On Dienstag, 28. September 2010, Pat Thoyts wrote:\n>>\n>>>> Johannes Schindelin (11):\n>>>>       Avoid TAGS/tags warning from GNU Make\n>>>\n>>> OK.\n>>\n>> Wasn't this one reviewed on-list recently?\n>\n> Yeah, I remember it vaguely ;-)\n>\n> Although I do not care very much either way, this probably is a better\n> approach, I think, if there are people on MinGW and/or OS/X who use\n> tags/etags.\n>\n> Will queue.\n\nI've just tested this suggested patch with msysGit and it's fine here.\nWe can go with this rather than Johannes' original.\n"},{"id":"152103","messageId":"7vzkv0kvb9.fsf@alter.siamese.dyndns.org","threadId":"25269","inReplyTo":"1285798953-15320-1-git-send-email-patthoyts@users.sourceforge.net","subject":"Re: msysGit patches for upstream","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-09-29T23:02:18Z","receivedAt":"2010-09-29T23:02:18Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Pat Thoyts <patthoyts@users.sourceforge.net> writes:\n\n> Junio C Hamano <gitster@pobox.com> writes:\n>\n>> pack-objects.c usage string\n>> connect.c use of unchecked git_getpass()\n>>\n>> Good eyes, but these should not be part of the series but applied to\n>> maint.  If possible please send them separately.\n>\n> Following up on this comment here are the two patches from msysGit.\n\nThanks.\n\nSince you are forwarding the patch to me, I'll add your Sign-off\n(which was in the original series anyway) before applying them.\n"},{"id":"152201","messageId":"87tyl6hnu2.fsf_-_@fox.patthoyts.tk","threadId":"25269","inReplyTo":"201009282252.25688.j6t@kdbg.org","subject":"[PATCH] git-am: fix detection of absolute paths for windows","fromName":"Pat Thoyts","fromEmail":"patthoyts@users.sourceforge.net","sentAt":"2010-09-30T13:24:07Z","receivedAt":"2010-09-30T13:24:07Z","isPatch":true,"sender":{"key":"patthoyts@users.sourceforge.net","avatar":"https://avatars.githubusercontent.com/u/30739?v=4"},"body":"Add an is_absolute_path function to abstract out platform differences\nin checking for an absolute or relative path.\nSpecifically fixes t4150-am on Windows.\n\nSigned-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>\n---\n\nIn response to the following comment...\n\n>Johannes Sixt <j6t@kdbg.org> writes:\n>>>       git-am: fix absolute path logic on Windows \n>>\n>>This mistakes a file that has a colon in the second position as absolute, even \n>>on non-Windows. IIUC, this patch is not intended for upstream git.\n>>\n\nThis patch is an alternative solution that only tries the Windows paths\non msysGit. This is_absolute_path might find use elsewhere in the future\nso I elected to place it in the sh-setup script. Also added support for\nidentifying a UNC path as absolute.\n\n\n git-am.sh       |   12 ++++++------\n git-sh-setup.sh |   15 +++++++++++++++\n 2 files changed, 21 insertions(+), 6 deletions(-)\n\ndiff --git a/git-am.sh b/git-am.sh\nindex e7f008c..9317b38 100755\n--- a/git-am.sh\n+++ b/git-am.sh\n@@ -444,12 +444,12 @@ else\n \t\t\t\tset x\n \t\t\t\tfirst=\n \t\t\t}\n-\t\t\tcase \"$arg\" in\n-\t\t\t/*)\n-\t\t\t\tset \"$@\" \"$arg\" ;;\n-\t\t\t*)\n-\t\t\t\tset \"$@\" \"$prefix$arg\" ;;\n-\t\t\tesac\n+\t\t\tif is_absolute_path \"$arg\"\n+\t\t\tthen\n+\t\t\t\tset \"$@\" \"$arg\"\n+\t\t\telse\n+\t\t\t\tset \"$@\" \"$prefix$arg\"\n+\t\t\tfi\n \t\tdone\n \t\tshift\n \tfi\ndiff --git a/git-sh-setup.sh b/git-sh-setup.sh\nindex 6131670..b9eb0bf 100644\n--- a/git-sh-setup.sh\n+++ b/git-sh-setup.sh\n@@ -209,5 +209,20 @@ case $(uname -s) in\n \tfind () {\n \t\t/usr/bin/find \"$@\"\n \t}\n+\tis_absolute_path () {\n+\t\tcase \"$1\" in\n+\t\t/* | ?:* | \\\\\\\\*)\n+\t\t\treturn 0 ;;\n+\t\tesac\n+\t\treturn 1\n+\t}\n \t;;\n+*)\n+\tis_absolute_path () {\n+\t\tcase \"$1\" in\n+\t\t/*)\n+\t\t\treturn 0 ;;\n+\t\tesac\n+\t\treturn 1\n+\t}\n esac\n-- \n1.7.3\n"},{"id":"152264","messageId":"87iq1ly81q.fsf@fox.patthoyts.tk","threadId":"25269","inReplyTo":"201010011946.12481.j6t@kdbg.org","subject":"[PATCH] git-am: fix detection of absolute paths for windows","fromName":"Pat Thoyts","fromEmail":"patthoyts@users.sourceforge.net","sentAt":"2010-09-30T13:24:07Z","receivedAt":"2010-09-30T13:24:07Z","isPatch":true,"sender":{"key":"patthoyts@users.sourceforge.net","avatar":"https://avatars.githubusercontent.com/u/30739?v=4"},"body":"Add an is_absolute_path function to abstract out platform differences\nin checking for an absolute or relative path.\nSpecifically fixes t4150-am on Windows.\n\n[PT: updated following suggestion from j6t to support \\* and //*]\n\nSigned-off-by: Johannes Sixt <j6t@kdbg.org>\nSigned-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>\n---\n\nJohannes Sixt <j6t@kdbg.org> writes:\n>On Donnerstag, 30. September 2010, Pat Thoyts wrote:\n>> Add an is_absolute_path function to abstract out platform differences\n>> in checking for an absolute or relative path.\n>> Specifically fixes t4150-am on Windows.\n>\n>Thanks for tackling this!\n>\n>> @@ -209,5 +209,20 @@ case $(uname -s) in\n>>  \tfind () {\n>>  \t\t/usr/bin/find \"$@\"\n>>  \t}\n>> +\tis_absolute_path () {\n>> +\t\tcase \"$1\" in\n>> +\t\t/* | ?:* | \\\\\\\\*)\n>\n>Absolute paths can also start with a backslash, and UNC paths can start with \n>double-slash. Therefore, this should be:\n>\n>\t\t[/\\\\]* | [A-Za-z]:*)\n>\n>> +\t\t\treturn 0 ;;\n>> +\t\tesac\n>> +\t\treturn 1\n>> +\t}\n>\n>-- Hannes\n\nI've modified the patch and added your signoff - hopefully that is ok?\n\n git-am.sh       |   12 ++++++------\n git-sh-setup.sh |   15 +++++++++++++++\n 2 files changed, 21 insertions(+), 6 deletions(-)\n\ndiff --git a/git-am.sh b/git-am.sh\nindex e7f008c..9317b38 100755\n--- a/git-am.sh\n+++ b/git-am.sh\n@@ -444,12 +444,12 @@ else\n \t\t\t\tset x\n \t\t\t\tfirst=\n \t\t\t}\n-\t\t\tcase \"$arg\" in\n-\t\t\t/*)\n-\t\t\t\tset \"$@\" \"$arg\" ;;\n-\t\t\t*)\n-\t\t\t\tset \"$@\" \"$prefix$arg\" ;;\n-\t\t\tesac\n+\t\t\tif is_absolute_path \"$arg\"\n+\t\t\tthen\n+\t\t\t\tset \"$@\" \"$arg\"\n+\t\t\telse\n+\t\t\t\tset \"$@\" \"$prefix$arg\"\n+\t\t\tfi\n \t\tdone\n \t\tshift\n \tfi\ndiff --git a/git-sh-setup.sh b/git-sh-setup.sh\nindex 6131670..58d30c9 100644\n--- a/git-sh-setup.sh\n+++ b/git-sh-setup.sh\n@@ -209,5 +209,20 @@ case $(uname -s) in\n \tfind () {\n \t\t/usr/bin/find \"$@\"\n \t}\n+\tis_absolute_path () {\n+\t\tcase \"$1\" in\n+\t\t[/\\\\]* | [A-Za-z]:*)\n+\t\t\treturn 0 ;;\n+\t\tesac\n+\t\treturn 1\n+\t}\n \t;;\n+*)\n+\tis_absolute_path () {\n+\t\tcase \"$1\" in\n+\t\t/*)\n+\t\t\treturn 0 ;;\n+\t\tesac\n+\t\treturn 1\n+\t}\n esac\n-- \n1.7.3\n"},{"id":"152200","messageId":"8739sqj2tt.fsf@fox.patthoyts.tk","threadId":"25269","inReplyTo":"AANLkTinpSwuhT1_wtqNBeXLCud-F0bLBUgbohdtPp+8R@mail.gmail.com","subject":"Re: Pull request for msysGit patches","fromName":"Pat Thoyts","fromEmail":"patthoyts@users.sourceforge.net","sentAt":"2010-09-30T22:15:10Z","receivedAt":"2010-09-30T22:15:10Z","isPatch":false,"sender":{"key":"patthoyts@users.sourceforge.net","avatar":"https://avatars.githubusercontent.com/u/30739?v=4"},"body":"Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:\n\n>On Tue, Sep 28, 2010 at 19:10, Junio C Hamano <gitster@pobox.com> wrote:\n>\n>> git-send-email.perl\n>>\n>> Similar comment as is_absolute_path(), although in Perl environment I\n>> suspect we can just use an existing package without adding our own.\n>\n>It seems to me that the code added by Erik Faye-Lund in\n>33b2e81f84875bf515b4c0de830eeddfd04227dc and this new code in\n>\"send-email: handle Windows paths for display just like we do for\n>processing\" by bert could both be replaced by:\n>\n>    use File::Spec::Functions qw(file_name_is_absolute);\n>    file_name_is_absolute($some_path);\n>\n>And by doing so we'd also be compatible with e.g. VMS. Can the people\n>with the odd non-Unix systems maybe try this out and see if it works?\n>:)\n\nI just looked into using this function with msysGit. Unfortunately it\ndoesn't work as our perl is msys-compiled and doesn't recognise c:\\ as\nan absolute path. It's using the unix path functions.\nPossibly we could use a native perl if the git perl functions were\nmaking more use of these platform-abstracting functions. Ultimately this\nis the right way to go.\n"},{"id":"152204","messageId":"AANLkTino48m1s7Zj5FrPuFqsmDR27isTd3o4w=WuRBqK@mail.gmail.com","threadId":"25269","inReplyTo":"8739sqj2tt.fsf@fox.patthoyts.tk","subject":"Re: Pull request for msysGit patches","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-09-30T22:52:23Z","receivedAt":"2010-09-30T22:52:23Z","isPatch":false,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Thu, Sep 30, 2010 at 22:15, Pat Thoyts\n<patthoyts@users.sourceforge.net> wrote:\n> Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:\n>\n>>On Tue, Sep 28, 2010 at 19:10, Junio C Hamano <gitster@pobox.com> wrote:\n>>\n>>> git-send-email.perl\n>>>\n>>> Similar comment as is_absolute_path(), although in Perl environment I\n>>> suspect we can just use an existing package without adding our own.\n>>\n>>It seems to me that the code added by Erik Faye-Lund in\n>>33b2e81f84875bf515b4c0de830eeddfd04227dc and this new code in\n>>\"send-email: handle Windows paths for display just like we do for\n>>processing\" by bert could both be replaced by:\n>>\n>>    use File::Spec::Functions qw(file_name_is_absolute);\n>>    file_name_is_absolute($some_path);\n>>\n>>And by doing so we'd also be compatible with e.g. VMS. Can the people\n>>with the odd non-Unix systems maybe try this out and see if it works?\n>>:)\n>\n> I just looked into using this function with msysGit. Unfortunately it\n> doesn't work as our perl is msys-compiled and doesn't recognise c:\\ as\n> an absolute path. It's using the unix path functions.\n> Possibly we could use a native perl if the git perl functions were\n> making more use of these platform-abstracting functions. Ultimately this\n> is the right way to go.\n\nThat sounds like something msysGit needs to patch in its Perl\nbuild. The path functions on Windows account for drive letters, but if\nthey're just using the Unix versions on not-quite-Unix that might\nbreak.\n"},{"id":"152205","messageId":"AANLkTik=dR25Z6SbOd7Mn3FE73vUrLTqDcSUN7G2X_48@mail.gmail.com","threadId":"25269","inReplyTo":"8739sqj2tt.fsf@fox.patthoyts.tk","subject":"Re: Pull request for msysGit patches","fromName":"Erik Faye-Lund","fromEmail":"kusmabite@gmail.com","sentAt":"2010-09-30T23:27:55Z","receivedAt":"2010-09-30T23:27:55Z","isPatch":false,"sender":{"key":"kusmabite@gmail.com","avatar":"https://avatars.githubusercontent.com/u/47073?v=4"},"body":"On Fri, Oct 1, 2010 at 12:15 AM, Pat Thoyts\n<patthoyts@users.sourceforge.net> wrote:\n> Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:\n>\n>>On Tue, Sep 28, 2010 at 19:10, Junio C Hamano <gitster@pobox.com> wrote:\n>>\n>>> git-send-email.perl\n>>>\n>>> Similar comment as is_absolute_path(), although in Perl environment I\n>>> suspect we can just use an existing package without adding our own.\n>>\n>>It seems to me that the code added by Erik Faye-Lund in\n>>33b2e81f84875bf515b4c0de830eeddfd04227dc and this new code in\n>>\"send-email: handle Windows paths for display just like we do for\n>>processing\" by bert could both be replaced by:\n>>\n>>    use File::Spec::Functions qw(file_name_is_absolute);\n>>    file_name_is_absolute($some_path);\n>>\n>>And by doing so we'd also be compatible with e.g. VMS. Can the people\n>>with the odd non-Unix systems maybe try this out and see if it works?\n>>:)\n>\n> I just looked into using this function with msysGit. Unfortunately it\n> doesn't work as our perl is msys-compiled and doesn't recognise c:\\ as\n> an absolute path. It's using the unix path functions.\n> Possibly we could use a native perl if the git perl functions were\n> making more use of these platform-abstracting functions. Ultimately this\n> is the right way to go.\n>\n\nUnfortunately, changing our perl is easier said than done, see issue\n218 in the msysGit issue tracker for some of the nasty details:\nhttp://code.google.com/p/msysgit/issues/detail?id=218\n"},{"id":"152250","messageId":"201010011946.12481.j6t@kdbg.org","threadId":"25269","inReplyTo":"87tyl6hnu2.fsf_-_@fox.patthoyts.tk","subject":"Re: [PATCH] git-am: fix detection of absolute paths for windows","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2010-10-01T17:46:12Z","receivedAt":"2010-10-01T17:46:12Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"On Donnerstag, 30. September 2010, Pat Thoyts wrote:\n> Add an is_absolute_path function to abstract out platform differences\n> in checking for an absolute or relative path.\n> Specifically fixes t4150-am on Windows.\n\nThanks for tackling this!\n\n> @@ -209,5 +209,20 @@ case $(uname -s) in\n>  \tfind () {\n>  \t\t/usr/bin/find \"$@\"\n>  \t}\n> +\tis_absolute_path () {\n> +\t\tcase \"$1\" in\n> +\t\t/* | ?:* | \\\\\\\\*)\n\nAbsolute paths can also start with a backslash, and UNC paths can start with \ndouble-slash. Therefore, this should be:\n\n\t\t[/\\\\]* | [A-Za-z]:*)\n\n> +\t\t\treturn 0 ;;\n> +\t\tesac\n> +\t\treturn 1\n> +\t}\n\n-- Hannes\n"},{"id":"155325","messageId":"cover.1289139299.git.hvoigt@hvoigt.net","threadId":"25269","inReplyTo":"201009282252.25688.j6t@kdbg.org","subject":"[PATCH v2 0/4] make open/unlink failures user friendly on windows using retry/abort","fromName":"Heiko Voigt","fromEmail":"hvoigt@hvoigt.net","sentAt":"2010-11-07T14:56:23Z","receivedAt":"2010-11-07T14:56:23Z","isPatch":true,"sender":{"key":"hvoigt@hvoigt.net","avatar":"https://avatars.githubusercontent.com/u/184958?v=4"},"body":"Hi,\n\nhere is a new iteration of my original patch series. This series\nreplaces the newest patches currently present in 4msysgit.git's master\nand does not cleanly apply to git.git's master. Once everybody is happy\nwith the outcome I will port it to git.git so msysgit can fetch it from\nupstream.\n\nOn Tue, Sep 28, 2010 at 10:52:25PM +0200, Johannes Sixt wrote:\n> > Heiko Voigt (4):\n> >       mingw: work around irregular failures of unlink on windows\n> \n> The workaround is to retry the unlink() after a delay when it failed with \n> EACCES. What happens if the EACCES is for a good reason? Doesn't this delay \n> the process by 71ms per unlink() invocation? Can't this become a problem if \n> many unlink()s are tried by git code?\n\nI have changed the triggering error code to be ERROR_SHARING_VIOLATION\nwhich seems to be the appropriate code for files that are in use by\nanother process.\n\nhttp://msdn.microsoft.com/en-us/library/ms681382%28v=VS.85%29.aspx\n\nThus we do not need to worry about whether we are retrying on a valid\naccess error. I have tested this on my windows box and it works here.\n\nj6t: I have not changed your error code in mingw_rename since you\nexplicitely compare with the windows error code ERROR_ACCESS_DENIED and\ndo not use the err_win_to_posix() function. Did you do this on purpose or\nshould I also refer to ERROR_SHARING_VIOLATION ?\n\n> >       mingw: make failures to unlink or move raise a question\n> \n> Gaah! But people seem to like it. Since the question is only triggered after \n> all retries fail, I can live with this.\n> \n> But isn't the implementation a bit sloppy? Can strlen(answer)-2 be negative? \n> What happens if the user typed more than 4 characters? Wouldn't it leave data \n> in the buffer for the next question?\n\nI have extracted reading of the answer into its own function and made\nthe reading more robust which should now take care of the above issues.\n\n> >       mingw: add fallback for rmdir in case directory is in use\n> \n> Depends on the previous patch. OK.\n\nNo changes.\n\nDuring pick up of the series I had to gather my testing script which can\nonly be used manually for testing. Is there any place in git.git where\nwe can store such \"manual testing tools\" ?\n\nCheers Heiko\n\nHeiko Voigt (4):\n  mingw: move unlink wrapper to mingw.c\n  mingw: work around irregular failures of unlink on windows\n  mingw: make failures to unlink or move raise a question\n  mingw: add fallback for rmdir in case directory is in use\n\n compat/mingw.c |  139 +++++++++++++++++++++++++++++++++++++++++++++++++++++++-\n compat/mingw.h |   14 ++---\n 2 files changed, 144 insertions(+), 9 deletions(-)\n\n-- \n1.7.2.2.177.geec0d\n"},{"id":"155326","messageId":"f86ceeafb62433b157e18db7488ec72bba75b573.1289139299.git.hvoigt@hvoigt.net","threadId":"25269","inReplyTo":"cover.1289139299.git.hvoigt@hvoigt.net","subject":"[PATCH v2 1/4] mingw: move unlink wrapper to mingw.c","fromName":"Heiko Voigt","fromEmail":"hvoigt@hvoigt.net","sentAt":"2010-11-07T14:56:24Z","receivedAt":"2010-11-07T14:56:24Z","isPatch":true,"sender":{"key":"hvoigt@hvoigt.net","avatar":"https://avatars.githubusercontent.com/u/184958?v=4"},"body":"The next patch implements a workaround in case unlink fails on Windows.\n\nSigned-off-by: Heiko Voigt <hvoigt@hvoigt.net>\n---\n compat/mingw.c |    8 ++++++++\n compat/mingw.h |   11 +++--------\n 2 files changed, 11 insertions(+), 8 deletions(-)\n\ndiff --git a/compat/mingw.c b/compat/mingw.c\nindex 98163da..49c594f 100644\n--- a/compat/mingw.c\n+++ b/compat/mingw.c\n@@ -155,6 +155,14 @@ int mingw_mkdir(const char *path, int mode)\n \treturn ret;\n }\n \n+#undef unlink\n+int mingw_unlink(const char *pathname)\n+{\n+\t/* read-only files cannot be removed */\n+\tchmod(pathname, 0666);\n+\treturn unlink(pathname);\n+}\n+\n #undef open\n int mingw_open (const char *filename, int oflags, ...)\n {\ndiff --git a/compat/mingw.h b/compat/mingw.h\nindex 56e58ba..220ae90 100644\n--- a/compat/mingw.h\n+++ b/compat/mingw.h\n@@ -119,14 +119,6 @@ static inline int fcntl(int fd, int cmd, ...)\n int mingw_mkdir(const char *path, int mode);\n #define mkdir mingw_mkdir\n \n-static inline int mingw_unlink(const char *pathname)\n-{\n-\t/* read-only files cannot be removed */\n-\tchmod(pathname, 0666);\n-\treturn unlink(pathname);\n-}\n-#define unlink mingw_unlink\n-\n static inline pid_t waitpid(pid_t pid, int *status, unsigned options)\n {\n \tif (options == 0)\n@@ -177,6 +169,9 @@ int link(const char *oldpath, const char *newpath);\n  * replacements of existing functions\n  */\n \n+int mingw_unlink(const char *pathname);\n+#define unlink mingw_unlink\n+\n int mingw_open (const char *filename, int oflags, ...);\n #define open mingw_open\n \n-- \n1.7.2.2.177.geec0d\n"},{"id":"155327","messageId":"1ffbd7b91ebd56c46dc7874dae3929708e8998b8.1289139299.git.hvoigt@hvoigt.net","threadId":"25269","inReplyTo":"cover.1289139299.git.hvoigt@hvoigt.net","subject":"[PATCH v2 2/4] mingw: work around irregular failures of unlink on windows","fromName":"Heiko Voigt","fromEmail":"hvoigt@hvoigt.net","sentAt":"2010-11-07T14:56:25Z","receivedAt":"2010-11-07T14:56:25Z","isPatch":true,"sender":{"key":"hvoigt@hvoigt.net","avatar":"https://avatars.githubusercontent.com/u/184958?v=4"},"body":"If a file is opened by another process (e.g. indexing of an IDE) for\nreading it is not allowed to be deleted. So in case unlink fails retry\nafter waiting for some time. This extends the workaround from 6ac6f878.\n\nSigned-off-by: Heiko Voigt <hvoigt@hvoigt.net>\n---\n compat/mingw.c |   26 ++++++++++++++++++++++++--\n 1 files changed, 24 insertions(+), 2 deletions(-)\n\ndiff --git a/compat/mingw.c b/compat/mingw.c\nindex 49c594f..bf9ffb8 100644\n--- a/compat/mingw.c\n+++ b/compat/mingw.c\n@@ -5,6 +5,7 @@\n #include \"../cache.h\"\n \n unsigned int _CRT_fmode = _O_BINARY;\n+static const int delay[] = { 0, 1, 10, 20, 40 };\n \n int err_win_to_posix(DWORD winerr)\n {\n@@ -119,6 +120,13 @@ int err_win_to_posix(DWORD winerr)\n \treturn error;\n }\n \n+static inline int is_file_in_use_error()\n+{\n+\tif (GetLastError() == ERROR_SHARING_VIOLATION)\n+\t\treturn 1;\n+\treturn 0;\n+}\n+\n static int make_hidden(const char *path)\n {\n \tDWORD attribs = GetFileAttributes(path);\n@@ -158,9 +166,24 @@ int mingw_mkdir(const char *path, int mode)\n #undef unlink\n int mingw_unlink(const char *pathname)\n {\n+\tint ret, tries = 0;\n+\n \t/* read-only files cannot be removed */\n \tchmod(pathname, 0666);\n-\treturn unlink(pathname);\n+\twhile ((ret = unlink(pathname)) == -1 && tries < ARRAY_SIZE(delay)) {\n+\t\tif (!is_file_in_use_error())\n+\t\t\tbreak;\n+\t\t/*\n+\t\t * We assume that some other process had the source or\n+\t\t * destination file open at the wrong moment and retry.\n+\t\t * In order to give the other process a higher chance to\n+\t\t * complete its operation, we give up our time slice now.\n+\t\t * If we have to retry again, we do sleep a bit.\n+\t\t */\n+\t\tSleep(delay[tries]);\n+\t\ttries++;\n+\t}\n+\treturn ret;\n }\n \n #undef open\n@@ -1279,7 +1302,6 @@ int mingw_rename(const char *pold, const char *pnew)\n {\n \tDWORD attrs, gle;\n \tint tries = 0;\n-\tstatic const int delay[] = { 0, 1, 10, 20, 40 };\n \n \t/*\n \t * Try native rename() first to get errno right.\n-- \n1.7.2.2.177.geec0d\n"},{"id":"155328","messageId":"b25a0668848fd85521da9b7dd7e1ca82c2c16e7f.1289139299.git.hvoigt@hvoigt.net","threadId":"25269","inReplyTo":"cover.1289139299.git.hvoigt@hvoigt.net","subject":"[PATCH v2 3/4] mingw: make failures to unlink or move raise a question","fromName":"Heiko Voigt","fromEmail":"hvoigt@hvoigt.net","sentAt":"2010-11-07T14:56:26Z","receivedAt":"2010-11-07T14:56:26Z","isPatch":true,"sender":{"key":"hvoigt@hvoigt.net","avatar":"https://avatars.githubusercontent.com/u/184958?v=4"},"body":"On Windows in case a program is accessing a file unlink or\nmove operations may fail. To give the user a chance to correct\nthis we simply wait until the user asks us to retry or fail.\n\nThis is useful because of the following use case which seem\nto happen rarely but when it does it is a mess:\n\nAfter making some changes the user realizes that he was on the\nincorrect branch. When trying to change the branch some file\nis still in use by some other process and git stops in the\nmiddle of changing branches. Now the user has lots of files\nwith changes mixed with his own. This is especially confusing\non repositories that contain lots of files.\n\nAlthough the recent implementation of automatic retry makes\nthis scenario much more unlikely lets provide a fallback as\na last resort.\n\nSigned-off-by: Heiko Voigt <hvoigt@hvoigt.net>\n---\n compat/mingw.c |   82 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n 1 files changed, 82 insertions(+), 0 deletions(-)\n\ndiff --git a/compat/mingw.c b/compat/mingw.c\nindex bf9ffb8..b66bf89 100644\n--- a/compat/mingw.c\n+++ b/compat/mingw.c\n@@ -3,6 +3,7 @@\n #include <conio.h>\n #include \"../strbuf.h\"\n #include \"../cache.h\"\n+#include \"../run-command.h\"\n \n unsigned int _CRT_fmode = _O_BINARY;\n static const int delay[] = { 0, 1, 10, 20, 40 };\n@@ -163,6 +164,78 @@ int mingw_mkdir(const char *path, int mode)\n \treturn ret;\n }\n \n+static int read_yes_no_answer()\n+{\n+\tchar answer[1024];\n+\n+\tif (fgets(answer, sizeof(answer), stdin)) {\n+\t\tsize_t answer_len = strlen(answer);\n+\t\tint got_full_line = 0, c;\n+\n+\t\t/* remove the newline */\n+\t\tif (answer_len >= 2 && answer[answer_len-2] == '\\r') {\n+\t\t\tanswer[answer_len-2] = '\\0';\n+\t\t\tgot_full_line = 1;\n+\t\t}\n+\t\telse if (answer_len >= 1 && answer[answer_len-1] == '\\n') {\n+\t\t\tanswer[answer_len-1] = '\\0';\n+\t\t\tgot_full_line = 1;\n+\t\t}\n+\t\t/* flush the buffer in case we did not get the full line */\n+\t\tif (!got_full_line)\n+\t\t\twhile((c = getchar()) != EOF && c != '\\n');\n+\t} else\n+\t\t/* we could not read, return the\n+\t\t * default answer which is no */\n+\t\treturn 0;\n+\n+\tif (answer[0] == 'y' && strlen(answer) == 1)\n+\t\treturn 1;\n+\tif (!strncasecmp(answer, \"yes\", sizeof(answer)))\n+\t\treturn 1;\n+\tif (answer[0] == 'n' && strlen(answer) == 1)\n+\t\treturn 0;\n+\tif (!strncasecmp(answer, \"no\", sizeof(answer)))\n+\t\treturn 0;\n+\n+\t/* did not find an answer we understand */\n+\treturn -1;\n+}\n+\n+static int ask_user_yes_no(const char *format, ...)\n+{\n+\tchar question[4096];\n+\tconst char *retry_hook[] = { NULL, NULL, NULL };\n+\tva_list args;\n+\n+\tif ((retry_hook[0] = getenv(\"GIT_ASK_YESNO\"))) {\n+\n+\t\tva_start(args, format);\n+\t\tvsnprintf(question, sizeof(question), format, args);\n+\t\tva_end(args);\n+\n+\t\tretry_hook[1] = question;\n+\t\treturn !run_command_v_opt(retry_hook, 0);\n+\t}\n+\n+\tif (!isatty(_fileno(stdin)))\n+\t\treturn 0;\n+\n+\twhile (1) {\n+\t\tint answer;\n+\t\tva_start(args, format);\n+\t\tvfprintf(stderr, format, args);\n+\t\tva_end(args);\n+\t\tfprintf(stderr, \" (y/n)? \");\n+\n+\t\tif ((answer = read_yes_no_answer()) >= 0)\n+\t\t\treturn answer;\n+\n+\t\tfprintf(stderr, \"Sorry, I did not understand your answer. \"\n+\t\t\t\t\"Please type 'y' or 'n'\\n\");\n+\t}\n+}\n+\n #undef unlink\n int mingw_unlink(const char *pathname)\n {\n@@ -183,6 +256,10 @@ int mingw_unlink(const char *pathname)\n \t\tSleep(delay[tries]);\n \t\ttries++;\n \t}\n+\twhile (ret == -1 && is_file_in_use_error() &&\n+\t       ask_user_yes_no(\"Unlink of file '%s' failed. \"\n+\t\t\t\"Should I try again?\", pathname))\n+\t       ret = unlink(pathname);\n \treturn ret;\n }\n \n@@ -1343,6 +1420,11 @@ repeat:\n \t\ttries++;\n \t\tgoto repeat;\n \t}\n+\tif (gle == ERROR_ACCESS_DENIED &&\n+\t       ask_user_yes_no(\"Rename from '%s' to '%s' failed. \"\n+\t\t       \"Should I try again?\", pold, pnew))\n+\t\tgoto repeat;\n+\n \terrno = EACCES;\n \treturn -1;\n }\n-- \n1.7.2.2.177.geec0d\n"},{"id":"155329","messageId":"2497be75bac8877a06bef1d8c702f0c714fbc588.1289139299.git.hvoigt@hvoigt.net","threadId":"25269","inReplyTo":"cover.1289139299.git.hvoigt@hvoigt.net","subject":"[PATCH v2 4/4] mingw: add fallback for rmdir in case directory is in use","fromName":"Heiko Voigt","fromEmail":"hvoigt@hvoigt.net","sentAt":"2010-11-07T14:56:27Z","receivedAt":"2010-11-07T14:56:27Z","isPatch":true,"sender":{"key":"hvoigt@hvoigt.net","avatar":"https://avatars.githubusercontent.com/u/184958?v=4"},"body":"From: Heiko Voigt <heiko.voigt@mahr.de>\n\nThe same logic as for unlink and rename also applies to rmdir. For\nexample in case you have a shell open in a git controlled folder. This\nwill easily fail. So lets be nice for such cases as well.\n\nSigned-off-by: Heiko Voigt <heiko.voigt@mahr.de>\nSigned-off-by: Heiko Voigt <hvoigt@hvoigt.net>\n---\n compat/mingw.c |   25 +++++++++++++++++++++++++\n compat/mingw.h |    3 +++\n 2 files changed, 28 insertions(+), 0 deletions(-)\n\ndiff --git a/compat/mingw.c b/compat/mingw.c\nindex b66bf89..8e4f1e2 100644\n--- a/compat/mingw.c\n+++ b/compat/mingw.c\n@@ -263,6 +263,31 @@ int mingw_unlink(const char *pathname)\n \treturn ret;\n }\n \n+#undef rmdir\n+int mingw_rmdir(const char *pathname)\n+{\n+    int ret, tries = 0;\n+\n+\twhile ((ret = rmdir(pathname)) == -1 && tries < ARRAY_SIZE(delay)) {\n+\t\tif (!is_file_in_use_error())\n+\t\t\tbreak;\n+\t\t/*\n+\t\t * We assume that some other process had the source or\n+\t\t * destination file open at the wrong moment and retry.\n+\t\t * In order to give the other process a higher chance to\n+\t\t * complete its operation, we give up our time slice now.\n+\t\t * If we have to retry again, we do sleep a bit.\n+\t\t */\n+\t\tSleep(delay[tries]);\n+\t\ttries++;\n+\t}\n+\twhile (ret == -1 && is_file_in_use_error() &&\n+\t       ask_user_yes_no(\"Deletion of directory '%s' failed. \"\n+\t\t\t\"Should I try again?\", pathname))\n+\t       ret = rmdir(pathname);\n+\treturn ret;\n+}\n+\n #undef open\n int mingw_open (const char *filename, int oflags, ...)\n {\ndiff --git a/compat/mingw.h b/compat/mingw.h\nindex 220ae90..cf69d39 100644\n--- a/compat/mingw.h\n+++ b/compat/mingw.h\n@@ -172,6 +172,9 @@ int link(const char *oldpath, const char *newpath);\n int mingw_unlink(const char *pathname);\n #define unlink mingw_unlink\n \n+int mingw_rmdir(const char *path);\n+#define rmdir mingw_rmdir\n+\n int mingw_open (const char *filename, int oflags, ...);\n #define open mingw_open\n \n-- \n1.7.2.2.177.geec0d\n"},{"id":"155330","messageId":"201011071649.20617.j6t@kdbg.org","threadId":"25269","inReplyTo":"cover.1289139299.git.hvoigt@hvoigt.net","subject":"Re: [PATCH v2 0/4] make open/unlink failures user friendly on windows using retry/abort","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2010-11-07T15:49:20Z","receivedAt":"2010-11-07T15:49:20Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"On Sonntag, 7. November 2010, Heiko Voigt wrote:\n> j6t: I have not changed your error code in mingw_rename since you\n> explicitely compare with the windows error code ERROR_ACCESS_DENIED and\n> do not use the err_win_to_posix() function. Did you do this on purpose or\n> should I also refer to ERROR_SHARING_VIOLATION ?\n\nIIRC, I dumped the error code before I implemented the retry logic, and the \nerror was ERROR_ACCESS_DENIED. Did you verify that the occasions where you \nwant to retry the operations indeed fail due to ERROR_SHARING_VIOLATION, or \ndo you trust the documentation?\n\nIn any case, it is better to check for the Windows error code (which ever you \nfinally choose) rather than errno, IMO.\n\n-- Hannes\n"},{"id":"155333","messageId":"20101107170637.GA15123@book.hvoigt.net","threadId":"25269","inReplyTo":"201011071649.20617.j6t@kdbg.org","subject":"Re: Re: [PATCH v2 0/4] make open/unlink failures user friendly on windows using retry/abort","fromName":"Heiko Voigt","fromEmail":"hvoigt@hvoigt.net","sentAt":"2010-11-07T17:06:38Z","receivedAt":"2010-11-07T17:06:38Z","isPatch":true,"sender":{"key":"hvoigt@hvoigt.net","avatar":"https://avatars.githubusercontent.com/u/184958?v=4"},"body":"Hi,\n\nOn Sun, Nov 07, 2010 at 04:49:20PM +0100, Johannes Sixt wrote:\n> On Sonntag, 7. November 2010, Heiko Voigt wrote:\n> > j6t: I have not changed your error code in mingw_rename since you\n> > explicitely compare with the windows error code ERROR_ACCESS_DENIED and\n> > do not use the err_win_to_posix() function. Did you do this on purpose or\n> > should I also refer to ERROR_SHARING_VIOLATION ?\n> \n> IIRC, I dumped the error code before I implemented the retry logic, and the \n> error was ERROR_ACCESS_DENIED. Did you verify that the occasions where you \n> want to retry the operations indeed fail due to ERROR_SHARING_VIOLATION, or \n> do you trust the documentation?\n\nI tested this for my use case which is described by the manual testing\nscript[1]. I ran it once to create the test structure and then from\ninside the test repository\n\n\t./../block_read 5000 file\n\nand manually checked out the other branch in parallel. In this situation\ngit will stop with the retry question. But I am not sure which use case you\nwhere addressing. Do you have a script or some information to reproduce?\n\n> In any case, it is better to check for the Windows error code (which ever you \n> finally choose) rather than errno, IMO.\n\nI agree because that should give us more fine grained control and since in\nerr_win_to_posix() many codes are mapped to EACCES.\n\nCheers Heiko\n\n[1] http://groups.google.com/group/msysgit/msg/fcad5f1455b263ca \n"},{"id":"155341","messageId":"201011072011.05473.j6t@kdbg.org","threadId":"25269","inReplyTo":"20101107170637.GA15123@book.hvoigt.net","subject":"Re: [PATCH v2 0/4] make open/unlink failures user friendly on windows using retry/abort","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2010-11-07T19:11:04Z","receivedAt":"2010-11-07T19:11:04Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"On Sonntag, 7. November 2010, Heiko Voigt wrote:\n> I tested this for my use case which is described by the manual testing\n> script[1]. I ran it once to create the test structure and then from\n> inside the test repository\n>\n> \t./../block_read 5000 file\n>\n> and manually checked out the other branch in parallel. In this situation\n> git will stop with the retry question. But I am not sure which use case you\n> where addressing. Do you have a script or some information to reproduce?\n\nSorry, I don't have a reliable test case. I usually encountered this problem \nin the test suite at random places when it was run with 'make -j2' and in a \nproduction repository sometimes during rebase --interactive.\n\n-- Hannes\n"}]}