Bug with git merge-base and a packed ref

2016-10-12 Thread Stepan Kasal
Hello, first, I observed a bug with git pull --rebase: if the remote branch got rebased and the loval branch was updated, pull tried to rebase the whole branch, not the local increment. A reproducer would look like that # in repo1: git checkout tmp cd .. git clone repo1 repo2 cd repo1 git rebase

Re: Bug with git merge-base and a packed ref

2016-10-12 Thread Stepan Kasal
Hello, On Wed, Oct 12, 2016 at 12:32:09PM -0400, Jeff King wrote: > The --fork-point option looks in the reflog [...] > On Wed, Oct 12, 2016 at 12:37:16PM +0200, Stepan Kasal wrote: > > Could you please fix merge-base so that it understands packed refs? I bet you nailed it; nothing

Re: [PATCH] merge-base: handle --fork-point without reflog

2016-10-12 Thread Stepan Kasal
Hello, thank you for this nice and quick fix of this corner case! Stepan

Re: interactive rebase results across shared histories

2016-02-26 Thread Stepan Kasal
Hello Seb, let me add a few things, perhaps they'll clean some misunderstandings. On Fri, Feb 26, 2016 at 03:12:46PM -0600, Seb wrote: > After cleaning up all the mess, I've ended up with a long master branch, > and a series of earlier commits that are not reachable from master. > Fortunately, th

Git For Windows SDK - cannot build

2017-04-25 Thread Stepan Kasal
dependencies, I'm afraid. Hints or pointers to doc welcome. Stepan Kasal $ make LINK git-credential-store libgit.a(utf8.o): In function `reencode_string_iconv': /usr/src/git/utf8.c:463: undefined reference to `libiconv' /usr/src/git/utf8.c:463:(.text+0xf77): relocation t

[PATCH] config.c: fix a compiler warning

2014-04-16 Thread Stepan Kasal
Date: Thu, 10 Apr 2014 16:37:15 +0200 This change fixes a gcc warning when building msysGit. --- config.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config.c b/config.c index 314d8ee..0b7e4f8 100644 --- a/config.c +++ b/config.c @@ -572,7 +572,7 @@ static void die_bad

[PATCH] git tag --contains : avoid stack overflow

2014-04-16 Thread Stepan Kasal
Lafay Signed-off-by: Johannes Schindelin Tested-by: Stepan Kasal Thanks-to: Thomas Braun --- builtin/tag.c | 81 -- t/t7004-tag.sh | 21 +++ 2 files changed, 88 insertions(+), 14 deletions(-) diff --git a/builtin/tag.c b/builtin

[PATCH] Update SVN.pm

2014-04-16 Thread Stepan Kasal
From: RomanBelinsky Date: Tue, 11 Feb 2014 18:23:02 +0200 fix parsing error for dates like: 2014-01-07T5:58:36.048176Z previous regex can parse only: 2014-01-07T05:58:36.048176Z reproduced in my svn repository during conversion. Signed-off-by: Stepan Kasal --- perl/Git/SVN.pm | 2 +- 1 file

Re: [PATCH] Update SVN.pm

2014-04-16 Thread Stepan Kasal
all these "we only accept two digits" into "\d+" not only > for the hour part but also minute and second parts. But Roman's proposed regexp nicely shows 1) what the standard is and 2) what is the deviation. Have a nice day, Stepan Kasal > > Signed-off-by: Step

Re: [PATCH] Update SVN.pm

2014-04-17 Thread Stepan Kasal
Hello, cc'ing Roman, the original author. (I should have done that in the first post, sorry. I have also forwarded him another mail from this thread, asking him for author's sign off.) On Thu, Apr 17, 2014 at 10:39:49AM -0700, Junio C Hamano wrote: > Stepan Kasal writes: > &g

[PATCH v2] git tag --contains : avoid stack overflow

2014-04-23 Thread Stepan Kasal
be run on Windows. Signed-off-by: Jean-Jacques Lafay Signed-off-by: Johannes Schindelin Tested-by: Stepan Kasal --- Hello, I have found out that "ulimit -s" does not work on Windows. Adding this as a prerequisite, we will skip the test there. On Thu, Apr 17, 2014 at 05:32:38PM -0400,

Re: [PATCH v2] git tag --contains : avoid stack overflow

2014-04-23 Thread Stepan Kasal
Hello, On Wed, Apr 23, 2014 at 04:28:39PM +0200, Johannes Schindelin wrote: > The interdiff can be seen here: > https://github.com/msysgit/git/commit/c68e27d5 not exatly, is also changes the number of commits in the "deep repo" from 1000 to 4000, as peff proposed. Stepan -- To unsubscribe

Re: [PATCH v2] git tag --contains : avoid stack overflow

2014-04-23 Thread Stepan Kasal
Hi, On Wed, Apr 23, 2014 at 12:12:14PM -0700, Junio C Hamano wrote: > [Administrivia: please refrain from using Mail-Followup-To to > deflect an attempt to directly respond to you; thanks a lot for telling me. Actually, this was a mistake: I added git to the list of discussion lists, without real

Re: [PATCH v2] git tag --contains : avoid stack overflow

2014-04-24 Thread Stepan Kasal
Thanks for all suggestions and explanations. The diff against PATCH v2 is below, PATCH v3 follows. Have a nice day, Stepan Subject: [PATCH] fixup! git tag --contains : avoid stack overflow --- t/t7004-tag.sh | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a

Re: [PATCH v3] git tag --contains: avoid stack overflow

2014-04-24 Thread Stepan Kasal
be run on Windows. Signed-off-by: Jean-Jacques Lafay Signed-off-by: Johannes Schindelin Tested-by: Stepan Kasal --- Oops, actually there is one more omission, the comments needs to be fixed: -# we require bash and ulimit, this excludes Windows +# we require ulimit, this excludes Windows

[PATCH] Sleep 1 millisecond in poll() to avoid busy wait

2014-04-28 Thread Stepan Kasal
From: theoleblond Date: Wed, 16 May 2012 06:52:49 -0700 I played around with this quite a bit. After trying some more complex schemes, I found that what worked best is to just sleep 1 millisecond between iterations. Though it's a very short time, it still completely eliminates the busy wait condi

Re: [PATCH] Sleep 1 millisecond in poll() to avoid busy wait

2014-04-28 Thread Stepan Kasal
Hello, On Mon, Apr 28, 2014 at 11:07:24AM +0200, Erik Faye-Lund wrote: > compat/poll/poll.c comes from Gnulib, so it would be better to submit > the patch there and update. well, the change is in gnulib since 2012-05-21. But the two versions has diverged a lot. Could you please just accept a back

[PATCH] poll/select: prevent busy-waiting

2014-04-28 Thread Stepan Kasal
utput fd_sets. Check for zero result and loop if the wait timeout is infinite. Signed-off-by: Stepan Kasal --- compat/poll/poll.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compat/poll/poll.c b/compat/poll/poll.c index 31163f2..a9b41d8 100644 --- a/compat/poll/p

[PATCH] Windows: Always normalize paths to Windows-style

2014-04-28 Thread Stepan Kasal
erted for two years. Could you please either accept this patch, or revert 4dce7d9b ? (Both alternatives are exactly the same.) Have a nice day, Stepan Kasal git-submodule.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/git-submodule.sh b/git-submodule.sh index 4a30087..247273e 10

Re: [PATCH] Windows: Always normalize paths to Windows-style

2014-04-28 Thread Stepan Kasal
The parent of this mail should have started a new thread. Sorry for the typo. Stepan -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH v2] Sleep 1 millisecond in poll() to avoid busy wait

2014-04-28 Thread Stepan Kasal
From: theoleblond Date: Wed, 16 May 2012 06:52:49 -0700 SwitchToThread() only gives away the rest of the current time slice to another thread in the current process. So if the thread that feeds the file decscriptor we're polling is not in the current process, we get busy-waiting. I played around

Re: [PATCH v2] Sleep 1 millisecond in poll() to avoid busy wait

2014-04-28 Thread Stepan Kasal
nd to avoid busy wait Thanks for improving it. > Signed-off-by: Theodore Leblond > Signed-off-by: Stepan Kasal > Acked-by: Johannes Sixt > Acked-by: Erik Faye-Lund Sorry that I forgot to add my sign-off (Stepan). But I'm afraid I cannot add Theodore's, it was not i

[PATCH] MSVC: link dynamically to the CRT

2014-04-29 Thread Stepan Kasal
already. The DLL version also exports some of the CRT initialization functions, which are hidden in the static libcmt.lib (e.g. __wgetmainargs, required by subsequent Unicode patches). Signed-off-by: Karsten Blees Signed-off-by: Stepan Kasal --- Another patch from msysgit. Cheers, Stepan

[PATCH] wincred: add install target and avoid overwriting configured variables

2014-04-29 Thread Stepan Kasal
From: Pat Thoyts Date: Wed, 24 Oct 2012 00:15:29 +0100 Signed-off-by: Pat Thoyts Signed-off-by: Stepan Kasal --- Another one from msysGit project. Original subject by Pat; I would suggest: wincred: improve Makefile contrib/credential/wincred/Makefile | 22 ++ 1 file

Re: [PATCH] wincred: add install target and avoid overwriting configured variables

2014-04-30 Thread Stepan Kasal
Hello, > On Wed, Apr 30, 2014 at 8:46 AM, Stepan Kasal wrote: > > Date: Wed, 24 Oct 2012 00:15:29 +0100 > > > > Signed-off-by: Pat Thoyts > > Signed-off-by: Stepan Kasal > > --- > > Another one from msysGit project. > > Original subject by P

Re: [PATCH 10/12] MINGW: compat/poll/poll.c: undef NOGDI

2014-04-30 Thread Stepan Kasal
Hello, On Tue, Apr 29, 2014 at 01:12:04PM +0400, Marat Radchenko wrote: > On MinGW-W64, MsgWaitForMultipleObjects is guarded with #ifndef NOGDI. > > Removal -DNOGDI=1 from config.mak.uname has an undesirable effect of > bringing in wingdi.h with weird #define ERROR 0 that conflicts with > interna

Re: A failing attempt to use Git in a centralized environment

2014-04-30 Thread Stepan Kasal
Hello Marat, On Mon, Apr 28, 2014 at 10:29:07AM +0400, Marat Radchenko wrote: > Setup: > 20 people (programmers, artists, designers) with prior SVN I was in a similar situation: 10 people, mostly mathematicians, previous experience with Tortoise SVN. I wanted to move to Git with centralized mode

Re: [PATCH] MSVC: link dynamically to the CRT

2014-04-30 Thread Stepan Kasal
Hello Junio, On Wed, Apr 30, 2014 at 11:36:37AM -0700, Junio C Hamano wrote: > like I do not have to ask "does this look ok?" question when seeing > a patch from Erik or J6t, is it unnecessary for me to do so for a > patch from you? it _is_ necessary to ask, as I'm just a newcomer who has (fortun

Re: [PATCH 08/12] MINGW: fix main() signature in http-fetch.c and remote-curl.c

2014-04-30 Thread Stepan Kasal
Hello, On Wed, Apr 30, 2014 at 10:35:56AM +0200, Karsten Blees wrote: > Would you mind cross checking your changes with the msysgit fork? > [...] > See https://github.com/msysgit/git/commit/9206e7fd (squashed from > https://github.com/msysgit/git/commit/0115ef83 and > https://github.com/msysgit/gi

[PATCH] Win32: move main macro to a function

2014-04-30 Thread Stepan Kasal
-off-by: Stepan Kasal --- Hello, this is commit 0115ef83 alias 9206e7fd that Karsten mentioned. Junio, this one has been in msysgit for 2 or 3 years, so you can suppose it is acked. Have a nice day, Stepan compat/mingw.c | 15 +++ compat/mingw.h | 16 +--- 2

Re: [PATCH 10/12] MINGW: compat/poll/poll.c: undef NOGDI

2014-05-04 Thread Stepan Kasal
Hello Marat, On Sat, May 03, 2014 at 11:00:51AM +0400, Marat Radchenko wrote: > On Wed, Apr 30, 2014 at 01:41:25PM +0200, Stepan Kasal wrote: > > On Tue, Apr 29, 2014 at 01:12:04PM +0400, Marat Radchenko wrote: > > > On MinGW-W64, MsgWaitForMultipleObjects is guarded

Re: [PATCH 10/12] MINGW: compat/poll/poll.c: undef NOGDI

2014-05-05 Thread Stepan Kasal
Hello, On Mon, May 05, 2014 at 12:55:52AM +0400, Marat Radchenko wrote: > On Sun, May 04, 2014 at 08:52:44PM +0200, Stepan Kasal wrote: > > is really a work around: it would be in effect only for MinGW-W64, > > and the comment would explain that this is a hack to work aro

Re: [msysGit] Re: [PATCH 10/12] MINGW: compat/poll/poll.c: undef NOGDI

2014-05-05 Thread Stepan Kasal
On Mon, May 05, 2014 at 02:32:11AM -0500, Felipe Contreras wrote: > Stepan Kasal wrote: > > +ifneq ($(uname_M),x86_64) > > + # MinGW-W64 < x.y headers do not provide MsgWaitForMultipleObjects with > > NOGDI > > MinGW-w64 != x86_64; it provides a i686 compiler as w

Re: [PATCH] Windows: Always normalize paths to Windows-style

2014-05-08 Thread Stepan Kasal
Hello, On Wed, May 07, 2014 at 01:40:05PM -0700, Junio C Hamano wrote: > Heiko Voigt writes: > > On Mon, Apr 28, 2014 at 04:29:31PM +0200, Stepan Kasal wrote: > >> this is another patch that lives in msysGit for a long time. > >> Originally, it had two parts: > >

[PATCH] Revert "submodules: fix ambiguous absolute paths under Windows"

2014-05-08 Thread Stepan Kasal
This reverts commit 4dce7d9b408b2935b85721b54a2010eda7ec1be9, which was originally done to help Windows but was almost immediately reverted in msysGit, and the codebase kept this unnecessary divergence for almost two years. Signed-off-by: Stepan Kasal Signed-off-by: Junio C Hamano --- On Thu

[PATCH 0/2] wincred makefile changes

2014-05-12 Thread Stepan Kasal
Hello again, I revisited a patch that is present in msysgit since Oct 2012. Dropping the cosmetic changes, there are two separate parts: Pat Thoyts (2): wincred: add install target wincred: avoid overwriting configured variables wincred: add install target Git for Windows does contain gi

[PATCH 1/2] wincred: add install target

2014-05-12 Thread Stepan Kasal
From: Pat Thoyts Date: Wed, 24 Oct 2012 00:15:29 +0100 Signed-off-by: Pat Thoyts Signed-off-by: Stepan Kasal --- contrib/credential/wincred/Makefile | 8 1 file changed, 8 insertions(+) diff --git a/contrib/credential/wincred/Makefile b/contrib/credential/wincred/Makefile index

[PATCH 2/2] wincred: avoid overwriting configured variables

2014-05-12 Thread Stepan Kasal
From: Pat Thoyts Date: Wed, 24 Oct 2012 00:15:29 +0100 Signed-off-by: Pat Thoyts Signed-off-by: Stepan Kasal --- contrib/credential/wincred/Makefile | 4 1 file changed, 4 deletions(-) diff --git a/contrib/credential/wincred/Makefile b/contrib/credential/wincred/Makefile index 39fa5e0

[PATCH 2/2] wincred: avoid overwriting configured variables

2014-05-12 Thread Stepan Kasal
From: Pat Thoyts Date: Wed, 24 Oct 2012 00:15:29 +0100 Signed-off-by: Pat Thoyts Signed-off-by: Stepan Kasal --- Hi kusma, On Tue, May 13, 2014 at 08:34:36AM +0200, Erik Faye-Lund wrote: > Would it be better to set these if not already set, i.e: > > -CC = gcc > -RM = rm -f >

Re: [PATCH 2/2] wincred: avoid overwriting configured variables

2014-05-13 Thread Stepan Kasal
Hello, On Tue, May 13, 2014 at 08:18:26AM -0500, Felipe Contreras wrote: > Set by whom? If it's by the environment you should be running 'make -e'. ... or on command line (through recursive make, prehaps). But these both take precedence over makefile assignments. Another issue is the interaction

[PATCH] grep -I: do not bother to read known-binary files

2014-05-14 Thread Stepan Kasal
ding if -I was passed. Signed-off-by: Johannes Schindelin Signed-off-by: Stepan Kasal --- Hi, this patch has been in msysgit for 3.5 years. Stepan builtin/grep.c | 25 + 1 file changed, 25 insertions(+) diff --git a/builtin/grep.c b/builtin/grep.c index 43af5b7..8073f

[PATCH] git grep -O -i: if the pager is 'less', pass the '-i' option

2014-05-14 Thread Stepan Kasal
From: Johannes Schindelin Date: Tue, 8 Feb 2011 00:17:24 -0600 Signed-off-by: Johannes Schindelin Signed-off-by: Stepan Kasal --- Hi, this patch has been in msysgit for 3 1/4 years. Stepan builtin/grep.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/builtin/grep.c b/builtin/grep.c

Re: [PATCH] git grep -O -i: if the pager is 'less', pass the '-i' option

2014-05-14 Thread Stepan Kasal
Hello, On Wed, May 14, 2014 at 11:26:54AM -0700, Jonathan Nieder wrote: > But as is, it's an improvement, so (except that "-i" should be > replaced by "-I") it seems like a good change. indeed, "-I" would match the semantics of git-grep -i . Stepan -- To unsubscribe from this list: send the line

[PATCH] transport-helper: add trailing --

2014-05-14 Thread Stepan Kasal
From: Sverre Rabbelier Date: Sat, 28 Aug 2010 20:49:01 -0500 [PT: ensure we add an additional element to the argv array] Signed-off-by: Stepan Kasal --- Hi, this patch was present in msysgit from Mar 2012. Do you like it? I'm sorry, there is no author signoff; is the patch small e

[PATCH/RFC] Always auto-gc after calling a fast-import transport

2014-05-14 Thread Stepan Kasal
megabytes to about 14. In the future, we may want to make this configurable on a per-remote basis, or maybe teach fast-import about it in the first place. Signed-off-by: Johannes Schindelin Signed-off-by: Stepan Kasal --- Hello, another patch that waited in msysgit for 2 years. Could anyone on the

Re: [PATCH] transport-helper: add trailing --

2014-05-15 Thread Stepan Kasal
Hi Peff, On Thu, May 15, 2014 at 05:00:13AM -0400, Jeff King wrote: > I just posted a series that addresses those leaks and converts this > site. I do not want to hold your patch hostage to my series, [...] no problem, let's return to it later. Stepan -- To unsubscribe from this list: send the l

Re: [PATCH] grep -I: do not bother to read known-binary files

2014-05-16 Thread Stepan Kasal
Hello, On Thu, May 15, 2014 at 03:22:26PM -0400, Jeff King wrote: > As the person who is proposing the patch for git.git, I would hope > Stepan would follow up on such review and confirm whether or not it is > still needed. well, I try to. (I verified that "less -I" works in msysGit before submi

Re: [PATCH] grep -I: do not bother to read known-binary files

2014-05-16 Thread Stepan Kasal
Hi, On Fri, May 16, 2014 at 04:29:58AM -0400, Jeff King wrote: > [..] I hope I did not sound like "blame Stepan, he was screwed up". no, you did not, it was ok. > From msysgit's perspective, they may or may not want to revert the patch > that they already have. That is a _separate_ issue, and I

[PATCH] Windows: Allow using UNC path for git repository

2014-05-19 Thread Stepan Kasal
le.com/group/msysgit/browse_thread/thread/c0af578549b5dda0 Author: Eric Sunshine Signed-off-by: Cezary Zawadka Signed-off-by: Eric Sunshine Signed-off-by: Erik Faye-Lund Signed-off-by: Johannes Schindelin Signed-off-by: Stepan Kasal --- Hello, this is another patch that lived in msysGit for

Re: [PATCH] Windows: Allow using UNC path for git repository

2014-05-20 Thread Stepan Kasal
Hello, On Tue, May 20, 2014 at 11:57:56AM -0700, Junio C Hamano wrote: > It would be nice if somebody in the S-o-b chain can double-check > that the "combined" version is sane. [...] "Combined" was an unfortunate word. There was a pair of successive commits in msysgit all the time. I just deci

[PATCH 0/2] mingw: macro main(), const warnings

2014-05-29 Thread Stepan Kasal
integration into msysGit if this patch gets accepted. To make it easier, I'm submitting a patch that has been part of msysGit for 3 years. Karsten Blees (1): Win32: move main macro to a function Stepan Kasal (1): mingw: avoid const warning compat/mingw.c | 15 +++ compat/mi

[PATCH 1/2] Win32: move main macro to a function

2014-05-29 Thread Stepan Kasal
From: Karsten Blees Date: Fri, 7 Jan 2011 19:47:23 +0100 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 Signed-off-by: Erik Faye-Lund Signed-off-by: Stepan Kasal

[PATCH 2/2] mingw: avoid const warning

2014-05-29 Thread 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 *[]". Signed-off-by: St

[PATCH] tests: turn off git-daemon tests if FIFOs are not available

2014-05-29 Thread Stepan Kasal
Signed-off-by: Stepan Kasal --- Hi, mingw does not have FIFOs, so it cannot run git-daemon tests. Stepan t/lib-git-daemon.sh | 5 + 1 file changed, 5 insertions(+) diff --git a/t/lib-git-daemon.sh b/t/lib-git-daemon.sh index bc4b341..9b1271c 100644 --- a/t/lib-git-daemon.sh +++ b/t/lib

[PATCH] t5000, t5003: do not use test_cmp to compare binary files

2014-06-04 Thread Stepan Kasal
characters (introduced in commit 4d715ac0). This function usually speeds things up, as fork is extremly slow on Windows. But no wonder that this function is extremely slow and sometimes even crashes when comparing large tar or zip files. Signed-off-by: Stepan Kasal --- t/t5000-tar-tree.sh

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

2014-06-04 Thread Stepan Kasal
From: Johannes Schindelin Date: Wed, 2 Jun 2010 00:41:33 +0200 If HOME is not set, use $HOMEDRIVE/$HOMEPATH Signed-off-by: Johannes Schindelin Signed-off-by: Stepan Kasal --- Hi, this patch is present in msysGit for 4 years. Stepan compat/mingw.c| 18 ++ compat

Re: [PATCH] t5000, t5003: do not use test_cmp to compare binary files

2014-06-04 Thread Stepan Kasal
Hello Thomas, On Wed, Jun 04, 2014 at 02:13:44PM +0200, Thomas Braun wrote: > Wouldn't a function like test_cmp_bin() be better suited for all? I also considered it. The advantage is that is shows that this intentionally differs from test_cmp. > The windows folks can then use cmp inside test_cm

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

2014-06-04 Thread Stepan Kasal
Hello, On Wed, Jun 04, 2014 at 08:47:58PM +0700, Duy Nguyen wrote: > setenv("HOME") if it's missing instead? MinGW port already replaces > main(). Extra initialization should not be a problem. well, I would be afraid to modify the environment for subprocesses. It could hit back in certain situati

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

2014-06-04 Thread Stepan Kasal
Hi dscho, > > On Wed, Jun 4, 2014 at 5:14 PM, Johannes Schindelin > > wrote: > > > No. Git is not always called through Bash or the git-wrapper, > > > unfortunately. but you have to admit, that in most cases it is called through bash or the git wrapper. > The problem arises whenever git.exe cal

[PATCH v2] t5000, t5003: do not use test_cmp to compare binary files

2014-06-04 Thread Stepan Kasal
characters (introduced in commit 4d715ac0). This function usually speeds things up, as fork is extremly slow on Windows. But no wonder that this function is extremely slow and sometimes even crashes when comparing large tar or zip files. Signed-off-by: Stepan Kasal --- Hi Thomas, On Wed, Jun 0

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

2014-06-04 Thread Stepan Kasal
Hi dscho, your arguments seem really strong. (Especially the four years of battle testing, with the memories of constant problems with HOME before.) I hope they are strong enough to convince Junio to accept this patch; that would help. Stepan PS (about mingwGitDevEnv): > plan is to switch to m

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

2014-06-05 Thread Stepan Kasal
From: Johannes Schindelin Date: Wed, 2 Jun 2010 00:41:33 +0200 If HOME is not set, use $HOMEDRIVE$HOMEPATH Signed-off-by: Johannes Schindelin Signed-off-by: Stepan Kasal --- Hello Karsten, thanks for your explanation. There are more things to be done, but I hope you can ack this patch as a

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

2014-06-05 Thread Stepan Kasal
wrapper definition. Signed-off-by: Stepan Kasal --- compat/mingw.c | 20 1 file changed, 20 insertions(+) diff --git a/compat/mingw.c b/compat/mingw.c index a0e13bc..e7193c0 100644 --- a/compat/mingw.c +++ b/compat/mingw.c @@ -224,6 +224,7 @@ int mingw_unlink(const char

[PATCH v3] Add a Windows-specific fallback to getenv("HOME");

2014-06-05 Thread Stepan Kasal
From: Johannes Schindelin Date: Wed, 2 Jun 2010 00:41:33 +0200 If HOME is not set, use $HOMEDRIVE$HOMEPATH Signed-off-by: Johannes Schindelin Signed-off-by: Stepan Kasal --- On Thu, Jun 05, 2014 at 10:32:44AM +0200, Torsten Bögershausen wrote: > > + strbuf_addf(&

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

2014-06-05 Thread Stepan Kasal
Hello, On Thu, Jun 05, 2014 at 11:40:50AM +0200, Karsten Blees wrote: > Am 05.06.2014 10:03, schrieb Stepan Kasal: > > I hope you can ack this patch as a step forward. > > No, not really. It's sure better than introducing a special > get_home_directory(), but it still inc

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

2014-06-05 Thread Stepan Kasal
Hi, On Thu, Jun 05, 2014 at 02:03:39PM +0200, Johannes Schindelin wrote: > Render me even more convinced that the API call is the cleanest way to go, But not me. In a paralel post, Duy Nguyen wrote: > Thank you for working on pushing msysgit patches upstream. I don't use > git on windows, but

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

2014-06-05 Thread Stepan Kasal
Hello Karsten, On Thu, Jun 05, 2014 at 04:51:39PM +0200, Karsten Blees wrote: > In the current msysgit HEAD, most of these #undef's can simply be > removed or have already been removed [...] not "most of." According to my quick count, 6 of 20 have been removed, 2 more can be removed. The remain

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 o

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 t

[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 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 mingw_

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 imm

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

2014-06-06 Thread Stepan Kasal
iably detect console handles (also don't initialize internal state from an uninitialized CONSOLE_SCREEN_BUFFER_INFO structure if the function fails). Signed-off-by: Karsten Blees Signed-off-by: Johannes Schindelin Signed-off-by: Stepan Kasal --- compat/wina

[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 memb

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

2014-06-06 Thread Stepan Kasal
ations. Many thanks to Atsushi Nakagawa for suggesting and reviewing the thread-exit-mechanism. Signed-off-by: Karsten Blees Signed-off-by: Stepan Kasal --- compat/mingw.c | 9 +- compat/mingw.h | 12 +- compat/winansi.c | 402 --- 3 fi

[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. Regar

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

2014-06-06 Thread Stepan Kasal
tricks in the setup program. This change prints a warning on exit if console output contained non-ascii characters and the console font is supposedly not a TrueType font (which usually have decent Unicode support). Signed-off-by: Karsten Blees Signed-off-by: Johannes Schindelin Signed-

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

2014-06-06 Thread Stepan Kasal
) if out of memory, rather than failing with ENOMEM and letting git work on incomplete directory listings (error handling in dir.c is quite sparse). Signed-off-by: Karsten Blees Signed-off-by: Erik Faye-Lund Signed-off-by: Stepan Kasal --- compat/win32/dirent.c | 113 --

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

2014-06-06 Thread Stepan Kasal
From: Karsten Blees 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 Signed-off-by: Johannes Schindelin Signed-off-by: Stepan Kasal

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

2014-06-06 Thread Stepan Kasal
From: Karsten Blees Git-compat-util.h is two dirs up, and already includes (which is the same as "dirent.h" due to -Icompat/win32 in the Makefile). Signed-off-by: Karsten Blees Signed-off-by: Erik Faye-Lund Signed-off-by: Stepan Kasal --- compat/win32/dirent.c | 3 +-- 1 file

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

2014-06-06 Thread Stepan Kasal
From: Karsten Blees 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 Signed-off-by: Erik Faye-Lund Signed-off-by: Stepan Kasal --- compat/win32/dirent.h

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

2014-06-06 Thread Stepan Kasal
ff-by: Karsten Blees Signed-off-by: Erik Faye-Lund Signed-off-by: Stepan Kasal --- compat/win32/dirent.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compat/win32/dirent.h b/compat/win32/dirent.h index 7f4e6c7..8838cd6 100644 --- a/compat/win32/dirent.h +++ b/compat/win32/dir

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

2014-06-06 Thread Stepan Kasal
From: Karsten Blees 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 Signed-off-by: Erik Faye-Lund Signed-off-by: Stepan Kasal --- compat/mingw.c | 15

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

2014-06-06 Thread Stepan Kasal
From: Karsten Blees 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 Signed-off-by: Erik Faye-Lund Signed-off-by: Stepan Kasal --- compat

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

[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
27;re copying the dirent data). Signed-off-by: Karsten Blees Signed-off-by: Erik Faye-Lund Signed-off-by: Stepan Kasal --- compat/win32/dirent.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compat/win32/dirent.h b/compat/win32/dirent.h index 7f4e6c7..8838cd6 100644 --- a/compat/

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

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

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

2014-06-06 Thread Stepan Kasal
Signed-off-by: Stepan Kasal --- compat/win32/dirent.h | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/compat/win32/dirent.h b/compat/win32/dirent.h index b38973b..7f4e6c7 100644 --- a/compat/win32/dirent.h +++ b/compat/win32/dirent.h @@ -10,10 +10,7 @@ typedef struct DIR DIR

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

2014-06-06 Thread Stepan Kasal
t function xmalloc, so opendir will die() if out of memory, rather than failing with ENOMEM and letting git work on incomplete directory listings (error handling in dir.c is quite sparse). Signed-off-by: Karsten Blees Signed-off-by: Erik Faye-Lund Signed-off-by: St

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

2014-06-06 Thread Stepan Kasal
: Stepan Kasal --- compat/win32/dirent.h | 1 - config.mak.uname | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/compat/win32/dirent.h b/compat/win32/dirent.h index 927a25c..b38973b 100644 --- a/compat/win32/dirent.h +++ b/compat/win32/dirent.h @@ -9,7 +9,6 @@ typedef struct

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 cons

[PATCH v2 0/2] mingw: macro main(), const warnings

2014-06-06 Thread Stepan Kasal
Indeed, verified. Re-submitting. Cheers, Stepan Karsten Blees (1): Win32: move main macro to a function Stepan Kasal (1): mingw: avoid const warning compat/mingw.c | 15 +++ compat/mingw.h | 14 -- 2 files changed, 19 insertions(+), 10 deletions(

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

2014-06-06 Thread 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 *[]". Signed-off-by: St

[PATCH v2 1/2] Win32: move main macro to a function

2014-06-06 Thread Stepan Kasal
From: Karsten Blees Date: Fri, 7 Jan 2011 19:47:23 +0100 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 Signed-off-by: Erik Faye-Lund Signed-off-by: Stepan Kasal

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

2014-06-07 Thread Stepan Kasal
Hi, On Fri, Jun 06, 2014 at 10:18:43PM +0100, Peter Krefting wrote: > Stepan Kasal: >> +"switching to a TrueType font such as Lucida Console!"); [...] > modernizing the suggestion here to recomment "Consolas". It is available Indeed. So, I'

[PATCH v2 1/6] Support Unicode console output on Windows

2014-06-07 Thread Stepan Kasal
Signed-off-by: Stepan Kasal --- compat/mingw.h | 2 ++ compat/winansi.c | 26 -- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/compat/mingw.h b/compat/mingw.h index 6dc8b1a..d3cffb7 100644 --- a/compat/mingw.h +++ b/compat/mingw.h @@ -320,9 +320,11

[PATCH v2 4/6] Win32: add Unicode conversion functions

2014-06-07 Thread Stepan Kasal
file system APIs). Signed-off-by: Karsten Blees Signed-off-by: Stepan Kasal --- compat/mingw.c | 85 ++ compat/mingw.h | 104 + 2 files changed, 189 insertions(+) diff --git a/compat/mingw.c b

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

2014-06-07 Thread Stepan Kasal
but works well with these limitations. Many thanks to Atsushi Nakagawa for suggesting and reviewing the thread-exit-mechanism. Signed-off-by: Karsten Blees Signed-off-by: Stepan Kasal --- compat/mingw.c | 9 +- compat/mingw.h | 12 +- compat/winansi.c | 401 +++

[PATCH v2 6/6] Win32: fix broken pipe detection

2014-06-07 Thread Stepan Kasal
Blees Signed-off-by: Stepan Kasal --- compat/mingw.h | 2 - compat/winansi.c | 114 ++- 2 files changed, 70 insertions(+), 46 deletions(-) diff --git a/compat/mingw.h b/compat/mingw.h index 4b638d8..8dac6f9 100644 --- a/compat/mingw.h +++ b/comp

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

2014-06-07 Thread Stepan Kasal
Hello, this patch series is to be applied on top of "move main() macro to a function", discussed in another thread. I added the two patches Karsten mentioned: Win32: add Unicode conversion functions Win32: fix broken pipe detection I also copied the links for the fixups incuded. Regards,

  1   2   >