Re: [PATCH v2] Add a Windows-specific fallback to getenv(HOME);

2014-06-06 Thread Stepan Kasal
Hi, On Thu, Jun 05, 2014 at 11:44:22PM +0200, Karsten Blees wrote: I think the most time-preserving option is to send it upstream as unchanged as possible (probably with the bugfix-patches squashed). I plan to submit one by one or in a small series. Agreed about the squashes, I have several of

Re: [msysGit] [PATCH] mingw: redefine the wrapper macro after the corresponding function

2014-06-06 Thread Stepan Kasal
Hello, On Fri, Jun 06, 2014 at 12:00:51AM +0200, Karsten Blees wrote: Am 05.06.2014 18:56, schrieb Johannes Sixt: Within mingw.c, if some other function inside mingw.c wants to use mingw_unlink, then it should be written as 'mingw_unlink(foo)', not 'unlink(foo)'. I very much like this

[PATCH v2] mingw: redefine the wrapper macro after the corresponding function

2014-06-06 Thread Stepan Kasal
From 624d15bd5d2d06035abc17415127a7cf37b5f981 Mon Sep 17 00:00:00 2001 From: Stepan Kasal ka...@ucw.cz Date: Thu, 5 Jun 2014 09:17:17 +0200 mingw.c defines several wrapper functions, e.g., mingw_unlink(). These wrappers are deployed by macros like this: #define unlink mingw_unlink The

git-svn, different merge-parent selected in independent clones following SVN merge

2014-06-06 Thread Brett Randall
Hi, git version 1.8.3.2 I've used git-svn on a few repositories for a long time. In what is a testament to the consistency and stability of git-svn, despite often maintaining separate git-svn clones on different machines, I've never once seen a different commit-sha in independent clones for the

Git for Windows SDK

2014-06-06 Thread Philip Oakley
- Original Message - From: Johannes Schindelin johannes.schinde...@gmx.de was Re: [msysGit] Re: [PATCH] Add a Windows-specific fallback to getenv(HOME); snip Seriously again, I am in favor of calling it the Git for Windows SDK. But really, it is bikeshedding at this point. There is

Re: [msysGit] [PATCH] mingw: redefine the wrapper macro after the corresponding function

2014-06-06 Thread Karsten Blees
Am 06.06.2014 10:32, schrieb Stepan Kasal: Hello, On Fri, Jun 06, 2014 at 12:00:51AM +0200, Karsten Blees wrote: Am 05.06.2014 18:56, schrieb Johannes Sixt: Within mingw.c, if some other function inside mingw.c wants to use mingw_unlink, then it should be written as 'mingw_unlink(foo)', not

Re: Git autocorrect bug

2014-06-06 Thread Duy Nguyen
On Thu, Jun 05, 2014 at 04:28:23AM -0400, David Turner wrote: On Thu, 2014-06-05 at 13:29 +0700, Duy Nguyen wrote: On Thu, Jun 5, 2014 at 10:49 AM, David Turner dtur...@twopensource.com wrote: fatal: internal error: work tree has already been set Current worktree: /home/dturner/git

Re: [msysGit] [PATCH] mingw: redefine the wrapper macro after the corresponding function

2014-06-06 Thread Stepan Kasal
Hi Karsten, On Fri, Jun 06, 2014 at 11:43:03AM +0200, Karsten Blees wrote: [...] Assume all other callers are written 'mingw_foo', as suggested by Hannes, and no one except 'mingw_foo' has the need to call MSVCRT's 'foo' directly. Then its irrelevant whether the #undef is at the top or

Kitchên Design Lancashire Reviews

2014-06-06 Thread nyampahpol
Kitchên Design Lancashire Reviews. what a great kitchên and price Kitchên Design Lancashire Reviews can provide. -- View this message in context: http://git.661346.n2.nabble.com/Kitchen-Design-Lancashire-Reviews-tp7612483.html Sent from the git mailing list archive at Nabble.com. -- To

Re: [PATCH 1/2] userdiff: support C# async methods and correct C# keywords

2014-06-06 Thread Steve Hoelzer
On Thu, Jun 5, 2014 at 5:59 PM, Junio C Hamano gits...@pobox.com wrote: Sup Yut Sum ch3co...@gmail.com writes: async is in C# 5.0 foreach is in C# 1.0 instanceof is in Java. The similar keywords are typeof, is, as in C# 1.0 This one made me read it twice, until I realized you meant

[PATCH 2/5] Detect console streams more reliably on Windows

2014-06-06 Thread Stepan Kasal
From: Karsten Blees bl...@dcon.de GetStdHandle(STD_OUTPUT_HANDLE) doesn't work for stderr if stdout is redirected. Use _get_osfhandle of the FILE* instead. _isatty() is true for all character devices (including parallel and serial ports). Check return value of GetConsoleScreenBufferInfo instead

[PATCH 0/5] Windows dirent patches

2014-06-06 Thread Stepan Kasal
Hello, This is a series of dirent modifications, 4 tiny ones and one bigger. As the date indicates, these are battle tested in mysgit for several years. Regards, Stepan Karsten Blees (5): Win32 dirent: remove unused dirent.d_ino member Win32 dirent: remove unused dirent.d_reclen

[PATCH 5/5] Win32: Thread-safe windows console output

2014-06-06 Thread Stepan Kasal
From: Karsten Blees bl...@dcon.de Winansi.c has many static variables that are accessed and modified from the [v][f]printf / fputs functions overridden in the file. This may cause multi threaded git commands that print to the console to produce corrupted output or even crash. Additionally,

[PATCH 0/5] First part of Unicode console support for msysgit

2014-06-06 Thread Stepan Kasal
Hello, this is first part of the unicode support pathes from msysgit. The first three patches originate in Jun 2010, though some fixups from 2012 have been squashed in. The fourth one is just a trivial prerequisite for the last one, that was written in Jan 2012, with a fixup from Mar 2012.

[PATCH 3/5] Warn if the Windows console font doesn't support Unicode

2014-06-06 Thread Stepan Kasal
From: Karsten Blees bl...@dcon.de Unicode console output won't display correctly with default settings because the default console font (Terminal) only supports the system's OEM charset. Unfortunately, this is a user specific setting, so it cannot be easily fixed by e.g. some registry tricks in

[PATCH 5/5] Win32 dirent: improve dirent implementation

2014-06-06 Thread Stepan Kasal
From: Karsten Blees bl...@dcon.de Improve the dirent implementation by removing the relics that were once necessary to plug into the now unused MinGW runtime, in preparation for Unicode file name support. Move FindFirstFile to opendir, and FindClose to closedir, with the following implications:

[PATCH 1/5] Support Unicode console output on Windows

2014-06-06 Thread Stepan Kasal
From: Karsten Blees bl...@dcon.de WriteConsoleW seems to be the only way to reliably print unicode to the console (without weird code page conversions). Also redirects vfprintf to the winansi.c version. Signed-off-by: Karsten Blees bl...@dcon.de Signed-off-by: Johannes Schindelin

[PATCH 4/5] Win32 dirent: clarify #include directives

2014-06-06 Thread Stepan Kasal
From: Karsten Blees bl...@dcon.de Git-compat-util.h is two dirs up, and already includes dirent.h (which is the same as dirent.h due to -Icompat/win32 in the Makefile). Signed-off-by: Karsten Blees bl...@dcon.de Signed-off-by: Erik Faye-Lund kusmab...@gmail.com Signed-off-by: Stepan Kasal

[PATCH 1/5] Win32 dirent: remove unused dirent.d_ino member

2014-06-06 Thread Stepan Kasal
From: Karsten Blees bl...@dcon.de There are no proper inodes on Windows, so remove dirent.d_ino and #define NO_D_INO_IN_DIRENT in the Makefile (this skips e.g. an ineffective qsort in fsck.c). Signed-off-by: Karsten Blees bl...@dcon.de Signed-off-by: Erik Faye-Lund kusmab...@gmail.com

[PATCH 3/5] Win32 dirent: change FILENAME_MAX to MAX_PATH

2014-06-06 Thread Stepan Kasal
From: Karsten Blees bl...@dcon.de FILENAME_MAX and MAX_PATH are both 260 on Windows, however, MAX_PATH is used throughout the other Win32 code in Git, and also defines the length of file name buffers in the Win32 API (e.g. WIN32_FIND_DATA.cFileName, from which we're copying the dirent data).

[PATCH 4/5] Win32: move main macro to a function

2014-06-06 Thread Stepan Kasal
From: Karsten Blees bl...@dcon.de The code in the MinGW main macro is getting more and more complex, move to a separate initialization function for readabiliy and extensibility. Signed-off-by: Karsten Blees bl...@dcon.de Signed-off-by: Erik Faye-Lund kusmab...@gmail.com Signed-off-by: Stepan

[PATCH 2/5] Win32 dirent: remove unused dirent.d_reclen member

2014-06-06 Thread Stepan Kasal
From: Karsten Blees bl...@dcon.de Remove the union around dirent.d_type and the unused dirent.d_reclen member (which was necessary for compatibility with the MinGW dirent runtime, which is no longer used). Signed-off-by: Karsten Blees bl...@dcon.de Signed-off-by: Erik Faye-Lund

Re: Proposal for pruning tags

2014-06-06 Thread Robert Dailey
On Thu, Jun 5, 2014 at 3:50 PM, Junio C Hamano gits...@pobox.com wrote: I think you need to explain what you mean by prune a lot better than what you are doing in your message to be understood by others. After seeing the above two commands, my *guess* of what you want to do is to remove any

[PATCH 1/3] pretty: free the gpg status buf

2014-06-06 Thread Michael J Gruber
4a868fd (pretty: parse the gpg status lines rather than the output, 2013-02-14) made the gpg status lines available to callers and made sure they freed the used space, but missed one spot. Free the status line buffer also in the remaining spot. Signed-off-by: Michael J Gruber

[PATCH 0/3] verify-commit: verify commit signatures

2014-06-06 Thread Michael J Gruber
Hi there, Some of you may remember me from my more active times... Anyways, a recent blog post about signed commits in git triggered me to look at our tools for that again. It seems that we only have the log/pretty family on the user facing side, but everything we need under the hood. So here's

[PATCH 3/3] verify-commit: scriptable commit signature verification

2014-06-06 Thread Michael J Gruber
Commit signatures can be verified using git show -s --show-signature or the %G? pretty format and parsing the output, which is well suited for user inspection, but not for scripting. Provide a command verify-commit which is analogous to verify-tag: It returns 0 for good signatures and non-zero

[PATCH 2/3] gpg-interface: provide access to the payload

2014-06-06 Thread Michael J Gruber
In contrast to tag signatures, commit signatures are put into the header, that is between the other header parts and commit messages. Provide access to the commit content sans the signature, which is the payload that is actually signed. Commit signature verification does the parsing anyways, and

[PATCH 04/20] contrib/examples/git-merge.sh: avoid test cond -a/-o cond

2014-06-06 Thread Elia Pinto
The construct is error-prone; test being built-in in most modern shells, the reason to avoid test cond test cond spawning one extra process by using a single test cond -a cond no longer exists. Signed-off-by: Elia Pinto gitter.spi...@gmail.com --- contrib/examples/git-merge.sh |4 ++-- 1

[PATCH 11/20] t/lib-httpd.sh: avoid test cond -a/-o cond

2014-06-06 Thread Elia Pinto
The construct is error-prone; test being built-in in most modern shells, the reason to avoid test cond test cond spawning one extra process by using a single test cond -a cond no longer exists. Signed-off-by: Elia Pinto gitter.spi...@gmail.com --- t/lib-httpd.sh |2 +- 1 file changed, 1

[PATCH 16/20] t/t5403-post-checkout-hook.sh: avoid test cond -a/-o cond

2014-06-06 Thread Elia Pinto
The construct is error-prone; test being built-in in most modern shells, the reason to avoid test cond test cond spawning one extra process by using a single test cond -a cond no longer exists. Signed-off-by: Elia Pinto gitter.spi...@gmail.com --- t/t5403-post-checkout-hook.sh |8

[PATCH 12/20] t/t0025-crlf-auto.sh: avoid test cond -a/-o cond

2014-06-06 Thread Elia Pinto
The construct is error-prone; test being built-in in most modern shells, the reason to avoid test cond test cond spawning one extra process by using a single test cond -a cond no longer exists. Signed-off-by: Elia Pinto gitter.spi...@gmail.com --- t/t0025-crlf-auto.sh |6 +++--- 1 file

[PATCH 07/20] git-bisect.sh: avoid test cond -a/-o cond

2014-06-06 Thread Elia Pinto
The construct is error-prone; test being built-in in most modern shells, the reason to avoid test cond test cond spawning one extra process by using a single test cond -a cond no longer exists. Signed-off-by: Elia Pinto gitter.spi...@gmail.com --- git-bisect.sh |2 +- 1 file changed, 1

[PATCH 06/20] contrib/examples/git-resolve.sh: avoid test cond -a/-o cond

2014-06-06 Thread Elia Pinto
The construct is error-prone; test being built-in in most modern shells, the reason to avoid test cond test cond spawning one extra process by using a single test cond -a cond no longer exists. Signed-off-by: Elia Pinto gitter.spi...@gmail.com --- contrib/examples/git-resolve.sh |2 +- 1

[PATCH 13/20] t/t0026-eol-config.sh: avoid test cond -a/-o cond

2014-06-06 Thread Elia Pinto
The construct is error-prone; test being built-in in most modern shells, the reason to avoid test cond test cond spawning one extra process by using a single test cond -a cond no longer exists. Signed-off-by: Elia Pinto gitter.spi...@gmail.com --- t/t0026-eol-config.sh |8 1 file

[PATCH 15/20] t/t5000-tar-tree.sh: avoid test cond -a/-o cond

2014-06-06 Thread Elia Pinto
The construct is error-prone; test being built-in in most modern shells, the reason to avoid test cond test cond spawning one extra process by using a single test cond -a cond no longer exists. Signed-off-by: Elia Pinto gitter.spi...@gmail.com --- t/t5000-tar-tree.sh |2 +- 1 file changed,

[PATCH 08/20] git-mergetool.sh: avoid test cond -a/-o cond

2014-06-06 Thread Elia Pinto
The construct is error-prone; test being built-in in most modern shells, the reason to avoid test cond test cond spawning one extra process by using a single test cond -a cond no longer exists. Signed-off-by: Elia Pinto gitter.spi...@gmail.com --- git-mergetool.sh |4 ++-- 1 file changed, 2

[PATCH 17/20] t/t5538-push-shallow.sh: avoid test cond -a/-o cond

2014-06-06 Thread Elia Pinto
The construct is error-prone; test being built-in in most modern shells, the reason to avoid test cond test cond spawning one extra process by using a single test cond -a cond no longer exists. Signed-off-by: Elia Pinto gitter.spi...@gmail.com --- t/t5538-push-shallow.sh |2 +- 1 file

[PATCH 05/20] contrib/examples/git-repack.sh: avoid test cond -a/-o cond

2014-06-06 Thread Elia Pinto
The construct is error-prone; test being built-in in most modern shells, the reason to avoid test cond test cond spawning one extra process by using a single test cond -a cond no longer exists. Signed-off-by: Elia Pinto gitter.spi...@gmail.com --- contrib/examples/git-repack.sh |4 ++-- 1

[PATCH 20/20] CodingGuidelines: avoid test cond -a/-o cond

2014-06-06 Thread Elia Pinto
The construct is error-prone; test being built-in in most modern shells, the reason to avoid test cond test cond spawning one extra process by using a single test cond -a cond no longer exists. Signed-off-by: Junio C Hamano gits...@pobox.com Signed-off-by: Elia Pinto gitter.spi...@gmail.com ---

[PATCH 14/20] t/t4102-apply-rename.sh: avoid test cond -a/-o cond

2014-06-06 Thread Elia Pinto
The construct is error-prone; test being built-in in most modern shells, the reason to avoid test cond test cond spawning one extra process by using a single test cond -a cond no longer exists. Signed-off-by: Elia Pinto gitter.spi...@gmail.com --- t/t4102-apply-rename.sh |2 +- 1 file

[PATCH 10/20] git-submodule.sh: avoid test cond -a/-o cond

2014-06-06 Thread Elia Pinto
The construct is error-prone; test being built-in in most modern shells, the reason to avoid test cond test cond spawning one extra process by using a single test cond -a cond no longer exists. Signed-off-by: Elia Pinto gitter.spi...@gmail.com --- git-submodule.sh | 32

[PATCH 19/20] t/test-lib-functions.sh: avoid test cond -a/-o cond

2014-06-06 Thread Elia Pinto
The construct is error-prone; test being built-in in most modern shells, the reason to avoid test cond test cond spawning one extra process by using a single test cond -a cond no longer exists. Signed-off-by: Elia Pinto gitter.spi...@gmail.com --- t/test-lib-functions.sh |4 ++-- 1 file

[PATCH 09/20] git-rebase--interactive.sh: avoid test cond -a/-o cond

2014-06-06 Thread Elia Pinto
The construct is error-prone; test being built-in in most modern shells, the reason to avoid test cond test cond spawning one extra process by using a single test cond -a cond no longer exists. Signed-off-by: Elia Pinto gitter.spi...@gmail.com --- git-rebase--interactive.sh |2 +- 1 file

[PATCH 00/20] avoid test cond -a/-o cond

2014-06-06 Thread Elia Pinto
These patch series convert test -a/-o to and ||. This is the the third version. Changes: - Change the commit message for consistency with the comment to the patch to the CodingGuideline (Junio proposed patch http://www.spinics.net/lists/git/msg232199.html) expressing even better the

[PATCH 01/20] check_bindir: avoid test cond -a/-o cond

2014-06-06 Thread Elia Pinto
The construct is error-prone; test being built-in in most modern shells, the reason to avoid test cond test cond spawning one extra process by using a single test cond -a cond no longer exists. Signed-off-by: Elia Pinto gitter.spi...@gmail.com --- check_bindir |2 +- 1 file changed, 1

[PATCH 02/20] contrib/examples/git-clone.sh: avoid test cond -a/-o cond

2014-06-06 Thread Elia Pinto
The construct is error-prone; test being built-in in most modern shells, the reason to avoid test cond test cond spawning one extra process by using a single test cond -a cond no longer exists. Signed-off-by: Elia Pinto gitter.spi...@gmail.com --- contrib/examples/git-clone.sh |2 +- 1 file

Re: [PATCH 2/2] mingw: avoid const warning

2014-06-06 Thread Karsten Blees
Am 29.05.2014 12:47, schrieb Stepan Kasal: Fix const warnings in http-fetch.c and remote-curl.c main() where is argv declared as const. The fix should work for all future declarations of main, no matter whether the second parameter's type is char**, const char**, or char *[]. I'm 100% in

Re: [PATCH v3 1/4] replace: add --graft option

2014-06-06 Thread Christian Couder
On Thu, Jun 5, 2014 at 11:49 PM, Junio C Hamano gits...@pobox.com wrote: Christian Couder chrisc...@tuxfamily.org writes: +static int create_graft(int argc, const char **argv, int force) +{ + unsigned char old[20], new[20]; + const char *old_ref = argv[0]; + struct commit

Feature Request: Fix/Make git-rebase work with git-subtree (was: Re: subtree merges lose prefix after rebase)

2014-06-06 Thread Eric Peters
Hi All ~ This is sort of re-open of a 2012 thread: http://git.661346.n2.nabble.com/subtree-merges-lose-prefix-after-rebase-td7332850.html A related stackoverflow post that describes the problem a work-arounds/what was attempted to solve the problem:

Re: [PATCH v3 1/4] replace: add --graft option

2014-06-06 Thread Christian Couder
On Fri, Jun 6, 2014 at 5:29 PM, Christian Couder christian.cou...@gmail.com wrote: Yeah, or I could just rely on the fact that lookup_commit_or_die() already parses the commit, with something like this: if (get_sha1(old_ref, old) 0) die(_(Not a valid object name: '%s'),

Re: [PATCH v3 4/4] contrib: add convert-grafts-to-replace-refs.sh

2014-06-06 Thread Christian Couder
On Thu, Jun 5, 2014 at 11:55 PM, Junio C Hamano gits...@pobox.com wrote: Christian Couder chrisc...@tuxfamily.org writes: diff --git a/contrib/convert-grafts-to-replace-refs.sh b/contrib/convert-grafts-to-replace-refs.sh new file mode 100755 index 000..8472879 --- /dev/null +++

GOOD DAY,

2014-06-06 Thread YAO YUTA
My name is Mr Yao Yuta from Hong Kong, I want you to be my partner in a business project. If Interested Contact me back via my email address. Thank you, Mr. Yao Yuta. -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More

Re: [PATCH 0/5] Windows dirent patches

2014-06-06 Thread Karsten Blees
Am 06.06.2014 15:43, schrieb Stepan Kasal: Hello, This is a series of dirent modifications, 4 tiny ones and one bigger. As the date indicates, these are battle tested in mysgit for several years. The dates are actually missing from the patches, otherwise full ack from me. Thanks! -- To

Re: [RFC PATCH] clone: add clone.recursesubmodules config option

2014-06-06 Thread Junio C Hamano
Heiko Voigt hvo...@hvoigt.net writes: On Thu, Jun 05, 2014 at 07:48:33PM +1200, Chris Packham wrote: ... I'm a little confused at how autoclone and autoinit differ. Aren't they the same? i.e. when this module appears grab it by default. I see autoupdate as a little different meaning update

Re: [PATCH v2 10/11] test-lib: make it possible to override how test code is eval'd

2014-06-06 Thread Junio C Hamano
Richard Hansen rhan...@bbn.com writes: On 2014-06-05 17:11, Junio C Hamano wrote: ... In any case, the above explanation confuses me somewhat. test_eval_ is fed a scriptlet defined for various test_expect_success tests, and they are written in POSIX shells, not zsh, so wouldn't it be wrong

Re: [PATCH v3 1/4] replace: add --graft option

2014-06-06 Thread Junio C Hamano
Christian Couder christian.cou...@gmail.com writes: On Thu, Jun 5, 2014 at 11:49 PM, Junio C Hamano gits...@pobox.com wrote: Christian Couder chrisc...@tuxfamily.org writes: +static int create_graft(int argc, const char **argv, int force) +{ + unsigned char old[20], new[20]; +

Re: Proposal for pruning tags

2014-06-06 Thread Junio C Hamano
Robert Dailey rcdailey.li...@gmail.com writes: ... Having git clean up tags automatically would really help with this, even though you may not feel it's the responsibility of Git. It's more of a usability issue, I agree with Having ... help with this. I did not say at all that it is not

[PATCH] Use starts_with() for C strings instead of memcmp()

2014-06-06 Thread René Scharfe
Convert three cases of checking for a constant prefix using memcmp() to starts_with(). This way there is no need for magic string length constants and we avoid running over the end of the string should it be shorter than the prefix. Signed-off-by: Rene Scharfe l@web.de --- These are the easy

Re: [PATCH 1/2] userdiff: support C# async methods and correct C# keywords

2014-06-06 Thread Junio C Hamano
Steve Hoelzer shoel...@gmail.com writes: On Thu, Jun 5, 2014 at 5:59 PM, Junio C Hamano gits...@pobox.com wrote: Sup Yut Sum ch3co...@gmail.com writes: async is in C# 5.0 foreach is in C# 1.0 instanceof is in Java. The similar keywords are typeof, is, as in C# 1.0 This one made me read

Re: [PATCH 0/5] First part of Unicode console support for msysgit

2014-06-06 Thread Karsten Blees
Am 06.06.2014 15:42, schrieb Stepan Kasal: Hello, this is first part of the unicode support pathes from msysgit. Nicely done, thanks! I think its important to reiterate that these patches were written several years apart, so there are some inconsistencies and back-and-forth changes (e.g.

Re: [PATCH 1/5] hashmap: add enum for hashmap free_entries option

2014-06-06 Thread Karsten Blees
Am 05.06.2014 08:06, schrieb Heiko Voigt: This allows a reader to immediately know which options can be used and what this parameter is about. [...] -void hashmap_free(struct hashmap *map, int free_entries) +void hashmap_free(struct hashmap *map, enum hashmap_free_options free_entries)

Re: [msysGit] [PATCH] mingw: redefine the wrapper macro after the corresponding function

2014-06-06 Thread Karsten Blees
Am 06.06.2014 13:10, schrieb Stepan Kasal: Hi Karsten, On Fri, Jun 06, 2014 at 11:43:03AM +0200, Karsten Blees wrote: Thinking about this some more, the best solution is probably to eliminate the problem altogether by adding inline-wrappers for required CRT-functions, e.g.: Yes, this is

Re: [msysGit] Re: [PATCH 0/5] First part of Unicode console support for msysgit

2014-06-06 Thread Stepan Kasal
Hello Karsten, On Fri, Jun 06, 2014 at 07:44:33PM +0200, Karsten Blees wrote: Nicely done, thanks! thank you for your kind words. Please hold back, I will re-submit in a few days. Note: this one was submitted seperately on May 29 and May 1 (can't find it in the gmane archive, though). It

Re: [PATCH 20/20] CodingGuidelines: avoid test cond -a/-o cond

2014-06-06 Thread Torsten Bögershausen
On 2014-06-06 16.56, Elia Pinto wrote: + - We do not write our test command with -a and -o and use That and and and could be somewhat confusing. How about: We do not write our test command with -a and/or -o. Instead we use or || to concatenate multiple test commands instead, because the use of

Re: [PATCH 2/2] mingw: avoid const warning

2014-06-06 Thread Junio C Hamano
Karsten Blees karsten.bl...@gmail.com writes: Am 29.05.2014 12:47, schrieb Stepan Kasal: Fix const warnings in http-fetch.c and remote-curl.c main() where is argv declared as const. The fix should work for all future declarations of main, no matter whether the second parameter's type is

Re: [PATCH] Add a Windows-specific fallback to getenv(HOME);

2014-06-06 Thread Sebastian Schuberth
On 04.06.2014 18:16, Stepan Kasal wrote: plan is to switch to mingwGitDevEnv for said release. No more msysGit. Like, bu-bye. Thanks for all the fish. Interesting. With msysgit, there is the net installer - first time I installed msys/mingw sucessfully, it was as easy as Cygwin, perhaps

[PATCH 0/5] Windows dirent patches

2014-06-06 Thread Stepan Kasal
On Fri, Jun 06, 2014 at 06:33:27PM +0200, Karsten Blees wrote: The dates are actually missing from the patches, [...] oops, this was first time I tried to use git-send-email. I hope this time it'll work better. Stepan Hello, This is a series of dirent modifications, 4 tiny ones and one bigger.

[PATCH 3/5] Win32 dirent: change FILENAME_MAX to MAX_PATH

2014-06-06 Thread Stepan Kasal
From: Karsten Blees bl...@dcon.de Date: Fri, 7 Jan 2011 17:43:14 +0100 FILENAME_MAX and MAX_PATH are both 260 on Windows, however, MAX_PATH is used throughout the other Win32 code in Git, and also defines the length of file name buffers in the Win32 API (e.g. WIN32_FIND_DATA.cFileName, from which

[PATCH 4/5] Win32 dirent: clarify #include directives

2014-06-06 Thread Stepan Kasal
From: Karsten Blees bl...@dcon.de Date: Fri, 7 Jan 2011 17:47:41 +0100 Git-compat-util.h is two dirs up, and already includes dirent.h (which is the same as dirent.h due to -Icompat/win32 in the Makefile). Signed-off-by: Karsten Blees bl...@dcon.de Signed-off-by: Erik Faye-Lund

[PATCH 2/5] Win32 dirent: remove unused dirent.d_reclen member

2014-06-06 Thread Stepan Kasal
From: Karsten Blees bl...@dcon.de Date: Fri, 7 Jan 2011 17:38:25 +0100 Remove the union around dirent.d_type and the unused dirent.d_reclen member (which was necessary for compatibility with the MinGW dirent runtime, which is no longer used). Signed-off-by: Karsten Blees bl...@dcon.de

[PATCH 5/5] Win32 dirent: improve dirent implementation

2014-06-06 Thread Stepan Kasal
From: Karsten Blees bl...@dcon.de Date: Fri, 7 Jan 2011 17:57:02 +0100 Improve the dirent implementation by removing the relics that were once necessary to plug into the now unused MinGW runtime, in preparation for Unicode file name support. Move FindFirstFile to opendir, and FindClose to

[PATCH 1/5] Win32 dirent: remove unused dirent.d_ino member

2014-06-06 Thread Stepan Kasal
From: Karsten Blees bl...@dcon.de Date: Fri, 7 Jan 2011 17:34:33 +0100 There are no proper inodes on Windows, so remove dirent.d_ino and #define NO_D_INO_IN_DIRENT in the Makefile (this skips e.g. an ineffective qsort in fsck.c). Signed-off-by: Karsten Blees bl...@dcon.de Signed-off-by: Erik

Re: [msysGit] Re: [PATCH 0/5] First part of Unicode console support for msysgit

2014-06-06 Thread Stepan Kasal
Hello, On Fri, Jun 06, 2014 at 07:44:33PM +0200, Karsten Blees wrote: Karsten Blees (5): Support Unicode console output on Windows [..] you could have squashed half of Win32: fix segfault in WriteConsoleW when debugging in gdb [2] (second half in [5/5]). Detect console streams

[PATCH] gitk: show staged submodules regardless of ignore config

2014-06-06 Thread Junio C Hamano
From: Jens Lehmann jens.lehm...@web.de Date: Tue, 8 Apr 2014 21:36:08 +0200 Currently setting submodule.name.ignore and/or diff.ignoreSubmodules to all suppresses all output of submodule changes for gitk. This is really confusing, as even when the user chooses to record a new commit for an

[PATCH] git-gui: show staged submodules regardless of ignore config

2014-06-06 Thread Junio C Hamano
From: Jens Lehmann jens.lehm...@web.de Date: Tue, 8 Apr 2014 21:30:51 +0200 Currently setting submodule.name.ignore and/or diff.ignoreSubmodules to all suppresses all output of submodule changes for git-gui. This is really confusing, as even when the user chooses to record a new commit for an

Re: [PATCH 2/2] mingw: avoid const warning

2014-06-06 Thread Karsten Blees
Am 06.06.2014 21:13, schrieb Junio C Hamano: Karsten Blees karsten.bl...@gmail.com writes: Am 29.05.2014 12:47, schrieb Stepan Kasal: Fix const warnings in http-fetch.c and remote-curl.c main() where is argv declared as const. The fix should work for all future declarations of main, no

Re: [PATCH 3/5] Warn if the Windows console font doesn't support Unicode

2014-06-06 Thread Peter Krefting
Stepan Kasal: + warning(Your console font probably doesn\'t support Unicode. If + you experience strange characters in the output, consider + switching to a TrueType font such as Lucida Console!); As you mention this is an old patch series, but I would

Re: [PATCH 5/5] Win32: Thread-safe windows console output

2014-06-06 Thread Peter Krefting
Stepan Kasal: + /* only called from console_thread, so a static buffer will do */ + static wchar_t wbuf[2 * BUFFER_SIZE + 1]; Wouldn't BUFFER_SIZE + 1 (or even BUFFER_SIZE) do here? If you convert from up to BUFFER_SIZE octets of UTF-8 input, you should never get back more than

Re: [PATCH 5/5] Win32: Thread-safe windows console output

2014-06-06 Thread Karsten Blees
Am 06.06.2014 23:29, schrieb Peter Krefting: Stepan Kasal: +/* only called from console_thread, so a static buffer will do */ +static wchar_t wbuf[2 * BUFFER_SIZE + 1]; Wouldn't BUFFER_SIZE + 1 (or even BUFFER_SIZE) do here? If you convert from up to BUFFER_SIZE octets of UTF-8

[PATCH v14 03/40] refs.c: constify the sha arguments for ref_transaction_create|delete|update

2014-06-06 Thread Ronnie Sahlberg
ref_transaction_create|delete|update has no need to modify the sha1 arguments passed to it so it should use const unsigned char* instead of unsigned char*. Some functions, such as fast_forward_to(), already have its old/new sha1 arguments as consts. This function will at some point need to use

[PATCH v14 02/40] refs.c: ref_transaction_commit should not free the transaction

2014-06-06 Thread Ronnie Sahlberg
Reviewed-by: Jonathan Nieder jrnie...@gmail.com Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- builtin/update-ref.c | 1 + refs.c | 1 - refs.h | 5 ++--- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/builtin/update-ref.c b/builtin/update-ref.c

[PATCH v14 37/40] refs.c: pass a skip list to name_conflict_fn

2014-06-06 Thread Ronnie Sahlberg
Allow passing a list of refs to skip checking to name_conflict_fn. There are some conditions where we want to allow a temporary conflict and skip checking those refs. For example if we have a transaction that 1, guarantees that m is a packed refs and there is no loose ref for m 2, the transaction

[PATCH v14 20/40] sequencer.c: use ref transactions for all ref updates

2014-06-06 Thread Ronnie Sahlberg
Change to use ref transactions for all updates to refs. Reviewed-by: Jonathan Nieder jrnie...@gmail.com Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- sequencer.c | 24 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/sequencer.c b/sequencer.c index

[PATCH v14 17/40] tag.c: use ref transactions when doing updates

2014-06-06 Thread Ronnie Sahlberg
Change tag.c to use ref transactions for all ref updates. Reviewed-by: Jonathan Nieder jrnie...@gmail.com Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- builtin/tag.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/builtin/tag.c b/builtin/tag.c index

[PATCH v14 09/40] refs.c: make update_ref_write update a strbuf on failure

2014-06-06 Thread Ronnie Sahlberg
Change update_ref_write to also update an error strbuf on failure. This makes the error available to ref_transaction_commit callers if the transaction failed due to update_ref_sha1/write_ref_sha1 failures. Reviewed-by: Jonathan Nieder jrnie...@gmail.com Signed-off-by: Ronnie Sahlberg

[PATCH v14 15/40] refs.c: make ref_transaction_begin take an err argument

2014-06-06 Thread Ronnie Sahlberg
Add an err argument to _begin so that on non-fatal failures in future ref backends we can report a nice error back to the caller. While _begin can currently never fail for other reasons than OOM, in which case we die() anyway, we may add other types of backends in the future. For example, a

[PATCH v14 32/40] refs.c: make delete_ref use a transaction

2014-06-06 Thread Ronnie Sahlberg
Change delete_ref to use a ref transaction for the deletion. At the same time since we no longer have any callers of repack_without_ref we can now delete this function. Change delete_ref to return 0 on success and 1 on failure instead of the previous 0 on success either 1 or -1 on failure.

[PATCH v14 36/40] refs.c: call lock_ref_sha1_basic directly from commit

2014-06-06 Thread Ronnie Sahlberg
Skip using the lock_any_ref_for_update wrapper and call lock_ref_sha1_basic directly from the commit function. Reviewed-by: Jonathan Nieder jrnie...@gmail.com Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- refs.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff

[PATCH v14 25/40] fast-import.c: use a ref transaction when dumping tags

2014-06-06 Thread Ronnie Sahlberg
Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- fast-import.c | 29 +++-- 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/fast-import.c b/fast-import.c index 4a7b196..587ef4a 100644 --- a/fast-import.c +++ b/fast-import.c @@ -1735,15 +1735,32 @@

[PATCH v14 14/40] refs.c: update ref_transaction_delete to check for error and return status

2014-06-06 Thread Ronnie Sahlberg
Change ref_transaction_delete() to do basic error checking and return non-zero of error. Update all callers to check the return for ref_transaction_delete(). There are currently no conditions in _delete that will return error but there will be in the future. Add an err argument that will be

[PATCH v14 33/40] refs.c: pass the ref log message to _create/delete/update instead of _commit

2014-06-06 Thread Ronnie Sahlberg
Change the reference transactions so that we pass the reflog message through to the create/delete/update function instead of the commit message. This allows for individual messages for each change in a multi ref transaction. Reviewed-by: Jonathan Nieder jrnie...@gmail.com Signed-off-by: Ronnie

[PATCH v14 40/40] refs.c: make write_ref_sha1 static

2014-06-06 Thread Ronnie Sahlberg
No external users call write_ref_sha1 any more so lets declare it static. Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- refs.c | 6 +- refs.h | 3 --- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/refs.c b/refs.c index 9a3a501..c9d2a89 100644 --- a/refs.c +++

[PATCH v14 18/40] replace.c: use the ref transaction functions for updates

2014-06-06 Thread Ronnie Sahlberg
Update replace.c to use ref transactions for updates. Reviewed-by: Jonathan Nieder jrnie...@gmail.com Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- builtin/replace.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/builtin/replace.c b/builtin/replace.c

[PATCH v14 34/40] refs.c: pass NULL as *flags to read_ref_full

2014-06-06 Thread Ronnie Sahlberg
We call read_ref_full with a pointer to flags from rename_ref but since we never actually use the returned flags we can just pass NULL here instead. Reviewed-by: Jonathan Nieder jrnie...@gmail.com Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- refs.c | 2 +- 1 file changed, 1

[PATCH v14 12/40] refs.c: change ref_transaction_update() to do error checking and return status

2014-06-06 Thread Ronnie Sahlberg
Update ref_transaction_update() do some basic error checking and return non-zero on error. Update all callers to check ref_transaction_update() for error. There are currently no conditions in _update that will return error but there will be in the future. Add an err argument that will be updated

[PATCH v14 39/40] fetch.c: change s_update_ref to use a ref transaction

2014-06-06 Thread Ronnie Sahlberg
Change s_update_ref to use a ref transaction for the ref update. Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- builtin/fetch.c | 33 +++-- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/builtin/fetch.c b/builtin/fetch.c index faa1233..52f1ebc

[PATCH v14 38/40] refs.c: propagate any errno==ENOTDIR from _commit back to the callers

2014-06-06 Thread Ronnie Sahlberg
In _commit, ENOTDIR can happen in the call to lock_ref_sha1_basic, either when we lstat the new refname and it returns ENOTDIR or if the name checking function reports that the same type of conflict happened. In both cases it means that we can not create the new ref due to a name conflict. For

[PATCH v14 35/40] refs.c: move the check for valid refname to lock_ref_sha1_basic

2014-06-06 Thread Ronnie Sahlberg
Move the check for check_refname_format from lock_any_ref_for_update to lock_ref_sha1_basic. At some later stage we will get rid of lock_any_ref_for_update completely. If lock_ref_sha1_basic fails the check_refname_format test, set errno to EINVAL before returning NULL. This to guarantee that we

[PATCH v14 13/40] refs.c: change ref_transaction_create to do error checking and return status

2014-06-06 Thread Ronnie Sahlberg
Do basic error checking in ref_transaction_create() and make it return non-zero on error. Update all callers to check the result of ref_transaction_create(). There are currently no conditions in _create that will return error but there will be in the future. Add an err argument that will be

[PATCH v14 24/40] receive-pack.c: use a reference transaction for updating the refs

2014-06-06 Thread Ronnie Sahlberg
Wrap all the ref updates inside a transaction. Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- builtin/receive-pack.c | 31 ++- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c index c323081..13f4a63

  1   2   >