* First cut at git port to Cygwin
@ 2005-09-29 0:53 H. Peter Anvin
2005-09-29 4:30 ` Junio C Hamano
` (5 more replies)
0 siblings, 6 replies; 62+ messages in thread
From: H. Peter Anvin @ 2005-09-29 0:53 UTC (permalink / raw)
To: Git Mailing List
I have made a first cut at a git port to Cygwin. It looks like the
"git-diff-tree -p" problem has been resolved independently, or at least
I can't reproduce it on a fresh Cygwin install (running on XP Home), but
I have added support for running without the IPv6 and the getaddrinfo() API.
There are still funnies. In particular, Cygwin and Samba handle
symlinks differently, so you can't trivially share a repository via
Samba. Linus' "symbolic refs" changes should eventually take care of that.
Another funny which I haven't been able to figure out yet is that 'gitk'
scrunches all its output up into a few pixels at the top of the window.
If I maximize the window, I can manually resize most of the panes and
the output looks correct, but the highlighted text in the top panes show
up in black on a really really dark blue background and is thus illegible.
I have set up a git-on-Cygwin temporary tree at:
http://www.kernel.org/pub/scm/git/git-cygwin.git
-hpa
^ permalink raw reply [flat|nested] 62+ messages in thread
* Re: First cut at git port to Cygwin
2005-09-29 0:53 First cut at git port to Cygwin H. Peter Anvin
@ 2005-09-29 4:30 ` Junio C Hamano
2005-09-29 5:07 ` H. Peter Anvin
2005-09-29 4:46 ` Martin Langhoff
` (4 subsequent siblings)
5 siblings, 1 reply; 62+ messages in thread
From: Junio C Hamano @ 2005-09-29 4:30 UTC (permalink / raw)
To: H. Peter Anvin; +Cc: git
"H. Peter Anvin" <hpa@zytor.com> writes:
> There are still funnies. In particular, Cygwin and Samba handle
> symlinks differently, so you can't trivially share a repository via
> Samba. Linus' "symbolic refs" changes should eventually take care of that.
I just sent out "The other side of Linus' symbolic refs" patch,
saying that Cygwin capable of doing symlink would probably made
it irrelevant. But it may not be a waste after all, considering
what you said above.
^ permalink raw reply [flat|nested] 62+ messages in thread
* Re: First cut at git port to Cygwin
2005-09-29 0:53 First cut at git port to Cygwin H. Peter Anvin
2005-09-29 4:30 ` Junio C Hamano
@ 2005-09-29 4:46 ` Martin Langhoff
2005-09-29 5:13 ` Junio C Hamano
2005-09-29 6:19 ` H. Peter Anvin
2005-09-29 8:46 ` Johannes Schindelin
` (3 subsequent siblings)
5 siblings, 2 replies; 62+ messages in thread
From: Martin Langhoff @ 2005-09-29 4:46 UTC (permalink / raw)
To: H. Peter Anvin; +Cc: Git Mailing List
On 9/29/05, H. Peter Anvin <hpa@zytor.com> wrote:
> Another funny which I haven't been able to figure out yet is that 'gitk'
> scrunches all its output up into a few pixels at the top of the window.
> If I maximize the window, I can manually resize most of the panes and
> the output looks correct
This is visible on OSX too, and someone's mentioned it's a Tk oddity
with rootless X. Does it do the same if you run X with a root window?
> I have set up a git-on-Cygwin temporary tree at:
>
> http://www.kernel.org/pub/scm/git/git-cygwin.git
Getting a 404 on that. Doesn't show up on gitweb either. I guess I
have to wait...
Is there a way to get gitweb to "compare" branches using git-cherry? I
often look at branches via git-web and it's impossible to tell what
makes them unique...
cheers,
martin
^ permalink raw reply [flat|nested] 62+ messages in thread
* Re: First cut at git port to Cygwin
2005-09-29 4:30 ` Junio C Hamano
@ 2005-09-29 5:07 ` H. Peter Anvin
0 siblings, 0 replies; 62+ messages in thread
From: H. Peter Anvin @ 2005-09-29 5:07 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
Junio C Hamano wrote:
> "H. Peter Anvin" <hpa@zytor.com> writes:
>
>
>>There are still funnies. In particular, Cygwin and Samba handle
>>symlinks differently, so you can't trivially share a repository via
>>Samba. Linus' "symbolic refs" changes should eventually take care of that.
>
>
> I just sent out "The other side of Linus' symbolic refs" patch,
> saying that Cygwin capable of doing symlink would probably made
> it irrelevant. But it may not be a waste after all, considering
> what you said above.
>
After looking at it some more, what Samba does when talking to a host
that doesn't support Unix extensions is that it simply resolves the
symlink, in effect turning it into a hard link. That might be all git
needs. The reverse still doesn't work, though.
-hpa
^ permalink raw reply [flat|nested] 62+ messages in thread
* Re: First cut at git port to Cygwin
2005-09-29 4:46 ` Martin Langhoff
@ 2005-09-29 5:13 ` Junio C Hamano
2005-09-29 6:19 ` H. Peter Anvin
1 sibling, 0 replies; 62+ messages in thread
From: Junio C Hamano @ 2005-09-29 5:13 UTC (permalink / raw)
To: Martin Langhoff; +Cc: git
Martin Langhoff <martin.langhoff@gmail.com> writes:
> Is there a way to get gitweb to "compare" branches using git-cherry? I
> often look at branches via git-web and it's impossible to tell what
> makes them unique...
Now that you mention it, I felt that too. Maybe git-show-branch
output could help somehow?
^ permalink raw reply [flat|nested] 62+ messages in thread
* Re: First cut at git port to Cygwin
2005-09-29 4:46 ` Martin Langhoff
2005-09-29 5:13 ` Junio C Hamano
@ 2005-09-29 6:19 ` H. Peter Anvin
1 sibling, 0 replies; 62+ messages in thread
From: H. Peter Anvin @ 2005-09-29 6:19 UTC (permalink / raw)
To: Martin Langhoff; +Cc: Git Mailing List
Martin Langhoff wrote:
>
>>I have set up a git-on-Cygwin temporary tree at:
>>
>>http://www.kernel.org/pub/scm/git/git-cygwin.git
>
> Getting a 404 on that. Doesn't show up on gitweb either. I guess I
> have to wait...
>
Well, it's up there now.
-hpa
^ permalink raw reply [flat|nested] 62+ messages in thread
* Re: First cut at git port to Cygwin
2005-09-29 0:53 First cut at git port to Cygwin H. Peter Anvin
2005-09-29 4:30 ` Junio C Hamano
2005-09-29 4:46 ` Martin Langhoff
@ 2005-09-29 8:46 ` Johannes Schindelin
2005-09-29 16:11 ` H. Peter Anvin
2005-09-29 17:25 ` H. Peter Anvin
2005-09-30 10:02 ` Junio C Hamano
` (2 subsequent siblings)
5 siblings, 2 replies; 62+ messages in thread
From: Johannes Schindelin @ 2005-09-29 8:46 UTC (permalink / raw)
To: H. Peter Anvin; +Cc: Git Mailing List
Hi,
On Wed, 28 Sep 2005, H. Peter Anvin wrote:
> Another funny which I haven't been able to figure out yet is that 'gitk'
> scrunches all its output up into a few pixels at the top of the window.
See my mail about rootless X11. I went about working around that
particular Tk bug by specifying the dimensions of the panes explicitely.
However, I was not especially happy with my workaround, since it did not
reproduce the layout exactly after a restart. Maybe you can figure it out
how to do that.
Ciao,
Dscho
^ permalink raw reply [flat|nested] 62+ messages in thread
* Re: First cut at git port to Cygwin
2005-09-29 8:46 ` Johannes Schindelin
@ 2005-09-29 16:11 ` H. Peter Anvin
2005-09-29 17:25 ` H. Peter Anvin
1 sibling, 0 replies; 62+ messages in thread
From: H. Peter Anvin @ 2005-09-29 16:11 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: Git Mailing List
Johannes Schindelin wrote:
> Hi,
>
> On Wed, 28 Sep 2005, H. Peter Anvin wrote:
>
>>Another funny which I haven't been able to figure out yet is that 'gitk'
>>scrunches all its output up into a few pixels at the top of the window.
>
> See my mail about rootless X11. I went about working around that
> particular Tk bug by specifying the dimensions of the panes explicitely.
> However, I was not especially happy with my workaround, since it did not
> reproduce the layout exactly after a restart. Maybe you can figure it out
> how to do that.
>
Unlikely, since I'm a complete Tcl/Tk illiterate.
-hpa
^ permalink raw reply [flat|nested] 62+ messages in thread
* Re: First cut at git port to Cygwin
2005-09-29 8:46 ` Johannes Schindelin
2005-09-29 16:11 ` H. Peter Anvin
@ 2005-09-29 17:25 ` H. Peter Anvin
1 sibling, 0 replies; 62+ messages in thread
From: H. Peter Anvin @ 2005-09-29 17:25 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: Git Mailing List
Johannes Schindelin wrote:
> Hi,
>
> On Wed, 28 Sep 2005, H. Peter Anvin wrote:
>
>>Another funny which I haven't been able to figure out yet is that 'gitk'
>>scrunches all its output up into a few pixels at the top of the window.
>
> See my mail about rootless X11. I went about working around that
> particular Tk bug by specifying the dimensions of the panes explicitely.
> However, I was not especially happy with my workaround, since it did not
> reproduce the layout exactly after a restart. Maybe you can figure it out
> how to do that.
>
It looks like this isn't a rootless *X* thing; it looks like the wish
that is included with Cygwin actually opens native Win32 windows; even
when run from inside a rooted X session it still opens an external
window. I also tried using the wish from the latest ActiveState
distribution; it exhibits the same problem although with slightly
different geometries.
-hpa
^ permalink raw reply [flat|nested] 62+ messages in thread
* Re: First cut at git port to Cygwin
2005-09-29 0:53 First cut at git port to Cygwin H. Peter Anvin
` (2 preceding siblings ...)
2005-09-29 8:46 ` Johannes Schindelin
@ 2005-09-30 10:02 ` Junio C Hamano
2005-09-30 17:01 ` H. Peter Anvin
2005-10-04 12:31 ` Alex Riesen
2005-10-05 13:16 ` Jonas Fonseca
5 siblings, 1 reply; 62+ messages in thread
From: Junio C Hamano @ 2005-09-30 10:02 UTC (permalink / raw)
To: H. Peter Anvin; +Cc: git
"H. Peter Anvin" <hpa@zytor.com> writes:
> I have set up a git-on-Cygwin temporary tree at:
>
> http://www.kernel.org/pub/scm/git/git-cygwin.git
: siamese; git clone http://kernel.org/pub/scm/git/git-cygwin.git/ git-cygwin
defaulting to local storage area
Cannot get remote repository information.
Perhaps git-update-server-info needs to be run there?
Could you do update-server-info there, please?
hera$ cd /pub/scm/git/git-cygwin.git
hera$ GIT_DIR=. git-update-server-info
Knowing nothing about Cygwin environment, here are some
comments.
+# Define NO_IPV6 if you lack IPv6 support and getaddrinfo().
This part probably is applicable outside Cygwin. At some point,
can we have it in the mainline please?
# The ones that do not have to link with lcrypto nor lz.
SIMPLE_PROGRAMS = \
- git-get-tar-commit-id git-mailinfo git-mailsplit git-stripspace \
- git-daemon git-var
+ git-get-tar-commit-id$(X) git-mailinfo$(X) git-mailsplit$(X) \
+ git-stripspace$(X) git-var$(X) git-daemon$(X)
I have seen these $(X) in other programs' ports and found them
quite distasteful. Since I do not have immediate suggestions
for improvements, I do not have rights to complain, though.
Spelling it $X is a bit less distracting but not that much
better. Maybe "SIMPLE_PROGRAM_NAMES = git-foo git-bar" and
"SIMPLE_PROGRAMS = $(patsubst %,%$X,$(SIMPLE_PROGRAM_NAMES))"...
but that would not help bits like this:
- PROGRAMS += git-http-fetch
+ PROGRAMS += git-http-fetch$(X)
or this:
-git-%: %.o $(LIB_FILE)
+git-%$(X): %.o $(LIB_FILE)
... so I'd shut up about this part.
diff --git a/daemon.c b/daemon.c
--- a/daemon.c
+++ b/daemon.c
@@ -1,9 +1,11 @@
#include "cache.h"
#include "pkt-line.h"
+#include <alloca.h>
Why? I do not see any use of alloca in the added code...
+#include <sys/poll.h>
Is poll preferrable over select in general? Some may have only
select available and others may have only poll available,
perhaps? In any case, this is probably relevant to wider
audience than just Cygwin; please give it to mainline at some
point, perhaps conditionally allowing either/both.
+ *socklist_p = malloc(sizeof(int));
+ pfd = calloc(socknum, sizeof(struct pollfd));
Please use xmalloc and xcalloc just for consistency.
test -x $path/git-$cmd && exec $path/git-$cmd "$@" ;;
+
+ # In case we're running on Cygwin...
+ test -x $path/git-$cmd.exe && exec $path/git-$cmd.exe "$@" ;;
esac
Hmph, I think you forgot to drop double semicolon there.
The git.sh script is munged by Makefile so presumably we could
fix this part up there, like:
git: git.sh Makefile
rm -f $@+ $@
sed -e '1s|#!.*/sh|#!$(SHELL_PATH)|' \
-e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \
-e 's/@@X@@/$X/g' <$@.sh >$@+
chmod +x $@+
mv $@+ $@
And then (a patch on top of your "master"):
diff --git a/git.sh b/git.sh
--- a/git.sh
+++ b/git.sh
@@ -12,10 +12,14 @@ case "$#" in
exit 0 ;;
esac
- test -x $path/git-$cmd && exec $path/git-$cmd "$@" ;;
+ test -x $path/git-$cmd && exec $path/git-$cmd "$@"
- # In case we're running on Cygwin...
- test -x $path/git-$cmd.exe && exec $path/git-$cmd.exe "$@" ;;
+ case '@@X@@' in
+ '')
+ ;;
+ *)
+ test -x $path/git-$cmd@@X@@ && exec $path/git-$cmd@@X@@ "$@" ;;
+ esac
esac
echo "Usage: git COMMAND [OPTIONS] [TARGET]"
^ permalink raw reply [flat|nested] 62+ messages in thread
* Re: First cut at git port to Cygwin
2005-09-30 10:02 ` Junio C Hamano
@ 2005-09-30 17:01 ` H. Peter Anvin
2005-09-30 19:08 ` H. Peter Anvin
0 siblings, 1 reply; 62+ messages in thread
From: H. Peter Anvin @ 2005-09-30 17:01 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
Junio C Hamano wrote:
>
> Could you do update-server-info there, please?
>
Done...
>
> Knowing nothing about Cygwin environment, here are some
> comments.
>
> +# Define NO_IPV6 if you lack IPv6 support and getaddrinfo().
>
> This part probably is applicable outside Cygwin. At some point,
> can we have it in the mainline please?
>
Well, I would hope that all the changes could eventually be merged.
> # The ones that do not have to link with lcrypto nor lz.
> SIMPLE_PROGRAMS = \
> - git-get-tar-commit-id git-mailinfo git-mailsplit git-stripspace \
> - git-daemon git-var
> + git-get-tar-commit-id$(X) git-mailinfo$(X) git-mailsplit$(X) \
> + git-stripspace$(X) git-var$(X) git-daemon$(X)
>
> I have seen these $(X) in other programs' ports and found them
> quite distasteful. Since I not have immediate suggestions
> for improvements, I do not have rights to complain, though.
>
> Spelling it $X is a bit less distracting but not that much
> better. Maybe "SIMPLE_PROGRAM_NAMES = git-foo git-bar" and
> "SIMPLE_PROGRAMS = $(patsubst %,%$X,$(SIMPLE_PROGRAM_NAMES))"...
> but that would not help bits like this:
>
> - PROGRAMS += git-http-fetch
> + PROGRAMS += git-http-fetch$(X)
>
> or this:
>
> -git-%: %.o $(LIB_FILE)
> +git-%$(X): %.o $(LIB_FILE)
>
> ... so I'd shut up about this part.
My first cut had PROGRAMS_X and SIMPLE_PROGRAMS_X being patsubst of the
original versions, but in the end I decided it was even uglier, because
these patterns were needed elsewhere. I'll change them to $X except
where the parens are needed.
> diff --git a/daemon.c b/daemon.c
> --- a/daemon.c
> +++ b/daemon.c
> @@ -1,9 +1,11 @@
> #include "cache.h"
> #include "pkt-line.h"
> +#include <alloca.h>
>
> Why? I do not see any use of alloca in the added code...
I originally used alloca() before changing my mind and using calloc(); I
think there might be platforms without alloca out there.
> +#include <sys/poll.h>
>
> Is poll preferrable over select in general? Some may have only
> select available and others may have only poll available,
> perhaps? In any case, this is probably relevant to wider
> audience than just Cygwin; please give it to mainline at some
> point, perhaps conditionally allowing either/both.
The main reason I switched to poll() is that I believe all platforms
that are even remotely relevant have both these days, and forming a poll
list is so much cleaner than forming a select set. What makes forming a
select set even remotely bearable is the invalid assumption that the
number of file descriptors is bounded at compile time and therefore that
fdset_t can be statically allocated. We've had problems in the past
with that assumption on Linux, and I've tried to avoid select since then.
> + *socklist_p = malloc(sizeof(int));
> + pfd = calloc(socknum, sizeof(struct pollfd));
>
> Please use xmalloc and xcalloc just for consistency.
Check.
> test -x $path/git-$cmd && exec $path/git-$cmd "$@" ;;
> +
> + # In case we're running on Cygwin...
> + test -x $path/git-$cmd.exe && exec $path/git-$cmd.exe "$@" ;;
> esac
>
> Hmph, I think you forgot to drop double semicolon there.
D'oh!
> The git.sh script is munged by Makefile so presumably we could
> fix this part up there, like:
>
> git: git.sh Makefile
> rm -f $@+ $@
> sed -e '1s|#!.*/sh|#!$(SHELL_PATH)|' \
> -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \
> -e 's/@@X@@/$X/g' <$@.sh >$@+
> chmod +x $@+
> mv $@+ $@
>
> And then (a patch on top of your "master"):
>
> diff --git a/git.sh b/git.sh
> --- a/git.sh
> +++ b/git.sh
> @@ -12,10 +12,14 @@ case "$#" in
> exit 0 ;;
> esac
>
> - test -x $path/git-$cmd && exec $path/git-$cmd "$@" ;;
> + test -x $path/git-$cmd && exec $path/git-$cmd "$@"
>
> - # In case we're running on Cygwin...
> - test -x $path/git-$cmd.exe && exec $path/git-$cmd.exe "$@" ;;
> + case '@@X@@' in
> + '')
> + ;;
> + *)
> + test -x $path/git-$cmd@@X@@ && exec $path/git-$cmd@@X@@ "$@" ;;
> + esac
> esac
>
> echo "Usage: git COMMAND [OPTIONS] [TARGET]"
That wouldn't work, because the shell scripts don't get the .exe
extension. However, I can figure out something equivalent.
-hpa
^ permalink raw reply [flat|nested] 62+ messages in thread
* Re: First cut at git port to Cygwin
2005-09-30 17:01 ` H. Peter Anvin
@ 2005-09-30 19:08 ` H. Peter Anvin
0 siblings, 0 replies; 62+ messages in thread
From: H. Peter Anvin @ 2005-09-30 19:08 UTC (permalink / raw)
To: H. Peter Anvin; +Cc: Junio C Hamano, git
Okay, I have updated the git-cygwin repository with the changes
proposed, and they seem to work.
-hpa
^ permalink raw reply [flat|nested] 62+ messages in thread
* Re: First cut at git port to Cygwin
2005-09-29 0:53 First cut at git port to Cygwin H. Peter Anvin
` (3 preceding siblings ...)
2005-09-30 10:02 ` Junio C Hamano
@ 2005-10-04 12:31 ` Alex Riesen
2005-10-04 13:06 ` Alex Riesen
` (2 more replies)
2005-10-05 13:16 ` Jonas Fonseca
5 siblings, 3 replies; 62+ messages in thread
From: Alex Riesen @ 2005-10-04 12:31 UTC (permalink / raw)
To: H. Peter Anvin; +Cc: Git Mailing List
On 9/29/05, H. Peter Anvin <hpa@zytor.com> wrote:
> I have made a first cut at a git port to Cygwin. It looks like the
> "git-diff-tree -p" problem has been resolved independently, or at least
> I can't reproduce it on a fresh Cygwin install (running on XP Home), but
> I have added support for running without the IPv6 and the getaddrinfo() API.
>
> There are still funnies. In particular, Cygwin and Samba handle
> symlinks differently, so you can't trivially share a repository via
> Samba. Linus' "symbolic refs" changes should eventually take care of that.
I noticed that rename(2) in my copy of cygwin (1.5.18-1) does not remove the
target and returns an error (probably EPERM, but I have reasons not to trust
strerror on that thing).
The repository was on FAT.
Taking "rename(2)" from cygwin's libiberty solved this (they unlink if link(2)
returns EEXIST).
PS: Does broken rename(2) qualify a system "not worthy to support"?
^ permalink raw reply [flat|nested] 62+ messages in thread
* Re: First cut at git port to Cygwin
2005-10-04 12:31 ` Alex Riesen
@ 2005-10-04 13:06 ` Alex Riesen
2005-10-04 14:06 ` H. Peter Anvin
2005-10-04 15:03 ` H. Peter Anvin
2 siblings, 0 replies; 62+ messages in thread
From: Alex Riesen @ 2005-10-04 13:06 UTC (permalink / raw)
To: H. Peter Anvin; +Cc: Git Mailing List
On 10/4/05, Alex Riesen <raa.lkml@gmail.com> wrote:
> On 9/29/05, H. Peter Anvin <hpa@zytor.com> wrote:
> > I have made a first cut at a git port to Cygwin. It looks like the
> > "git-diff-tree -p" problem has been resolved independently, or at least
> > I can't reproduce it on a fresh Cygwin install (running on XP Home), but
> > I have added support for running without the IPv6 and the getaddrinfo() API.
> >
> > There are still funnies. In particular, Cygwin and Samba handle
> > symlinks differently, so you can't trivially share a repository via
> > Samba. Linus' "symbolic refs" changes should eventually take care of that.
>
> I noticed that rename(2) in my copy of cygwin (1.5.18-1) does not remove the
> target and returns an error (probably EPERM, but I have reasons not to trust
> strerror on that thing).
> The repository was on FAT.
> Taking "rename(2)" from cygwin's libiberty solved this (they unlink if link(2)
> returns EEXIST).
I think I have to clarify: I copied the function (like in strcasestr
case) into compat/
^ permalink raw reply [flat|nested] 62+ messages in thread
* Re: First cut at git port to Cygwin
2005-10-04 12:31 ` Alex Riesen
2005-10-04 13:06 ` Alex Riesen
@ 2005-10-04 14:06 ` H. Peter Anvin
2005-10-05 3:15 ` Christopher Faylor
2005-10-04 15:03 ` H. Peter Anvin
2 siblings, 1 reply; 62+ messages in thread
From: H. Peter Anvin @ 2005-10-04 14:06 UTC (permalink / raw)
To: Alex Riesen; +Cc: Git Mailing List
Alex Riesen wrote:
>
> I noticed that rename(2) in my copy of cygwin (1.5.18-1) does not remove the
> target and returns an error (probably EPERM, but I have reasons not to trust
> strerror on that thing).
> The repository was on FAT.
> Taking "rename(2)" from cygwin's libiberty solved this (they unlink if link(2)
> returns EEXIST).
>
> PS: Does broken rename(2) qualify a system "not worthy to support"?
In this case a better way would be to just add -liberty to all link
lines if necessary, but I would expect the core cygwin code to do this.
-hpa
^ permalink raw reply [flat|nested] 62+ messages in thread
* Re: First cut at git port to Cygwin
2005-10-04 12:31 ` Alex Riesen
2005-10-04 13:06 ` Alex Riesen
2005-10-04 14:06 ` H. Peter Anvin
@ 2005-10-04 15:03 ` H. Peter Anvin
2005-10-05 3:16 ` Christopher Faylor
2005-10-05 11:24 ` Alex Riesen
2 siblings, 2 replies; 62+ messages in thread
From: H. Peter Anvin @ 2005-10-04 15:03 UTC (permalink / raw)
To: Alex Riesen; +Cc: Git Mailing List
Alex Riesen wrote:
>
> I noticed that rename(2) in my copy of cygwin (1.5.18-1) does not remove the
> target and returns an error (probably EPERM, but I have reasons not to trust
> strerror on that thing).
> The repository was on FAT.
> Taking "rename(2)" from cygwin's libiberty solved this (they unlink if link(2)
> returns EEXIST).
>
> PS: Does broken rename(2) qualify a system "not worthy to support"?
I just tried this with Cygwin 1.5.18-1 and didn't have any such
problems. I tried it on NTFS, FAT and Samba, using WinXP.
-hpa
^ permalink raw reply [flat|nested] 62+ messages in thread
* Re: First cut at git port to Cygwin
2005-10-04 14:06 ` H. Peter Anvin
@ 2005-10-05 3:15 ` Christopher Faylor
0 siblings, 0 replies; 62+ messages in thread
From: Christopher Faylor @ 2005-10-05 3:15 UTC (permalink / raw)
To: H. Peter Anvin, Alex Riesen, Git Mailing List
On Tue, Oct 04, 2005 at 07:06:29AM -0700, H. Peter Anvin wrote:
>Alex Riesen wrote:
>>
>>I noticed that rename(2) in my copy of cygwin (1.5.18-1) does not remove
>>the
>>target and returns an error (probably EPERM, but I have reasons not to
>>trust
>>strerror on that thing).
>>The repository was on FAT.
>>Taking "rename(2)" from cygwin's libiberty solved this (they unlink if
>>link(2)
>>returns EEXIST).
>>
>>PS: Does broken rename(2) qualify a system "not worthy to support"?
>
>In this case a better way would be to just add -liberty to all link
>lines if necessary, but I would expect the core cygwin code to do this.
AFAIK, cygwin has a working rename(). Many packages rely on it.
If rename() is not working then a bug report with a test case would be
appreciated.
--
Christopher Faylor spammer? -> aaaspam@sourceware.org
Cygwin Co-Project Leader aaaspam@duffek.com
TimeSys, Inc.
^ permalink raw reply [flat|nested] 62+ messages in thread
* Re: First cut at git port to Cygwin
2005-10-04 15:03 ` H. Peter Anvin
@ 2005-10-05 3:16 ` Christopher Faylor
2005-10-05 5:25 ` H. Peter Anvin
2005-10-05 11:24 ` Alex Riesen
1 sibling, 1 reply; 62+ messages in thread
From: Christopher Faylor @ 2005-10-05 3:16 UTC (permalink / raw)
To: H. Peter Anvin, Alex Riesen, Git Mailing List
On Tue, Oct 04, 2005 at 08:03:55AM -0700, H. Peter Anvin wrote:
>Alex Riesen wrote:
>>
>>I noticed that rename(2) in my copy of cygwin (1.5.18-1) does not remove
>>the
>>target and returns an error (probably EPERM, but I have reasons not to
>>trust
>>strerror on that thing).
>>The repository was on FAT.
>>Taking "rename(2)" from cygwin's libiberty solved this (they unlink if
>>link(2)
>>returns EEXIST).
>>
>>PS: Does broken rename(2) qualify a system "not worthy to support"?
>
>I just tried this with Cygwin 1.5.18-1 and didn't have any such
>problems. I tried it on NTFS, FAT and Samba, using WinXP.
That's a relief. Btw, AFAIK, strerror is working correctly under
Cygwin also.
--
Christopher Faylor spammer? -> aaaspam@sourceware.org
Cygwin Co-Project Leader aaaspam@duffek.com
TimeSys, Inc.
^ permalink raw reply [flat|nested] 62+ messages in thread
* Re: First cut at git port to Cygwin
2005-10-05 3:16 ` Christopher Faylor
@ 2005-10-05 5:25 ` H. Peter Anvin
0 siblings, 0 replies; 62+ messages in thread
From: H. Peter Anvin @ 2005-10-05 5:25 UTC (permalink / raw)
To: Christopher Faylor; +Cc: Alex Riesen, Git Mailing List
Christopher Faylor wrote:
> That's a relief. Btw, AFAIK, strerror is working correctly under
> Cygwin also.
Now if we can only figure out why gitk is messed up...
-hpa
^ permalink raw reply [flat|nested] 62+ messages in thread
* Re: First cut at git port to Cygwin
2005-10-04 15:03 ` H. Peter Anvin
2005-10-05 3:16 ` Christopher Faylor
@ 2005-10-05 11:24 ` Alex Riesen
2005-10-05 15:46 ` Alex Riesen
1 sibling, 1 reply; 62+ messages in thread
From: Alex Riesen @ 2005-10-05 11:24 UTC (permalink / raw)
To: H. Peter Anvin; +Cc: Git Mailing List
On 10/4/05, H. Peter Anvin <hpa@zytor.com> wrote:
> > I noticed that rename(2) in my copy of cygwin (1.5.18-1) does not remove the
> > target and returns an error (probably EPERM, but I have reasons not to trust
> > strerror on that thing).
> > The repository was on FAT.
> > Taking "rename(2)" from cygwin's libiberty solved this (they unlink if link(2)
> > returns EEXIST).
> >
> > PS: Does broken rename(2) qualify a system "not worthy to support"?
>
> I just tried this with Cygwin 1.5.18-1 and didn't have any such
> problems. I tried it on NTFS, FAT and Samba, using WinXP.
It's on Win2k, there was multiple cygwin installations in path, the other one
supposedly is 1.5.5 (it's from QNX Momentics installation).
I had that old "cygwin1.dll" renamed into "cygwin1.dll-disabled" long
ago, though...
I can't reproduce this out of GIT context, and the error is not
reproducable after
I removed the other cygwin installation out of PATH.
Anyway, sorry, I should have tried this before posting.
^ permalink raw reply [flat|nested] 62+ messages in thread
* Re: First cut at git port to Cygwin
2005-09-29 0:53 First cut at git port to Cygwin H. Peter Anvin
` (4 preceding siblings ...)
2005-10-04 12:31 ` Alex Riesen
@ 2005-10-05 13:16 ` Jonas Fonseca
2005-10-05 13:58 ` Johannes Schindelin
5 siblings, 1 reply; 62+ messages in thread
From: Jonas Fonseca @ 2005-10-05 13:16 UTC (permalink / raw)
To: H. Peter Anvin; +Cc: Git Mailing List
I have a few things I experienced with the merged cygwin stuff. Sorry I
haven't investigated it further, but there should be enough for a few
fixes.
When I ...
user@machine /usr/local/dev/git/git
$ make prefix=/usr/local install
install -d -m755 /usr/local/bin
install git-apply.exe [...]
sh ./cmd-rename.sh /usr/local/bin
ln: creating symbolic link `/usr/local/bin/git-http-pull.exe' to `git-http-fetch.exe': File exists
make: *** [install] Error 1
Can be fixed by the patch below. I don't know if it would be cleaner to
pass cmd-rename.sh "$X" as a second argument from the Makefile.
--- cmd-rename.sh 2005-10-05 14:42:00.000000000 +0200
+++ cmd-rename.sh-orig 2005-10-05 14:43:48.000000000 +0200
@@ -3,7 +3,7 @@
test -d "$d" || exit
while read old new
do
- rm -f "$d/$old" "$d/$old.exe"
+ rm -f "$d/$old"
if test -f "$d/$new"
then
ln -s "$new" "$d/$old" || exit
Some other obscurities ...
user@machine /usr/local/dev/git/git
$ git-log
fatal: Not a git repository
user@machine /usr/local/dev/git/git
$ GIT_DIR=.git git-log | wc -l
26094
and I cannot rebuild the index file with git-reset. First time I run it
it creates the index.lock file and errors out when writing. The second
time it errors out because the lock file was not removed in the first
case.
user@machine /usr/local/dev/git/git
$ GIT_DIR=.git git-reset
fatal: unable to write new index file
user@machine /usr/local/dev/git/git
$ GIT_DIR=.git git-reset
fatal: unable to create new cachefile
user@machine /usr/local/dev/git/git
$ uname -a
CYGWIN_NT-5.1 antimatter 1.5.18(0.132/4/2) 2005-07-02 20:30 i686 unknown unknown Cygwin
--
Jonas Fonseca
^ permalink raw reply [flat|nested] 62+ messages in thread
* Re: First cut at git port to Cygwin
2005-10-05 13:16 ` Jonas Fonseca
@ 2005-10-05 13:58 ` Johannes Schindelin
2005-10-05 15:52 ` [PATCH] Fix symbolic ref validation Jonas Fonseca
0 siblings, 1 reply; 62+ messages in thread
From: Johannes Schindelin @ 2005-10-05 13:58 UTC (permalink / raw)
To: Jonas Fonseca; +Cc: H. Peter Anvin, Git Mailing List
[-- Attachment #1: Type: TEXT/PLAIN, Size: 468 bytes --]
Hi,
On Wed, 5 Oct 2005, Jonas Fonseca wrote:
> user@machine /usr/local/dev/git/git
> $ git-log
> fatal: Not a git repository
>
> user@machine /usr/local/dev/git/git
> $ GIT_DIR=.git git-log | wc -l
> 26094
That could have its cause in your .git/HEAD being no symlink. That happens
when rsync´ing the .git directory.
The other errors could also stem from the fact that quite a few places
expect HEAD to be a symlink.
Ciao,
Dscho
^ permalink raw reply [flat|nested] 62+ messages in thread
* Re: First cut at git port to Cygwin
2005-10-05 11:24 ` Alex Riesen
@ 2005-10-05 15:46 ` Alex Riesen
2005-10-05 15:54 ` Christopher Faylor
0 siblings, 1 reply; 62+ messages in thread
From: Alex Riesen @ 2005-10-05 15:46 UTC (permalink / raw)
To: H. Peter Anvin; +Cc: Git Mailing List
[-- Attachment #1: Type: text/plain, Size: 1392 bytes --]
On 10/5/05, Alex Riesen <raa.lkml@gmail.com> wrote:
> On 10/4/05, H. Peter Anvin <hpa@zytor.com> wrote:
> > > I noticed that rename(2) in my copy of cygwin (1.5.18-1) does not remove the
> > > target and returns an error (probably EPERM, but I have reasons not to trust
> > > strerror on that thing).
> > > The repository was on FAT.
> > > Taking "rename(2)" from cygwin's libiberty solved this (they unlink if link(2)
> > > returns EEXIST).
> > >
> > > PS: Does broken rename(2) qualify a system "not worthy to support"?
> >
> > I just tried this with Cygwin 1.5.18-1 and didn't have any such
> > problems. I tried it on NTFS, FAT and Samba, using WinXP.
>
> It's on Win2k, there was multiple cygwin installations in path, the other one
> supposedly is 1.5.5 (it's from QNX Momentics installation).
> I had that old "cygwin1.dll" renamed into "cygwin1.dll-disabled" long
> ago, though...
> I can't reproduce this out of GIT context, and the error is not
> reproducable after
> I removed the other cygwin installation out of PATH.
> Anyway, sorry, I should have tried this before posting.
Still does not work for me. I cannot isolate the problem out of git,
but at the moment the only way for me to make commit_index_file to work
is to put unlink(indexfile) before rename(cf->lockfile, indexfile).
For everyone interested, I attach cygwin's strace output here.
[-- Attachment #2: log --]
[-- Type: application/octet-stream, Size: 65558 bytes --]
**********************************************
Program name: d:\download\git-mine\git-update-index.exe (pid 1476, ppid 1)
App version: 1005.18, api: 0.132
DLL version: 1005.18, api: 0.132
DLL build: 2005-07-02 20:30
OS version: Windows NT-5.0
Heap size: 536870912
Date/Time: 2005-10-05 17:27:37
**********************************************
55 474 [main] git-update-index 1476 set_myself: myself->dwProcessId 1476
57 531 [main] git-update-index 1476 time: 1128526057 = time (0)
404 935 [main] git-update-index 1476 environ_init: 0x10020238: !F:=F:\
100 1035 [main] git-update-index 1476 environ_init: 0x10020248: !H:=H:\
100 1135 [main] git-update-index 1476 environ_init: 0x10020258: !I:=I:\
100 1235 [main] git-update-index 1476 environ_init: 0x10020268: !J:=J:\
99 1334 [main] git-update-index 1476 environ_init: 0x10020278: !N:=N:\
99 1433 [main] git-update-index 1476 environ_init: 0x10020288: !X:=X:\
100 1533 [main] git-update-index 1476 environ_init: 0x10020298: !Y:=Y:\
99 1632 [main] git-update-index 1476 environ_init: 0x100202A8: !Z:=Z:\
100 1732 [main] git-update-index 1476 environ_init: 0x100202B8: ALLUSERSPROFILE=C:\Documents and Settings\All Users
100 1832 [main] git-update-index 1476 environ_init: 0x100202F0: APPDATA=C:\Documents and Settings\ARiesen\Application Data
100 1932 [main] git-update-index 1476 environ_init: 0x10020330: APR_ICONV_PATH=d:\Programs\Subversion\iconv
100 2032 [main] git-update-index 1476 environ_init: 0x10020360: CLASSPATH="C:\WINNT\system32\QTJava.zip"
101 2133 [main] git-update-index 1476 environ_init: 0x10020390: COMMONPROGRAMFILES=C:\Program Files\Common Files
100 2233 [main] git-update-index 1476 environ_init: 0x100203C8: COMPUTERNAME=OEKAP852
100 2333 [main] git-update-index 1476 environ_init: 0x100203E8: COMSPEC=C:\WINNT\system32\cmd.exe
99 2432 [main] git-update-index 1476 environ_init: 0x10020410: CVS_RSH=/bin/ssh
100 2532 [main] git-update-index 1476 environ_init: 0x10020428: CYGWIN_BASH_HOSTNAME=oekap852
100 2632 [main] git-update-index 1476 environ_init: 0x10020450: EDITOR=gvim -f
100 2732 [main] git-update-index 1476 environ_init: 0x10020468: EXSERVER=OEKAEX01
99 2831 [main] git-update-index 1476 environ_init: 0x10020480: GREP_OPTIONS=--exclude=*.svn-base
104 2935 [main] git-update-index 1476 environ_init: 0x100204A8: HB_TOOLS_DIR=D:/p4scm/SCM/Release/BuildProcess/tools
101 3036 [main] git-update-index 1476 environ_init: 0x100204E8: HGEDITOR=ee
100 3136 [main] git-update-index 1476 environ_init: 0x100204F8: HGMERGE=ee -d
100 3236 [main] git-update-index 1476 environ_init: 0x10020510: HGUSER=ariesen@harmanbecker.com
100 3336 [main] git-update-index 1476 environ_init: 0x10020538: HISTFILESIZE=20000
100 3436 [main] git-update-index 1476 environ_init: 0x10020550: HISTSIZE=1000
100 3536 [main] git-update-index 1476 getwinenv: can't set native for HOME= since no environ yet
106 3642 [main] git-update-index 1476 mount_info::conv_to_posix_path: conv_to_posix_path (h:, no-keep-rel, no-add-slash)
59 3701 [main] git-update-index 1476 normalize_win32_path: h: = normalize_win32_path (h:)
62 3763 [main] git-update-index 1476 mount_info::conv_to_posix_path: /cygdrive/h = conv_to_posix_path (h:)
150 3913 [main] git-update-index 1476 win_env::add_cache: posix /cygdrive/h
51 3964 [main] git-update-index 1476 win_env::add_cache: native HOME=h:
51 4015 [main] git-update-index 1476 posify: env var converted to HOME=/cygdrive/h
99 4114 [main] git-update-index 1476 environ_init: 0x10020578: HOME=/cygdrive/h
139 4253 [main] git-update-index 1476 environ_init: 0x100206A8: HOMEDRIVE=C:
101 4354 [main] git-update-index 1476 environ_init: 0x10020568: HOMEPATH=\
101 4455 [main] git-update-index 1476 environ_init: 0x100206C0: HOSTNAME=oekap852
100 4555 [main] git-update-index 1476 environ_init: 0x100206D8: INCLUDE=C:\Program Files\Microsoft Visual Studio\VC98\atl\include;C:\Program Files\Microsoft Visual Studio\VC98\mfc\include;C:\Program Files\Microsoft Visual Studio\VC98\include
107 4662 [main] git-update-index 1476 environ_init: 0x10020790: INFOPATH=/usr/local/info:/usr/info:/usr/share/info:/usr/autotool/devel/info:/usr/autotool/stable/info:
102 4764 [main] git-update-index 1476 environ_init: 0x10020800: LANG=en_US
100 4864 [main] git-update-index 1476 environ_init: 0x10020810: LIB=C:\Program Files\Microsoft Visual Studio\VC98\mfc\lib;C:\Program Files\Microsoft Visual Studio\VC98\lib
101 4965 [main] git-update-index 1476 environ_init: 0x10020880: LM_LICENSE_FILE=7192@oekaw2do01
101 5066 [main] git-update-index 1476 environ_init: 0x100208A8: LOGIN_CONTEXT=PDE-SW.Karlsbad
100 5166 [main] git-update-index 1476 environ_init: 0x100208D0: LOGNAME=%USERNAME.PDE-SW.Karlsbad
100 5266 [main] git-update-index 1476 environ_init: 0x100208F8: LOGONSERVER=\\OEKAW2DC03
100 5366 [main] git-update-index 1476 environ_init: 0x10020918: MAKEFLAGS=-Id:/QNX630/target/qnx6/usr/include
167 5533 [main] git-update-index 1476 environ_init: 0x10020950: MAKE_MODE=unix
101 5634 [main] git-update-index 1476 environ_init: 0x10020968: MANPATH=/usr/local/man:/usr/man:/usr/share/man:/usr/autotool/devel/man:
128 5762 [main] git-update-index 1476 environ_init: 0x100209B8: MSDEVDIR=C:\Program Files\Microsoft Visual Studio\Common\MSDev98
102 5864 [main] git-update-index 1476 environ_init: 0x10020A00: NAME=Riesen, Alexander
100 5964 [main] git-update-index 1476 environ_init: 0x10020A20: NUMBER_OF_PROCESSORS=1
100 6064 [main] git-update-index 1476 environ_init: 0x10020A40: NWLANGUAGE=ENGLISH
99 6163 [main] git-update-index 1476 environ_init: 0x10020A58: NWUSERNAME=ARiesen
100 6263 [main] git-update-index 1476 environ_init: 0x10020A70: OLDPWD=/d/download/git-cygwin
100 6363 [main] git-update-index 1476 environ_init: 0x10020A98: OS2LIBPATH=C:\WINNT\system32\os2\dll;
99 6462 [main] git-update-index 1476 environ_init: 0x10020AC8: OS=WINNT
100 6562 [main] git-update-index 1476 environ_init: 0x10020AD8: OS_VERSION=V5.00
100 6662 [main] git-update-index 1476 environ_init: 0x10020AF0: P4_QNX_OS_ROOT=D:/p4qnx/qnx/release/os
101 6763 [main] git-update-index 1476 getwinenv: can't set native for PATH= since no environ yet
60 6823 [main] git-update-index 1476 normalize_posix_path: src .
54 6877 [main] git-update-index 1476 mount_info::conv_to_posix_path: conv_to_posix_path (d:\download\git-mine, no-keep-rel, no-add-slash)
52 6929 [main] git-update-index 1476 normalize_win32_path: d:\download\git-mine = normalize_win32_path (d:\download\git-mine)
53 6982 [main] git-update-index 1476 mount_info::conv_to_posix_path: /d/download/git-mine = conv_to_posix_path (d:\download\git-mine)
52 7034 [main] git-update-index 1476 cwdstuff::get: posix /d/download/git-mine
51 7085 [main] git-update-index 1476 cwdstuff::get: (/d/download/git-mine) = cwdstuff::get (0x22EBC0, 260, 1, 0), errno 0
52 7137 [main] git-update-index 1476 normalize_posix_path: /d/download/git-mine/ = normalize_posix_path (.)
52 7189 [main] git-update-index 1476 mount_info::conv_to_win32_path: conv_to_win32_path (/d/download/git-mine)
57 7246 [main] git-update-index 1476 set_flags: flags: binary (0x2)
52 7298 [main] git-update-index 1476 mount_info::conv_to_win32_path: src_path /d/download/git-mine, dst d:\download\git-mine, flags 0xA, rc 0
98 7396 [main] git-update-index 1476 symlink_info::check: not a symlink
53 7449 [main] git-update-index 1476 symlink_info::check: 0 = symlink.check (d:\download\git-mine, 0x22E880) (0xA)
441 7890 [main] git-update-index 1476 set_privilege: 1 = set_privilege ((token 330) SeChangeNotifyPrivilege, 1)
149 8039 [main] git-update-index 1476 path_conv::check: this->path(d:\download\git-mine), has_acls(0)
117 8156 [main] git-update-index 1476 mount_info::conv_to_posix_path: conv_to_posix_path (d:\scripts\git, keep-rel, no-add-slash)
58 8214 [main] git-update-index 1476 normalize_win32_path: d:\scripts\git = normalize_win32_path (d:\scripts\git)
53 8267 [main] git-update-index 1476 mount_info::conv_to_posix_path: /d/scripts/git = conv_to_posix_path (d:\scripts\git)
52 8319 [main] git-update-index 1476 mount_info::conv_to_posix_path: conv_to_posix_path (D:\Programs\cygwin\usr\local\bin, keep-rel, no-add-slash)
52 8371 [main] git-update-index 1476 normalize_win32_path: D:\Programs\cygwin\usr\local\bin = normalize_win32_path (D:\Programs\cygwin\usr\local\bin)
52 8423 [main] git-update-index 1476 mount_info::conv_to_posix_path: /usr/local/bin = conv_to_posix_path (D:\Programs\cygwin\usr\local\bin)
53 8476 [main] git-update-index 1476 mount_info::conv_to_posix_path: conv_to_posix_path (D:\Programs\cygwin\bin, keep-rel, no-add-slash)
51 8527 [main] git-update-index 1476 normalize_win32_path: D:\Programs\cygwin\bin = normalize_win32_path (D:\Programs\cygwin\bin)
52 8579 [main] git-update-index 1476 mount_info::conv_to_posix_path: /usr/bin = conv_to_posix_path (D:\Programs\cygwin\bin)
52 8631 [main] git-update-index 1476 mount_info::conv_to_posix_path: conv_to_posix_path (D:\Programs\cygwin\bin, keep-rel, no-add-slash)
51 8682 [main] git-update-index 1476 normalize_win32_path: D:\Programs\cygwin\bin = normalize_win32_path (D:\Programs\cygwin\bin)
52 8734 [main] git-update-index 1476 mount_info::conv_to_posix_path: /usr/bin = conv_to_posix_path (D:\Programs\cygwin\bin)
52 8786 [main] git-update-index 1476 mount_info::conv_to_posix_path: conv_to_posix_path (D:\Programs\cygwin\usr\X11R6\bin, keep-rel, no-add-slash)
52 8838 [main] git-update-index 1476 normalize_win32_path: D:\Programs\cygwin\usr\X11R6\bin = normalize_win32_path (D:\Programs\cygwin\usr\X11R6\bin)
52 8890 [main] git-update-index 1476 mount_info::conv_to_posix_path: /usr/X11R6/bin = conv_to_posix_path (D:\Programs\cygwin\usr\X11R6\bin)
52 8942 [main] git-update-index 1476 mount_info::conv_to_posix_path: conv_to_posix_path (c:\WINNT\system32, keep-rel, no-add-slash)
51 8993 [main] git-update-index 1476 normalize_win32_path: c:\WINNT\system32 = normalize_win32_path (c:\WINNT\system32)
52 9045 [main] git-update-index 1476 mount_info::conv_to_posix_path: /c/WINNT/system32 = conv_to_posix_path (c:\WINNT\system32)
52 9097 [main] git-update-index 1476 mount_info::conv_to_posix_path: conv_to_posix_path (c:\WINNT, keep-rel, no-add-slash)
51 9148 [main] git-update-index 1476 normalize_win32_path: c:\WINNT = normalize_win32_path (c:\WINNT)
52 9200 [main] git-update-index 1476 mount_info::conv_to_posix_path: /c/WINNT = conv_to_posix_path (c:\WINNT)
52 9252 [main] git-update-index 1476 mount_info::conv_to_posix_path: conv_to_posix_path (c:\WINNT\System32\Wbem, keep-rel, no-add-slash)
51 9303 [main] git-update-index 1476 normalize_win32_path: c:\WINNT\System32\Wbem = normalize_win32_path (c:\WINNT\System32\Wbem)
52 9355 [main] git-update-index 1476 mount_info::conv_to_posix_path: /c/WINNT/System32/Wbem = conv_to_posix_path (c:\WINNT\System32\Wbem)
52 9407 [main] git-update-index 1476 mount_info::conv_to_posix_path: conv_to_posix_path (c:\WINNT\system32\nls, keep-rel, no-add-slash)
52 9459 [main] git-update-index 1476 normalize_win32_path: c:\WINNT\system32\nls = normalize_win32_path (c:\WINNT\system32\nls)
51 9510 [main] git-update-index 1476 mount_info::conv_to_posix_path: /c/WINNT/system32/nls = conv_to_posix_path (c:\WINNT\system32\nls)
52 9562 [main] git-update-index 1476 mount_info::conv_to_posix_path: conv_to_posix_path (c:\WINNT\system32\nls\ENGLISH, keep-rel, no-add-slash)
52 9614 [main] git-update-index 1476 normalize_win32_path: c:\WINNT\system32\nls\ENGLISH = normalize_win32_path (c:\WINNT\system32\nls\ENGLISH)
52 9666 [main] git-update-index 1476 mount_info::conv_to_posix_path: /c/WINNT/system32/nls/ENGLISH = conv_to_posix_path (c:\WINNT\system32\nls\ENGLISH)
52 9718 [main] git-update-index 1476 mount_info::conv_to_posix_path: conv_to_posix_path (c:\Program Files\Perforce, keep-rel, no-add-slash)
55 9773 [main] git-update-index 1476 normalize_win32_path: c:\Program Files\Perforce = normalize_win32_path (c:\Program Files\Perforce)
51 9824 [main] git-update-index 1476 mount_info::conv_to_posix_path: /c/Program Files/Perforce = conv_to_posix_path (c:\Program Files\Perforce)
53 9877 [main] git-update-index 1476 mount_info::conv_to_posix_path: conv_to_posix_path (c:\Program Files\QNX Software Systems\bin, keep-rel, no-add-slash)
52 9929 [main] git-update-index 1476 normalize_win32_path: c:\Program Files\QNX Software Systems\bin = normalize_win32_path (c:\Program Files\QNX Software Systems\bin)
52 9981 [main] git-update-index 1476 mount_info::conv_to_posix_path: /c/Program Files/QNX Software Systems/bin = conv_to_posix_path (c:\Program Files\QNX Software Systems\bin)
53 10034 [main] git-update-index 1476 mount_info::conv_to_posix_path: conv_to_posix_path (D:\Programs\cygwin\bin, keep-rel, no-add-slash)
51 10085 [main] git-update-index 1476 normalize_win32_path: D:\Programs\cygwin\bin = normalize_win32_path (D:\Programs\cygwin\bin)
52 10137 [main] git-update-index 1476 mount_info::conv_to_posix_path: /usr/bin = conv_to_posix_path (D:\Programs\cygwin\bin)
52 10189 [main] git-update-index 1476 mount_info::conv_to_posix_path: conv_to_posix_path (c:\Program Files\doxygen\bin, keep-rel, no-add-slash)
51 10240 [main] git-update-index 1476 normalize_win32_path: c:\Program Files\doxygen\bin = normalize_win32_path (c:\Program Files\doxygen\bin)
52 10292 [main] git-update-index 1476 mount_info::conv_to_posix_path: /c/Program Files/doxygen/bin = conv_to_posix_path (c:\Program Files\doxygen\bin)
53 10345 [main] git-update-index 1476 mount_info::conv_to_posix_path: conv_to_posix_path (d:\Programs\Perl\bin, keep-rel, no-add-slash)
51 10396 [main] git-update-index 1476 normalize_win32_path: d:\Programs\Perl\bin = normalize_win32_path (d:\Programs\Perl\bin)
51 10447 [main] git-update-index 1476 mount_info::conv_to_posix_path: /d/Programs/Perl/bin = conv_to_posix_path (d:\Programs\Perl\bin)
53 10500 [main] git-update-index 1476 mount_info::conv_to_posix_path: conv_to_posix_path (d:\Programs\Vim\vim63, keep-rel, no-add-slash)
51 10551 [main] git-update-index 1476 normalize_win32_path: d:\Programs\Vim\vim63 = normalize_win32_path (d:\Programs\Vim\vim63)
100 10651 [main] git-update-index 1476 mount_info::conv_to_posix_path: /d/Programs/Vim/vim63 = conv_to_posix_path (d:\Programs\Vim\vim63)
53 10704 [main] git-update-index 1476 mount_info::conv_to_posix_path: conv_to_posix_path (d:\scripts, keep-rel, no-add-slash)
88 10792 [main] git-update-index 1476 normalize_win32_path: d:\scripts = normalize_win32_path (d:\scripts)
52 10844 [main] git-update-index 1476 mount_info::conv_to_posix_path: /d/scripts = conv_to_posix_path (d:\scripts)
52 10896 [main] git-update-index 1476 mount_info::conv_to_posix_path: conv_to_posix_path (d:\Programs\Subversion\bin, keep-rel, no-add-slash)
52 10948 [main] git-update-index 1476 normalize_win32_path: d:\Programs\Subversion\bin = normalize_win32_path (d:\Programs\Subversion\bin)
53 11001 [main] git-update-index 1476 mount_info::conv_to_posix_path: /d/Programs/Subversion/bin = conv_to_posix_path (d:\Programs\Subversion\bin)
52 11053 [main] git-update-index 1476 mount_info::conv_to_posix_path: conv_to_posix_path (X, keep-rel, no-add-slash)
51 11104 [main] git-update-index 1476 mount_info::conv_to_posix_path: X = conv_to_posix_path (X)
52 11156 [main] git-update-index 1476 mount_info::conv_to_posix_path: conv_to_posix_path (.\, keep-rel, add-slash)
51 11207 [main] git-update-index 1476 mount_info::conv_to_posix_path: ./ = conv_to_posix_path (.\)
51 11258 [main] git-update-index 1476 mount_info::conv_to_posix_path: conv_to_posix_path (Y, keep-rel, no-add-slash)
52 11310 [main] git-update-index 1476 mount_info::conv_to_posix_path: Y = conv_to_posix_path (Y)
55 11365 [main] git-update-index 1476 mount_info::conv_to_posix_path: conv_to_posix_path (.\, keep-rel, add-slash)
51 11416 [main] git-update-index 1476 mount_info::conv_to_posix_path: ./ = conv_to_posix_path (.\)
52 11468 [main] git-update-index 1476 mount_info::conv_to_posix_path: conv_to_posix_path (.\, keep-rel, add-slash)
51 11519 [main] git-update-index 1476 mount_info::conv_to_posix_path: ./ = conv_to_posix_path (.\)
168 11687 [main] git-update-index 1476 win_env::add_cache: posix /d/scripts/git:/usr/local/bin:/usr/bin:/usr/bin:/usr/X11R6/bin:/c/WINNT/system32:/c/WINNT:/c/WINNT/System32/Wbem:/c/WINNT/system32/nls:/c/WINNT/system32/nls/ENGLISH:/c/Program Files/Perforce:/c/Program Files/QNX Software Systems/bin:/usr/bin:/c/Program Files/doxygen/bin:/d/Programs/Perl/bin:/d/Programs/Vim/vim63:/d/scripts:/d/Programs/Subversion/bin:X:./:Y:./:./
56 11743 [main] git-update-index 1476 win_env::add_cache: native PATH=d:\scripts\git;D:\Programs\cygwin\usr\local\bin;D:\Programs\cygwin\bin;D:\Programs\cygwin\bin;D:\Programs\cygwin\usr\X11R6\bin;c:\WINNT\system32;c:\WINNT;c:\WINNT\System32\Wbem;c:\WINNT\system32\nls;c:\WINNT\system32\nls\ENGLISH;c:\Program Files\Perforce;c:\Program Files\QNX Software Systems\bin;D:\Programs\cygwin\bin;c:\Program Files\doxygen\bin;d:\Programs\Perl\bin;d:\Programs\Vim\vim63;d:\scripts;d:\Programs\Subversion\bin;X;.\;Y;.\;.\
60 11803 [main] git-update-index 1476 posify: env var converted to PATH=/d/scripts/git:/usr/local/bin:/usr/bin:/usr/bin:/usr/X11R6/bin:/c/WINNT/system32:/c/WINNT:/c/WINNT/System32/Wbem:/c/WINNT/system32/nls:/c/WINNT/system32/nls/ENGLISH:/c/Program Files/Perforce:/c/Program Files/QNX Software Systems/bin:/usr/bin:/c/Program Files/doxygen/bin:/d/Programs/Perl/bin:/d/Programs/Vim/vim63:/d/scripts:/d/Programs/Subversion/bin:X:./:Y:./:./
103 11906 [main] git-update-index 1476 environ_init: 0x10020CE8: PATH=/d/scripts/git:/usr/local/bin:/usr/bin:/usr/bin:/usr/X11R6/bin:/c/WINNT/system32:/c/WINNT:/c/WINNT/System32/Wbem:/c/WINNT/system32/nls:/c/WINNT/system32/nls/ENGLISH:/c/Program Files/Perforce:/c/Program Files/QNX Software Systems/bin:/usr/bin:/c/Program Files/doxygen/bin:/d/Programs/Perl/bin:/d/Programs/Vim/vim63:/d/scripts:/d/Programs/Subversion/bin:X:./:Y:./:./
108 12014 [main] git-update-index 1476 environ_init: 0x10020B20: PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
100 12114 [main] git-update-index 1476 environ_init: 0x10020B60: PLATFORM=WNT
100 12214 [main] git-update-index 1476 environ_init: 0x10020B78: PRINTER=
100 12314 [main] git-update-index 1476 environ_init: 0x10020B88: PROCESSOR_ARCHITECTURE=x86
100 12414 [main] git-update-index 1476 environ_init: 0x10020BA8: PROCESSOR_IDENTIFIER=x86 Family 15 Model 3 Stepping 4, GenuineIntel
100 12514 [main] git-update-index 1476 environ_init: 0x10020BF0: PROCESSOR_LEVEL=15
101 12615 [main] git-update-index 1476 environ_init: 0x10020C08: PROCESSOR_REVISION=0304
99 12714 [main] git-update-index 1476 environ_init: 0x10020C28: PROGRAMFILES=C:\Program Files
100 12814 [main] git-update-index 1476 environ_init: 0x10020C50: PWD=/d/download/git-mine
100 12914 [main] git-update-index 1476 environ_init: 0x10020C70: PYTHONPATH=/d/scripts/lib/python
100 13014 [main] git-update-index 1476 environ_init: 0x10020C98: QNX_CONFIGURATION=C:\Program Files\QNX Software Systems
100 13114 [main] git-update-index 1476 environ_init: 0x10021520: QNX_HOST=d:/QNX630/host/win32/x86
100 13214 [main] git-update-index 1476 environ_init: 0x10021548: QNX_TARGET=d:/QNX630/target/qnx6
100 13314 [main] git-update-index 1476 environ_init: 0x10021570: QTJAVA="C:\WINNT\system32\QTJava.zip"
99 13413 [main] git-update-index 1476 environ_init: 0x100215A0: ROOTDIR=Z:\SYS
100 13513 [main] git-update-index 1476 environ_init: 0x10020CD8: SHLVL=1
99 13612 [main] git-update-index 1476 environ_init: 0x100215B8: SYSTEMDRIVE=C:
100 13712 [main] git-update-index 1476 environ_init: 0x100215D0: SYSTEMROOT=C:\WINNT
104 13816 [main] git-update-index 1476 getwinenv: can't set native for TEMP= since no environ yet
99 13915 [main] git-update-index 1476 mount_info::conv_to_posix_path: conv_to_posix_path (d:\tmp, no-keep-rel, no-add-slash)
51 13966 [main] git-update-index 1476 normalize_win32_path: d:\tmp = normalize_win32_path (d:\tmp)
52 14018 [main] git-update-index 1476 mount_info::conv_to_posix_path: /tmp = conv_to_posix_path (d:\tmp)
148 14166 [main] git-update-index 1476 win_env::add_cache: posix /tmp
50 14216 [main] git-update-index 1476 win_env::add_cache: native TEMP=d:\tmp
51 14267 [main] git-update-index 1476 posify: env var converted to TEMP=/tmp
98 14365 [main] git-update-index 1476 environ_init: 0x100215F8: TEMP=/tmp
100 14465 [main] git-update-index 1476 environ_init: 0x100215E8: TERM=cygwin
100 14565 [main] git-update-index 1476 getwinenv: can't set native for TMP= since no environ yet
100 14665 [main] git-update-index 1476 mount_info::conv_to_posix_path: conv_to_posix_path (d:\tmp, no-keep-rel, no-add-slash)
51 14716 [main] git-update-index 1476 normalize_win32_path: d:\tmp = normalize_win32_path (d:\tmp)
52 14768 [main] git-update-index 1476 mount_info::conv_to_posix_path: /tmp = conv_to_posix_path (d:\tmp)
147 14915 [main] git-update-index 1476 win_env::add_cache: posix /tmp
50 14965 [main] git-update-index 1476 win_env::add_cache: native TMP=d:\tmp
51 15016 [main] git-update-index 1476 posify: env var converted to TMP=/tmp
98 15114 [main] git-update-index 1476 environ_init: 0x10021738: TMP=/tmp
100 15214 [main] git-update-index 1476 getwinenv: can't set native for TMPDIR= since no environ yet
100 15314 [main] git-update-index 1476 mount_info::conv_to_posix_path: conv_to_posix_path (d:\tmp, no-keep-rel, no-add-slash)
51 15365 [main] git-update-index 1476 normalize_win32_path: d:\tmp = normalize_win32_path (d:\tmp)
51 15416 [main] git-update-index 1476 mount_info::conv_to_posix_path: /tmp = conv_to_posix_path (d:\tmp)
148 15564 [main] git-update-index 1476 win_env::add_cache: posix /tmp
51 15615 [main] git-update-index 1476 win_env::add_cache: native TMPDIR=d:\tmp
50 15665 [main] git-update-index 1476 posify: env var converted to TMPDIR=/tmp
98 15763 [main] git-update-index 1476 environ_init: 0x10021880: TMPDIR=/tmp
100 15863 [main] git-update-index 1476 environ_init: 0x10021868: USER=ARiesen
99 15962 [main] git-update-index 1476 environ_init: 0x100219A8: USERDOMAIN=HBI
100 16062 [main] git-update-index 1476 environ_init: 0x100219C0: USERNAME=ARiesen
100 16162 [main] git-update-index 1476 environ_init: 0x100219D8: USERPROFILE=C:\Documents and Settings\ARiesen
100 16262 [main] git-update-index 1476 environ_init: 0x10021A10: WINDIR=C:\WINNT
99 16361 [main] git-update-index 1476 environ_init: 0x10021A28: WINDOWS_LOGIN=0
100 16461 [main] git-update-index 1476 environ_init: 0x10021A40: WINVER=5.0.2195 Service Pack 4
100 16561 [main] git-update-index 1476 environ_init: 0x10021A68: X11=/usr/X11R6
99 16660 [main] git-update-index 1476 environ_init: 0x10021A80: _=/usr/bin/strace
58 16718 [main] git-update-index 1476 pinfo_init: Set nice to 0
51 16769 [main] git-update-index 1476 pinfo_init: pid 1476, pgid 1476
398 17167 [main] git-update-index 1476 set_privilege: 0 = set_privilege ((token 35C) SeRestorePrivilege, 1)
64 17231 [main] git-update-index 1476 set_privilege: 1 = set_privilege ((token 35C) SeChangeNotifyPrivilege, 1)
87 17318 [main] git-update-index 1476 dtable::extend: size 32, fds 0x611556B0
63 17381 [main] git-update-index 1476 normalize_posix_path: src /etc/passwd
51 17432 [main] git-update-index 1476 normalize_posix_path: /etc/passwd = normalize_posix_path (/etc/passwd)
52 17484 [main] git-update-index 1476 mount_info::conv_to_win32_path: conv_to_win32_path (/etc/passwd)
53 17537 [main] git-update-index 1476 set_flags: flags: binary (0x2)
51 17588 [main] git-update-index 1476 mount_info::conv_to_win32_path: src_path /etc/passwd, dst D:\Programs\cygwin\etc\passwd, flags 0xA, rc 0
98 17686 [main] git-update-index 1476 symlink_info::check: not a symlink
53 17739 [main] git-update-index 1476 symlink_info::check: 0 = symlink.check (D:\Programs\cygwin\etc\passwd, 0x22E830) (0xA)
54 17793 [main] git-update-index 1476 path_conv::check: this->path(D:\Programs\cygwin\etc\passwd), has_acls(0)
107 17900 [main] git-update-index 1476 etc::test_file_change: FindFirstFile succeeded
356 18256 [main] git-update-index 1476 pwdgrp::load: /etc/passwd curr_lines 5
52 18308 [main] git-update-index 1476 pwdgrp::load: /etc/passwd load succeeded
66 18374 [main] git-update-index 1476 normalize_posix_path: src /etc/group
52 18426 [main] git-update-index 1476 normalize_posix_path: /etc/group = normalize_posix_path (/etc/group)
51 18477 [main] git-update-index 1476 mount_info::conv_to_win32_path: conv_to_win32_path (/etc/group)
52 18529 [main] git-update-index 1476 set_flags: flags: binary (0x2)
51 18580 [main] git-update-index 1476 mount_info::conv_to_win32_path: src_path /etc/group, dst D:\Programs\cygwin\etc\group, flags 0xA, rc 0
78 18658 [main] git-update-index 1476 symlink_info::check: not a symlink
52 18710 [main] git-update-index 1476 symlink_info::check: 0 = symlink.check (D:\Programs\cygwin\etc\group, 0x22E7F0) (0xA)
53 18763 [main] git-update-index 1476 path_conv::check: this->path(D:\Programs\cygwin\etc\group), has_acls(0)
94 18857 [main] git-update-index 1476 etc::test_file_change: FindFirstFile succeeded
343 19200 [main] git-update-index 1476 pwdgrp::load: /etc/group curr_lines 8
52 19252 [main] git-update-index 1476 pwdgrp::load: /etc/group load succeeded
184 19436 [main] git-update-index 1476 pwdgrp::read_group: Completing /etc/group: mkgroup:S-1-5-21-484763869-1275210071-682003330-513:10513:ARiesen
108 19544 [main] git-update-index 1476 cygheap_user::ontherange: what 2, pw 0x10021CE8
54 19598 [main] git-update-index 1476 cygheap_user::ontherange: HOME is already in the environment /cygdrive/h
205 19803 [main] git-update-index 1476 sigproc_init: process/signal handling enabled(1)
313 20116 [sig] git-update-index 1476 wait_sig: myself->dwProcessId 1476
61 20177 [sig] git-update-index 1476 wait_sig: entering ReadFile loop, readsig 0x328, myself->sendsig 0x324
154 20331 [main] git-update-index 1476 build_argv: argv[0] = 'git-update-index'
54 20385 [main] git-update-index 1476 build_argv: argv[1] = 'index.c'
56 20441 [main] git-update-index 1476 build_argv: argc 2
116 20557 [main] git-update-index 1476 build_fh_pc: fh 0x611557E8
72 20629 [main] git-update-index 1476 open_shared: name (null), shared 0x60020000 (wanted 0x60020000), h 0x318
61 20690 [main] git-update-index 1476 _pinfo::set_ctty: checking if /dev/tty-1 changed
53 20743 [main] git-update-index 1476 _pinfo::set_ctty: attached tty1073741824 sid 1476, pid 1476, tty->pgid 1476, tty->sid 1476
3244 23987 [main] git-update-index 1476 fhandler_base::set_flags: flags 0x10002, supplied_bin 0x0
74 24061 [main] git-update-index 1476 fhandler_base::set_flags: O_TEXT/O_BINARY set in flags 0x10000
55 24116 [main] git-update-index 1476 fhandler_base::set_flags: filemode set to binary
106 24222 [main] git-update-index 1476 fhandler_console::open: incremented open_fhs, now 1
54 24276 [main] git-update-index 1476 fhandler_console::open: opened conin$ 0x2B, conout$ 0x2F
68 24344 [main] git-update-index 1476 fhandler_console::output_tcsetattr: 0 = tcsetattr (,60020018) (ENABLE FLAGS 3) (lflag 107 oflag 9)
137 24481 [main] git-update-index 1476 build_fh_pc: fh 0x611559F0
54 24535 [main] git-update-index 1476 fhandler_base::set_flags: flags 0x10002, supplied_bin 0x0
54 24589 [main] git-update-index 1476 fhandler_base::set_flags: O_TEXT/O_BINARY set in flags 0x10000
53 24642 [main] git-update-index 1476 fhandler_base::set_flags: filemode set to binary
95 24737 [main] git-update-index 1476 fhandler_console::open: incremented open_fhs, now 2
56 24793 [main] git-update-index 1476 fhandler_console::open: opened conin$ 0xB, conout$ 0x33
66 24859 [main] git-update-index 1476 fhandler_console::output_tcsetattr: 0 = tcsetattr (,60020018) (ENABLE FLAGS 3) (lflag 107 oflag 9)
126 24985 [main] git-update-index 1476 build_fh_pc: fh 0x61155BF8
53 25038 [main] git-update-index 1476 fhandler_base::set_flags: flags 0x10002, supplied_bin 0x0
53 25091 [main] git-update-index 1476 fhandler_base::set_flags: O_TEXT/O_BINARY set in flags 0x10000
53 25144 [main] git-update-index 1476 fhandler_base::set_flags: filemode set to binary
88 25232 [main] git-update-index 1476 fhandler_console::open: incremented open_fhs, now 3
53 25285 [main] git-update-index 1476 fhandler_console::open: opened conin$ 0x13, conout$ 0x37
66 25351 [main] git-update-index 1476 fhandler_console::output_tcsetattr: 0 = tcsetattr (,60020018) (ENABLE FLAGS 3) (lflag 107 oflag 9)
128 25479 [main] git-update-index 1476 dll_crt0_1: user_data->main 0x401580
54 25533 [main] git-update-index 1476 __set_errno: void dll_crt0_1(char*):880 val 0
53 25586 [main] git-update-index 1476 wait_for_sigthread: wait_sig_inited 0x320
169 25755 [main] git-update-index 1476 cwdstuff::get: posix /d/download/git-mine
53 25808 [main] git-update-index 1476 cwdstuff::get: (/d/download/git-mine) = cwdstuff::get (0x40C450, 261, 1, 1), errno 0
60 25868 [main] git-update-index 1476 normalize_posix_path: src .git/refs/
53 25921 [main] git-update-index 1476 cwdstuff::get: posix /d/download/git-mine
52 25973 [main] git-update-index 1476 cwdstuff::get: (/d/download/git-mine) = cwdstuff::get (0x22EAA0, 260, 1, 0), errno 0
54 26027 [main] git-update-index 1476 normalize_posix_path: /d/download/git-mine/.git/refs/ = normalize_posix_path (.git/refs/)
54 26081 [main] git-update-index 1476 mount_info::conv_to_win32_path: conv_to_win32_path (/d/download/git-mine/.git/refs)
55 26136 [main] git-update-index 1476 set_flags: flags: binary (0x2)
53 26189 [main] git-update-index 1476 mount_info::conv_to_win32_path: src_path /d/download/git-mine/.git/refs, dst d:\download\git-mine\.git\refs, flags 0xA, rc 0
104 26293 [main] git-update-index 1476 symlink_info::check: not a symlink
55 26348 [main] git-update-index 1476 symlink_info::check: 0 = symlink.check (d:\download\git-mine\.git\refs, 0x22E760) (0xA)
55 26403 [main] git-update-index 1476 path_conv::check: this->path(d:\download\git-mine\.git\refs), has_acls(0)
55 26458 [main] git-update-index 1476 build_fh_pc: fh 0x61155E00
231 26689 [main] git-update-index 1476 get_file_attribute: file: d:\download\git-mine\.git\refs
60 26749 [main] git-update-index 1476 fhandler_base::fstat_helper: 0 = fstat (, 0x22ECF0) st_atime=4341A9E0 st_size=0, st_mode=0x41ED, st_ino=318799352, sizeof=96
56 26805 [main] git-update-index 1476 fhandler_base::fhaccess: returning 0
53 26858 [main] git-update-index 1476 access: returning 0
55 26913 [main] git-update-index 1476 normalize_posix_path: src .git/objects/
52 26965 [main] git-update-index 1476 cwdstuff::get: posix /d/download/git-mine
53 27018 [main] git-update-index 1476 cwdstuff::get: (/d/download/git-mine) = cwdstuff::get (0x22EAA0, 260, 1, 0), errno 0
54 27072 [main] git-update-index 1476 normalize_posix_path: /d/download/git-mine/.git/objects/ = normalize_posix_path (.git/objects/)
53 27125 [main] git-update-index 1476 mount_info::conv_to_win32_path: conv_to_win32_path (/d/download/git-mine/.git/objects)
54 27179 [main] git-update-index 1476 set_flags: flags: binary (0x2)
53 27232 [main] git-update-index 1476 mount_info::conv_to_win32_path: src_path /d/download/git-mine/.git/objects, dst d:\download\git-mine\.git\objects, flags 0xA, rc 0
82 27314 [main] git-update-index 1476 symlink_info::check: not a symlink
53 27367 [main] git-update-index 1476 symlink_info::check: 0 = symlink.check (d:\download\git-mine\.git\objects, 0x22E760) (0xA)
173 27540 [main] git-update-index 1476 path_conv::check: this->path(d:\download\git-mine\.git\objects), has_acls(0)
57 27597 [main] git-update-index 1476 build_fh_pc: fh 0x61155E00
400 27997 [main] git-update-index 1476 get_file_attribute: file: d:\download\git-mine\.git\objects
57 28054 [main] git-update-index 1476 fhandler_base::fstat_helper: 0 = fstat (, 0x22ECF0) st_atime=4341A9E0 st_size=0, st_mode=0x41ED, st_ino=67615292, sizeof=96
55 28109 [main] git-update-index 1476 fhandler_base::fhaccess: returning 0
53 28162 [main] git-update-index 1476 access: returning 0
53 28215 [main] git-update-index 1476 lstat64: entering
53 28268 [main] git-update-index 1476 normalize_posix_path: src .git/HEAD
52 28320 [main] git-update-index 1476 cwdstuff::get: posix /d/download/git-mine
53 28373 [main] git-update-index 1476 cwdstuff::get: (/d/download/git-mine) = cwdstuff::get (0x22E8F0, 260, 1, 0), errno 0
54 28427 [main] git-update-index 1476 normalize_posix_path: /d/download/git-mine/.git/HEAD = normalize_posix_path (.git/HEAD)
53 28480 [main] git-update-index 1476 mount_info::conv_to_win32_path: conv_to_win32_path (/d/download/git-mine/.git/HEAD)
55 28535 [main] git-update-index 1476 set_flags: flags: binary (0x2)
52 28587 [main] git-update-index 1476 mount_info::conv_to_win32_path: src_path /d/download/git-mine/.git/HEAD, dst d:\download\git-mine\.git\HEAD, flags 0xA, rc 0
81 28668 [main] git-update-index 1476 symlink_info::check: GetFileAttributes (d:\download\git-mine\.git\HEAD) failed
55 28723 [main] git-update-index 1476 geterrno_from_win_error: windows error 2 == errno 2
81 28804 [main] git-update-index 1476 symlink_info::check: GetFileAttributes (d:\download\git-mine\.git\HEAD.exe) failed
54 28858 [main] git-update-index 1476 geterrno_from_win_error: windows error 2 == errno 2
76 28934 [main] git-update-index 1476 symlink_info::check: GetFileAttributes (d:\download\git-mine\.git\HEAD.exe.lnk) failed
54 28988 [main] git-update-index 1476 geterrno_from_win_error: windows error 2 == errno 2
129 29117 [main] git-update-index 1476 symlink_info::check: 17 = symlink.check (d:\download\git-mine\.git\HEAD.lnk, 0x22E5B0) (0x1000001)
59 29176 [main] git-update-index 1476 path_conv::check: this->path(d:\download\git-mine\.git\HEAD.lnk), has_acls(0)
56 29232 [main] git-update-index 1476 build_fh_pc: fh 0x61155E00
53 29285 [main] git-update-index 1476 stat_worker: (.git/HEAD, 0x22ED20, 1, 0x61155E00), file_attributes 1
99 29384 [main] git-update-index 1476 get_file_attribute: file: d:\download\git-mine\.git\HEAD.lnk
55 29439 [main] git-update-index 1476 fhandler_base::fstat_helper: 0 = fstat (, 0x22ED20) st_atime=4342FB60 st_size=17, st_mode=0xA1FF, st_ino=332219763, sizeof=96
56 29495 [main] git-update-index 1476 stat_worker: 0 = (.git/HEAD, 0x22ED20)
54 29549 [main] git-update-index 1476 normalize_posix_path: src .git/HEAD
53 29602 [main] git-update-index 1476 cwdstuff::get: posix /d/download/git-mine
52 29654 [main] git-update-index 1476 cwdstuff::get: (/d/download/git-mine) = cwdstuff::get (0x22E940, 260, 1, 0), errno 0
54 29708 [main] git-update-index 1476 normalize_posix_path: /d/download/git-mine/.git/HEAD = normalize_posix_path (.git/HEAD)
53 29761 [main] git-update-index 1476 mount_info::conv_to_win32_path: conv_to_win32_path (/d/download/git-mine/.git/HEAD)
54 29815 [main] git-update-index 1476 set_flags: flags: binary (0x2)
53 29868 [main] git-update-index 1476 mount_info::conv_to_win32_path: src_path /d/download/git-mine/.git/HEAD, dst d:\download\git-mine\.git\HEAD, flags 0xA, rc 0
78 29946 [main] git-update-index 1476 symlink_info::check: GetFileAttributes (d:\download\git-mine\.git\HEAD) failed
55 30001 [main] git-update-index 1476 geterrno_from_win_error: windows error 2 == errno 2
75 30076 [main] git-update-index 1476 symlink_info::check: GetFileAttributes (d:\download\git-mine\.git\HEAD.exe) failed
59 30135 [main] git-update-index 1476 geterrno_from_win_error: windows error 2 == errno 2
75 30210 [main] git-update-index 1476 symlink_info::check: GetFileAttributes (d:\download\git-mine\.git\HEAD.exe.lnk) failed
55 30265 [main] git-update-index 1476 geterrno_from_win_error: windows error 2 == errno 2
110 30375 [main] git-update-index 1476 symlink_info::check: 17 = symlink.check (d:\download\git-mine\.git\HEAD.lnk, 0x22E600) (0x1000001)
58 30433 [main] git-update-index 1476 fs_info::update: Cannot get root component of path refs/heads/master
786 31219 [main] git-update-index 1476 open: open (.git/index.lock, 0xA02)
54 31273 [main] git-update-index 1476 normalize_posix_path: src .git/index.lock
53 31326 [main] git-update-index 1476 cwdstuff::get: posix /d/download/git-mine
52 31378 [main] git-update-index 1476 cwdstuff::get: (/d/download/git-mine) = cwdstuff::get (0x22EA70, 260, 1, 0), errno 0
55 31433 [main] git-update-index 1476 normalize_posix_path: /d/download/git-mine/.git/index.lock = normalize_posix_path (.git/index.lock)
53 31486 [main] git-update-index 1476 mount_info::conv_to_win32_path: conv_to_win32_path (/d/download/git-mine/.git/index.lock)
54 31540 [main] git-update-index 1476 set_flags: flags: binary (0x2)
53 31593 [main] git-update-index 1476 mount_info::conv_to_win32_path: src_path /d/download/git-mine/.git/index.lock, dst d:\download\git-mine\.git\index.lock, flags 0xA, rc 0
80 31673 [main] git-update-index 1476 symlink_info::check: GetFileAttributes (d:\download\git-mine\.git\index.lock) failed
55 31728 [main] git-update-index 1476 geterrno_from_win_error: windows error 2 == errno 2
75 31803 [main] git-update-index 1476 symlink_info::check: GetFileAttributes (d:\download\git-mine\.git\index.lock.lnk) failed
55 31858 [main] git-update-index 1476 geterrno_from_win_error: windows error 2 == errno 2
53 31911 [main] git-update-index 1476 symlink_info::check: 0 = symlink.check (d:\download\git-mine\.git\index.lock, 0x22E730) (0xA)
54 31965 [main] git-update-index 1476 mount_info::conv_to_win32_path: conv_to_win32_path (/d/download/git-mine/.git)
54 32019 [main] git-update-index 1476 set_flags: flags: binary (0x2)
53 32072 [main] git-update-index 1476 mount_info::conv_to_win32_path: src_path /d/download/git-mine/.git, dst d:\download\git-mine\.git, flags 0xA, rc 0
78 32150 [main] git-update-index 1476 symlink_info::check: not a symlink
54 32204 [main] git-update-index 1476 symlink_info::check: 0 = symlink.check (d:\download\git-mine\.git, 0x22E730) (0xA)
54 32258 [main] git-update-index 1476 path_conv::check: this->path(d:\download\git-mine\.git\index.lock), has_acls(0)
56 32314 [main] git-update-index 1476 build_fh_pc: fh 0x61155E00
95 32409 [main] git-update-index 1476 fhandler_base::open: (d:\download\git-mine\.git\index.lock, 0x100A02)
98 32507 [main] git-update-index 1476 fhandler_base::set_flags: flags 0x100A02, supplied_bin 0x10000
56 32563 [main] git-update-index 1476 fhandler_base::set_flags: filemode set to binary
53 32616 [main] git-update-index 1476 fhandler_base::open: 0 = NtCreateFile (0x320, C0100000, d:\download\git-mine\.git\index.lock, io, NULL, 80, 7, 2, 20, NULL, 0)
54 32670 [main] git-update-index 1476 fhandler_base::open: 1 = fhandler_base::open (d:\download\git-mine\.git\index.lock, 0x100A02)
54 32724 [main] git-update-index 1476 fhandler_base::open_fs: 1 = fhandler_disk_file::open (d:\download\git-mine\.git\index.lock, 0xA02)
55 32779 [main] git-update-index 1476 open: 3 = open (.git/index.lock, 0xA02)
56 32835 [main] git-update-index 1476 void: 0x0 = signal (2, 0x402E20)
157 32992 [main] git-update-index 1476 open: open (.git/index, 0x0)
53 33045 [main] git-update-index 1476 normalize_posix_path: src .git/index
53 33098 [main] git-update-index 1476 cwdstuff::get: posix /d/download/git-mine
57 33155 [main] git-update-index 1476 cwdstuff::get: (/d/download/git-mine) = cwdstuff::get (0x22E960, 260, 1, 0), errno 2
55 33210 [main] git-update-index 1476 normalize_posix_path: /d/download/git-mine/.git/index = normalize_posix_path (.git/index)
53 33263 [main] git-update-index 1476 mount_info::conv_to_win32_path: conv_to_win32_path (/d/download/git-mine/.git/index)
53 33316 [main] git-update-index 1476 set_flags: flags: binary (0x2)
53 33369 [main] git-update-index 1476 mount_info::conv_to_win32_path: src_path /d/download/git-mine/.git/index, dst d:\download\git-mine\.git\index, flags 0xA, rc 0
84 33453 [main] git-update-index 1476 symlink_info::check: not a symlink
54 33507 [main] git-update-index 1476 symlink_info::check: 0 = symlink.check (d:\download\git-mine\.git\index, 0x22E620) (0xA)
54 33561 [main] git-update-index 1476 path_conv::check: this->path(d:\download\git-mine\.git\index), has_acls(0)
77 33638 [main] git-update-index 1476 build_fh_pc: fh 0x61156008
55 33693 [main] git-update-index 1476 fhandler_base::open: (d:\download\git-mine\.git\index, 0x100000)
66 33759 [main] git-update-index 1476 fhandler_base::set_flags: flags 0x100000, supplied_bin 0x10000
54 33813 [main] git-update-index 1476 fhandler_base::set_flags: filemode set to binary
53 33866 [main] git-update-index 1476 fhandler_base::open: 0 = NtCreateFile (0x2FC, 80100000, d:\download\git-mine\.git\index, io, NULL, 0, 7, 1, 20, NULL, 0)
54 33920 [main] git-update-index 1476 fhandler_base::open: 1 = fhandler_base::open (d:\download\git-mine\.git\index, 0x100000)
54 33974 [main] git-update-index 1476 fhandler_base::open_fs: 1 = fhandler_disk_file::open (d:\download\git-mine\.git\index, 0x0)
53 34027 [main] git-update-index 1476 open: 4 = open (.git/index, 0x0)
75 34102 [main] git-update-index 1476 get_file_attribute: file: d:\download\git-mine\.git\index
79 34181 [main] git-update-index 1476 fhandler_base::fstat_helper: 0 = fstat (, 0x22ED40) st_atime=4342FB60 st_size=32616, st_mode=0x81A4, st_ino=1769659834, sizeof=96
57 34238 [main] git-update-index 1476 fstat64: 0 = fstat (4, 0x22ED40)
101 34339 [main] git-update-index 1476 mmap64: addr 0, len 32616, prot 3, flags 2, fd 4, off 0
78 34417 [main] git-update-index 1476 fhandler_disk_file::mmap: 307C0000 = MapViewOfFileEx (h:2F8, access:1, 0, off:0, len:32616, addr:0)
60 34477 [main] git-update-index 1476 mmap64: 307C0000 = mmap() succeeded
54 34531 [main] git-update-index 1476 close: close (4)
56 34587 [main] git-update-index 1476 fhandler_base::close: closing '/d/download/git-mine/.git/index' handle 0x2FC
60 34647 [main] git-update-index 1476 close: 0 = close (4)
244 34891 [main] git-update-index 1476 lstat64: entering
53 34944 [main] git-update-index 1476 normalize_posix_path: src index.c
52 34996 [main] git-update-index 1476 cwdstuff::get: posix /d/download/git-mine
53 35049 [main] git-update-index 1476 cwdstuff::get: (/d/download/git-mine) = cwdstuff::get (0x22E9A0, 260, 1, 0), errno 22
54 35103 [main] git-update-index 1476 normalize_posix_path: /d/download/git-mine/index.c = normalize_posix_path (index.c)
53 35156 [main] git-update-index 1476 mount_info::conv_to_win32_path: conv_to_win32_path (/d/download/git-mine/index.c)
54 35210 [main] git-update-index 1476 set_flags: flags: binary (0x2)
53 35263 [main] git-update-index 1476 mount_info::conv_to_win32_path: src_path /d/download/git-mine/index.c, dst d:\download\git-mine\index.c, flags 0xA, rc 0
86 35349 [main] git-update-index 1476 symlink_info::check: not a symlink
54 35403 [main] git-update-index 1476 symlink_info::check: 0 = symlink.check (d:\download\git-mine\index.c, 0x22E660) (0xA)
55 35458 [main] git-update-index 1476 path_conv::check: this->path(d:\download\git-mine\index.c), has_acls(0)
56 35514 [main] git-update-index 1476 build_fh_pc: fh 0x61156008
52 35566 [main] git-update-index 1476 stat_worker: (index.c, 0x22ED40, 1, 0x61156008), file_attributes 32
61 35627 [main] git-update-index 1476 fhandler_base::open: (d:\download\git-mine\index.c, 0x110000)
65 35692 [main] git-update-index 1476 fhandler_base::set_flags: flags 0x110000, supplied_bin 0x10000
54 35746 [main] git-update-index 1476 fhandler_base::set_flags: O_TEXT/O_BINARY set in flags 0x10000
53 35799 [main] git-update-index 1476 fhandler_base::set_flags: filemode set to binary
52 35851 [main] git-update-index 1476 fhandler_base::open: 0 = NtCreateFile (0x2FC, 80100000, d:\download\git-mine\index.c, io, NULL, 0, 7, 1, 20, NULL, 0)
55 35906 [main] git-update-index 1476 fhandler_base::open: 1 = fhandler_base::open (d:\download\git-mine\index.c, 0x110000)
53 35959 [main] git-update-index 1476 fhandler_base::open_fs: 1 = fhandler_disk_file::open (d:\download\git-mine\index.c, 0x10000)
67 36026 [main] git-update-index 1476 get_file_attribute: file: d:\download\git-mine\index.c
77 36103 [main] git-update-index 1476 fhandler_base::fstat_helper: 0 = fstat (, 0x22ED40) st_atime=4342FB60 st_size=1301, st_mode=0x81A4, st_ino=-792472185, sizeof=96
57 36160 [main] git-update-index 1476 fhandler_base::close: closing '/d/download/git-mine/index.c' handle 0x2FC
59 36219 [main] git-update-index 1476 stat_worker: 0 = (index.c, 0x22ED40)
120 36339 [main] git-update-index 1476 open: open (index.c, 0x0)
53 36392 [main] git-update-index 1476 normalize_posix_path: src index.c
52 36444 [main] git-update-index 1476 cwdstuff::get: posix /d/download/git-mine
53 36497 [main] git-update-index 1476 cwdstuff::get: (/d/download/git-mine) = cwdstuff::get (0x22E990, 260, 1, 0), errno 22
54 36551 [main] git-update-index 1476 normalize_posix_path: /d/download/git-mine/index.c = normalize_posix_path (index.c)
53 36604 [main] git-update-index 1476 mount_info::conv_to_win32_path: conv_to_win32_path (/d/download/git-mine/index.c)
54 36658 [main] git-update-index 1476 set_flags: flags: binary (0x2)
63 36721 [main] git-update-index 1476 mount_info::conv_to_win32_path: src_path /d/download/git-mine/index.c, dst d:\download\git-mine\index.c, flags 0xA, rc 0
80 36801 [main] git-update-index 1476 symlink_info::check: not a symlink
55 36856 [main] git-update-index 1476 symlink_info::check: 0 = symlink.check (d:\download\git-mine\index.c, 0x22E650) (0xA)
54 36910 [main] git-update-index 1476 path_conv::check: this->path(d:\download\git-mine\index.c), has_acls(0)
55 36965 [main] git-update-index 1476 build_fh_pc: fh 0x61156008
54 37019 [main] git-update-index 1476 fhandler_base::open: (d:\download\git-mine\index.c, 0x100000)
64 37083 [main] git-update-index 1476 fhandler_base::set_flags: flags 0x100000, supplied_bin 0x10000
54 37137 [main] git-update-index 1476 fhandler_base::set_flags: filemode set to binary
53 37190 [main] git-update-index 1476 fhandler_base::open: 0 = NtCreateFile (0x2FC, 80100000, d:\download\git-mine\index.c, io, NULL, 0, 7, 1, 20, NULL, 0)
54 37244 [main] git-update-index 1476 fhandler_base::open: 1 = fhandler_base::open (d:\download\git-mine\index.c, 0x100000)
54 37298 [main] git-update-index 1476 fhandler_base::open_fs: 1 = fhandler_disk_file::open (d:\download\git-mine\index.c, 0x0)
53 37351 [main] git-update-index 1476 open: 4 = open (index.c, 0x0)
53 37404 [main] git-update-index 1476 mmap64: addr 0, len 1301, prot 1, flags 2, fd 4, off 0
256 37660 [main] git-update-index 1476 fhandler_disk_file::mmap: 307D0000 = MapViewOfFileEx (h:2F4, access:1, 0, off:0, len:1301, addr:0)
64 37724 [main] git-update-index 1476 mmap64: 307D0000 = mmap() succeeded
54 37778 [main] git-update-index 1476 close: close (4)
53 37831 [main] git-update-index 1476 fhandler_base::close: closing '/d/download/git-mine/index.c' handle 0x2FC
64 37895 [main] git-update-index 1476 close: 0 = close (4)
329 38224 [main] git-update-index 1476 normalize_posix_path: src .git/objects/pack
58 38282 [main] git-update-index 1476 cwdstuff::get: posix /d/download/git-mine
53 38335 [main] git-update-index 1476 cwdstuff::get: (/d/download/git-mine) = cwdstuff::get (0x22E630, 260, 1, 0), errno 22
54 38389 [main] git-update-index 1476 normalize_posix_path: /d/download/git-mine/.git/objects/pack = normalize_posix_path (.git/objects/pack)
54 38443 [main] git-update-index 1476 mount_info::conv_to_win32_path: conv_to_win32_path (/d/download/git-mine/.git/objects/pack)
54 38497 [main] git-update-index 1476 set_flags: flags: binary (0x2)
53 38550 [main] git-update-index 1476 mount_info::conv_to_win32_path: src_path /d/download/git-mine/.git/objects/pack, dst d:\download\git-mine\.git\objects\pack, flags 0xA, rc 0
92 38642 [main] git-update-index 1476 symlink_info::check: not a symlink
54 38696 [main] git-update-index 1476 symlink_info::check: 0 = symlink.check (d:\download\git-mine\.git\objects\pack, 0x22E2F0) (0xA)
55 38751 [main] git-update-index 1476 path_conv::check: this->path(d:\download\git-mine\.git\objects\pack), has_acls(0)
56 38807 [main] git-update-index 1476 build_fh_pc: fh 0x61156008
349 39156 [main] git-update-index 1476 get_file_attribute: file: d:\download\git-mine\.git\objects\pack
59 39215 [main] git-update-index 1476 fhandler_base::fstat_helper: 0 = fstat (, 0x22E820) st_atime=4341A9E0 st_size=0, st_mode=0x41ED, st_ino=165413209, sizeof=96
56 39271 [main] git-update-index 1476 fhandler_base::fhaccess: returning 0
54 39325 [main] git-update-index 1476 fhandler_disk_file::opendir: 0x100229B8 = opendir (/d/download/git-mine/.git/objects/pack)
105 39430 [main] git-update-index 1476 fhandler_disk_file::readdir: 0x100229BC = readdir (0x100229B8) (.)
69 39499 [main] git-update-index 1476 fhandler_disk_file::readdir: 0x100229BC = readdir (0x100229B8) (..)
81 39580 [main] git-update-index 1476 fhandler_disk_file::readdir: 0x0 = readdir (0x100229B8)
55 39635 [main] git-update-index 1476 fhandler_disk_file::closedir: 0 = closedir (0x100229B8)
207 39842 [main] git-update-index 1476 closedir: 0 = closedir (0x22E8D0)
159 40001 [main] git-update-index 1476 open: open (.git/objects/info/alternates, 0x0)
53 40054 [main] git-update-index 1476 normalize_posix_path: src .git/objects/info/alternates
53 40107 [main] git-update-index 1476 cwdstuff::get: posix /d/download/git-mine
52 40159 [main] git-update-index 1476 cwdstuff::get: (/d/download/git-mine) = cwdstuff::get (0x22E5B0, 260, 1, 0), errno 22
55 40214 [main] git-update-index 1476 normalize_posix_path: /d/download/git-mine/.git/objects/info/alternates = normalize_posix_path (.git/objects/info/alternates)
53 40267 [main] git-update-index 1476 mount_info::conv_to_win32_path: conv_to_win32_path (/d/download/git-mine/.git/objects/info/alternates)
54 40321 [main] git-update-index 1476 set_flags: flags: binary (0x2)
53 40374 [main] git-update-index 1476 mount_info::conv_to_win32_path: src_path /d/download/git-mine/.git/objects/info/alternates, dst d:\download\git-mine\.git\objects\info\alternates, flags 0xA, rc 0
108 40482 [main] git-update-index 1476 symlink_info::check: GetFileAttributes (d:\download\git-mine\.git\objects\info\alternates) failed
57 40539 [main] git-update-index 1476 geterrno_from_win_error: windows error 2 == errno 2
100 40639 [main] git-update-index 1476 symlink_info::check: GetFileAttributes (d:\download\git-mine\.git\objects\info\alternates.lnk) failed
56 40695 [main] git-update-index 1476 geterrno_from_win_error: windows error 2 == errno 2
54 40749 [main] git-update-index 1476 symlink_info::check: 0 = symlink.check (d:\download\git-mine\.git\objects\info\alternates, 0x22E270) (0xA)
54 40803 [main] git-update-index 1476 mount_info::conv_to_win32_path: conv_to_win32_path (/d/download/git-mine/.git/objects/info)
54 40857 [main] git-update-index 1476 set_flags: flags: binary (0x2)
52 40909 [main] git-update-index 1476 mount_info::conv_to_win32_path: src_path /d/download/git-mine/.git/objects/info, dst d:\download\git-mine\.git\objects\info, flags 0xA, rc 0
85 40994 [main] git-update-index 1476 symlink_info::check: not a symlink
54 41048 [main] git-update-index 1476 symlink_info::check: 0 = symlink.check (d:\download\git-mine\.git\objects\info, 0x22E270) (0xA)
55 41103 [main] git-update-index 1476 path_conv::check: this->path(d:\download\git-mine\.git\objects\info\alternates), has_acls(0)
56 41159 [main] git-update-index 1476 build_fh_pc: fh 0x61156008
55 41214 [main] git-update-index 1476 fhandler_base::open: (d:\download\git-mine\.git\objects\info\alternates, 0x100000)
95 41309 [main] git-update-index 1476 seterrno_from_win_error: /netrel/src/cygwin-1.5.18-1/winsup/cygwin/fhandler.cc:666 windows error 2
56 41365 [main] git-update-index 1476 geterrno_from_win_error: windows error 2 == errno 2
53 41418 [main] git-update-index 1476 __set_errno: void seterrno_from_win_error(const char*, int, DWORD):307 val 2
53 41471 [main] git-update-index 1476 fhandler_base::open: C0000034 = NtCreateFile (0x0, 80100000, d:\download\git-mine\.git\objects\info\alternates, io, NULL, 0, 7, 1, 20, NULL, 0)
55 41526 [main] git-update-index 1476 fhandler_base::open: 0 = fhandler_base::open (d:\download\git-mine\.git\objects\info\alternates, 0x100000)
54 41580 [main] git-update-index 1476 fhandler_base::open_fs: 0 = fhandler_disk_file::open (d:\download\git-mine\.git\objects\info\alternates, 0x0)
54 41634 [main] git-update-index 1476 open: -1 = open (.git/objects/info/alternates, 0x0)
54 41688 [main] git-update-index 1476 stat64: entering
53 41741 [main] git-update-index 1476 normalize_posix_path: src .git/objects/44/279b2481951e474e959a395d085327082700b0
53 41794 [main] git-update-index 1476 cwdstuff::get: posix /d/download/git-mine
52 41846 [main] git-update-index 1476 cwdstuff::get: (/d/download/git-mine) = cwdstuff::get (0x22E770, 260, 1, 0), errno 2
54 41900 [main] git-update-index 1476 normalize_posix_path: /d/download/git-mine/.git/objects/44/279b2481951e474e959a395d085327082700b0 = normalize_posix_path (.git/objects/44/279b2481951e474e959a395d085327082700b0)
55 41955 [main] git-update-index 1476 mount_info::conv_to_win32_path: conv_to_win32_path (/d/download/git-mine/.git/objects/44/279b2481951e474e959a395d085327082700b0)
54 42009 [main] git-update-index 1476 set_flags: flags: binary (0x2)
53 42062 [main] git-update-index 1476 mount_info::conv_to_win32_path: src_path /d/download/git-mine/.git/objects/44/279b2481951e474e959a395d085327082700b0, dst d:\download\git-mine\.git\objects\44\279b2481951e474e959a395d085327082700b0, flags 0xA, rc 0
87 42149 [main] git-update-index 1476 symlink_info::check: not a symlink
54 42203 [main] git-update-index 1476 symlink_info::check: 0 = symlink.check (d:\download\git-mine\.git\objects\44\279b2481951e474e959a395d085327082700b0, 0x22E430) (0xA)
56 42259 [main] git-update-index 1476 path_conv::check: this->path(d:\download\git-mine\.git\objects\44\279b2481951e474e959a395d085327082700b0), has_acls(0)
56 42315 [main] git-update-index 1476 build_fh_pc: fh 0x61156008
53 42368 [main] git-update-index 1476 stat_worker: (.git/objects/44/279b2481951e474e959a395d085327082700b0, 0x22EAD0, 0, 0x61156008), file_attributes 33
56 42424 [main] git-update-index 1476 fhandler_base::open: (d:\download\git-mine\.git\objects\44\279b2481951e474e959a395d085327082700b0, 0x110000)
66 42490 [main] git-update-index 1476 fhandler_base::set_flags: flags 0x110000, supplied_bin 0x10000
55 42545 [main] git-update-index 1476 fhandler_base::set_flags: O_TEXT/O_BINARY set in flags 0x10000
97 42642 [main] git-update-index 1476 fhandler_base::set_flags: filemode set to binary
53 42695 [main] git-update-index 1476 fhandler_base::open: 0 = NtCreateFile (0x2FC, 80100000, d:\download\git-mine\.git\objects\44\279b2481951e474e959a395d085327082700b0, io, NULL, 0, 7, 1, 20, NULL, 0)
55 42750 [main] git-update-index 1476 fhandler_base::open: 1 = fhandler_base::open (d:\download\git-mine\.git\objects\44\279b2481951e474e959a395d085327082700b0, 0x110000)
59 42809 [main] git-update-index 1476 fhandler_base::open_fs: 1 = fhandler_disk_file::open (d:\download\git-mine\.git\objects\44\279b2481951e474e959a395d085327082700b0, 0x10000)
69 42878 [main] git-update-index 1476 get_file_attribute: file: d:\download\git-mine\.git\objects\44\279b2481951e474e959a395d085327082700b0
78 42956 [main] git-update-index 1476 fhandler_base::fstat_helper: 0 = fstat (, 0x22EAD0) st_atime=4342FB60 st_size=562, st_mode=0x8124, st_ino=-1400112376, sizeof=96
57 43013 [main] git-update-index 1476 fhandler_base::close: closing '/d/download/git-mine/.git/objects/44/279b2481951e474e959a395d085327082700b0' handle 0x2FC
61 43074 [main] git-update-index 1476 stat_worker: 0 = (.git/objects/44/279b2481951e474e959a395d085327082700b0, 0x22EAD0)
56 43130 [main] git-update-index 1476 munmap: munmap (addr 307D0000, len 1301)
66 43196 [main] git-update-index 1476 build_fh_pc: fh 0x61156008
61 43257 [main] git-update-index 1476 munmap: 0 = munmap(): 307D0000
101 43358 [main] git-update-index 1476 writev: writev (3, 0x22ECE0, 1)
53 43411 [main] git-update-index 1476 fhandler_base::write: binary write
88 43499 [main] git-update-index 1476 writev: 8192 = write (3, 0x22ECE0, 1), errno 2
87 43586 [main] git-update-index 1476 writev: writev (3, 0x22ECE0, 1)
53 43639 [main] git-update-index 1476 fhandler_base::write: binary write
59 43698 [main] git-update-index 1476 writev: 8192 = write (3, 0x22ECE0, 1), errno 2
86 43784 [main] git-update-index 1476 writev: writev (3, 0x22ECE0, 1)
53 43837 [main] git-update-index 1476 fhandler_base::write: binary write
59 43896 [main] git-update-index 1476 writev: 8192 = write (3, 0x22ECE0, 1), errno 2
86 43982 [main] git-update-index 1476 writev: writev (3, 0x22ED10, 1)
53 44035 [main] git-update-index 1476 fhandler_base::write: binary write
59 44094 [main] git-update-index 1476 writev: 8040 = write (3, 0x22ED10, 1), errno 2
354 44448 [main] git-update-index 1476 fhandler_console::write: 22D140, 36
52 44500 [main] git-update-index 1476 fhandler_console::write: at 114(r) state is 0
189 44689 [main] git-update-index 1476 fhandler_console::write: 36 = write_console (,..36)
160 44849 [main] git-update-index 1476 normalize_posix_path: src .git/index.lock
54 44903 [main] git-update-index 1476 cwdstuff::get: posix /d/download/git-mine
52 44955 [main] git-update-index 1476 cwdstuff::get: (/d/download/git-mine) = cwdstuff::get (0x22E730, 260, 1, 0), errno 2
54 45009 [main] git-update-index 1476 normalize_posix_path: /d/download/git-mine/.git/index.lock = normalize_posix_path (.git/index.lock)
54 45063 [main] git-update-index 1476 mount_info::conv_to_win32_path: conv_to_win32_path (/d/download/git-mine/.git/index.lock)
55 45118 [main] git-update-index 1476 set_flags: flags: binary (0x2)
53 45171 [main] git-update-index 1476 mount_info::conv_to_win32_path: src_path /d/download/git-mine/.git/index.lock, dst d:\download\git-mine\.git\index.lock, flags 0xA, rc 0
94 45265 [main] git-update-index 1476 symlink_info::check: not a symlink
54 45319 [main] git-update-index 1476 symlink_info::check: 0 = symlink.check (d:\download\git-mine\.git\index.lock, 0x22E3F0) (0xA)
55 45374 [main] git-update-index 1476 path_conv::check: this->path(d:\download\git-mine\.git\index.lock), has_acls(0)
54 45428 [main] git-update-index 1476 normalize_posix_path: src .git/index
52 45480 [main] git-update-index 1476 cwdstuff::get: posix /d/download/git-mine
53 45533 [main] git-update-index 1476 cwdstuff::get: (/d/download/git-mine) = cwdstuff::get (0x22E730, 260, 1, 0), errno 2
54 45587 [main] git-update-index 1476 normalize_posix_path: /d/download/git-mine/.git/index = normalize_posix_path (.git/index)
53 45640 [main] git-update-index 1476 mount_info::conv_to_win32_path: conv_to_win32_path (/d/download/git-mine/.git/index)
58 45698 [main] git-update-index 1476 set_flags: flags: binary (0x2)
53 45751 [main] git-update-index 1476 mount_info::conv_to_win32_path: src_path /d/download/git-mine/.git/index, dst d:\download\git-mine\.git\index, flags 0xA, rc 0
80 45831 [main] git-update-index 1476 symlink_info::check: not a symlink
54 45885 [main] git-update-index 1476 symlink_info::check: 0 = symlink.check (d:\download\git-mine\.git\index, 0x22E3F0) (0xA)
54 45939 [main] git-update-index 1476 path_conv::check: this->path(d:\download\git-mine\.git\index), has_acls(0)
275 46214 [main] git-update-index 1476 seterrno_from_win_error: /netrel/src/cygwin-1.5.18-1/winsup/cygwin/syscalls.cc:1262 windows error 5
60 46274 [main] git-update-index 1476 geterrno_from_win_error: windows error 5 == errno 13
53 46327 [main] git-update-index 1476 __set_errno: void seterrno_from_win_error(const char*, int, DWORD):307 val 13
54 46381 [main] git-update-index 1476 rename: -1 = rename (d:\download\git-mine\.git\index.lock, d:\download\git-mine\.git\index)
352 46733 [main] git-update-index 1476 fhandler_console::write: 22D140, 26
52 46785 [main] git-update-index 1476 fhandler_console::write: at 114(r) state is 0
142 46927 [main] git-update-index 1476 fhandler_console::write: 26 = write_console (,..26)
451 47378 [main] git-update-index 1476 fhandler_console::write: 22D280, 38
53 47431 [main] git-update-index 1476 fhandler_console::write: at 117(u) state is 0
83 47514 [main] git-update-index 1476 fhandler_console::write: 38 = write_console (,..38)
253 47767 [main] git-update-index 1476 fhandler_console::write: 409AEB, 7
53 47820 [main] git-update-index 1476 fhandler_console::write: at 102(f) state is 0
76 47896 [main] git-update-index 1476 fhandler_console::write: 7 = write_console (,..7)
448 48344 [main] git-update-index 1476 fhandler_console::write: 22D270, 29
52 48396 [main] git-update-index 1476 fhandler_console::write: at 85(U) state is 0
78 48474 [main] git-update-index 1476 fhandler_console::write: 29 = write_console (,..29)
359 48833 [main] git-update-index 1476 fhandler_console::write: 610E30E7, 1
53 48886 [main] git-update-index 1476 fhandler_console::write: at 10(0x20) state is 0
98 48984 [main] git-update-index 1476 fhandler_console::write: 1 = write_console (,..1)
448 49432 [main] git-update-index 1476 close: close (0)
68 49500 [main] git-update-index 1476 fhandler_console::close: decremented open_fhs, now 2
54 49554 [main] git-update-index 1476 close: 0 = close (0)
442 49996 [main] git-update-index 1476 close: close (1)
65 50061 [main] git-update-index 1476 fhandler_console::close: decremented open_fhs, now 1
53 50114 [main] git-update-index 1476 close: 0 = close (1)
441 50555 [main] git-update-index 1476 close: close (2)
66 50621 [main] git-update-index 1476 fhandler_console::close: decremented open_fhs, now 0
53 50674 [main] git-update-index 1476 close: 0 = close (2)
247 50921 [main] git-update-index 1476 do_exit: do_exit (32768), exit_state 0
54 50975 [main] git-update-index 1476 void: 0x0 = signal (20, 0x1)
52 51027 [main] git-update-index 1476 void: 0x0 = signal (1, 0x1)
53 51080 [main] git-update-index 1476 void: 0x402E20 = signal (2, 0x1)
53 51133 [main] git-update-index 1476 void: 0x0 = signal (3, 0x1)
53 51186 [main] git-update-index 1476 fhandler_base::close: closing '/d/download/git-mine/.git/index.lock' handle 0x320
69 51255 [main] git-update-index 1476 sigproc_terminate: entering
67 51322 [sig] git-update-index 1476 wait_sig: done
70 51392 [sig] git-update-index 1476 _cygtls::remove: wait 0x0
133 51525 [main] git-update-index 1476 proc_terminate: nprocs 0
52 51577 [main] git-update-index 1476 proc_terminate: leaving
101 51678 [main] git-update-index 1476 sigproc_terminate: sigproc handling not active
50 51728 [main] git-update-index 1476 proc_terminate: nprocs 0
58 51786 [main] git-update-index 1476 proc_terminate: leaving
55 51841 [main] git-update-index 1476 __to_clock_t: dwHighDateTime 0, dwLowDateTime 0
50 51891 [main] git-update-index 1476 __to_clock_t: total 00000000 00000000
51 51942 [main] git-update-index 1476 __to_clock_t: dwHighDateTime 0, dwLowDateTime 468750
50 51992 [main] git-update-index 1476 __to_clock_t: total 00000000 0000002E
540 52532 [main] git-update-index 1476 pinfo::maybe_set_exit_code_from_windows: pid 1476, exit value - old 0x80008000, windows 0xDEADBEEF, cygwin 0x80008000
^ permalink raw reply [flat|nested] 62+ messages in thread
* [PATCH] Fix symbolic ref validation
2005-10-05 13:58 ` Johannes Schindelin
@ 2005-10-05 15:52 ` Jonas Fonseca
2005-10-05 16:54 ` Junio C Hamano
0 siblings, 1 reply; 62+ messages in thread
From: Jonas Fonseca @ 2005-10-05 15:52 UTC (permalink / raw)
To: Junio C Hamano; +Cc: H. Peter Anvin, Johannes Schindelin, Git Mailing List
Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote Wed, Oct 05, 2005:
> Hi,
Hello,
> On Wed, 5 Oct 2005, Jonas Fonseca wrote:
>
> > user@machine /usr/local/dev/git/git
> > $ git-log
> > fatal: Not a git repository
> >
> > user@machine /usr/local/dev/git/git
> > $ GIT_DIR=.git git-log | wc -l
> > 26094
>
> That could have its cause in your .git/HEAD being no symlink. That happens
> when rsync´ing the .git directory.
Yes, used rsync when I cloned. Seems validate_symref() was buggy.
> The other errors could also stem from the fact that quite a few places
> expect HEAD to be a symlink.
git-reset still error out ...
---
Use the correct buffer when validating 'ref: refs/...'
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
---
diff --git a/refs.c b/refs.c
--- a/refs.c
+++ b/refs.c
@@ -46,7 +46,7 @@ int validate_symref(const char *path)
len -= 4;
while (len && isspace(*buf))
buf++, len--;
- if (len >= 5 && !memcmp("refs/", buffer, 5))
+ if (len >= 5 && !memcmp("refs/", buf, 5))
return 0;
return -1;
}
--
Jonas Fonseca
^ permalink raw reply [flat|nested] 62+ messages in thread
* Re: First cut at git port to Cygwin
2005-10-05 15:46 ` Alex Riesen
@ 2005-10-05 15:54 ` Christopher Faylor
2005-10-05 16:09 ` Davide Libenzi
2005-10-05 19:17 ` Alex Riesen
0 siblings, 2 replies; 62+ messages in thread
From: Christopher Faylor @ 2005-10-05 15:54 UTC (permalink / raw)
To: Git Mailing List
On Wed, Oct 05, 2005 at 05:46:08PM +0200, Alex Riesen wrote:
>On 10/5/05, Alex Riesen <raa.lkml@gmail.com> wrote:
>> On 10/4/05, H. Peter Anvin <hpa@zytor.com> wrote:
>> > > I noticed that rename(2) in my copy of cygwin (1.5.18-1) does not remove the
>> > > target and returns an error (probably EPERM, but I have reasons not to trust
>> > > strerror on that thing).
>> > > The repository was on FAT.
>> > > Taking "rename(2)" from cygwin's libiberty solved this (they unlink if link(2)
>> > > returns EEXIST).
>> > >
>> > > PS: Does broken rename(2) qualify a system "not worthy to support"?
>> >
>> > I just tried this with Cygwin 1.5.18-1 and didn't have any such
>> > problems. I tried it on NTFS, FAT and Samba, using WinXP.
>>
>> It's on Win2k, there was multiple cygwin installations in path, the other one
>> supposedly is 1.5.5 (it's from QNX Momentics installation).
>> I had that old "cygwin1.dll" renamed into "cygwin1.dll-disabled" long
>> ago, though...
>> I can't reproduce this out of GIT context, and the error is not
>> reproducable after
>> I removed the other cygwin installation out of PATH.
>> Anyway, sorry, I should have tried this before posting.
>
>Still does not work for me. I cannot isolate the problem out of git,
>but at the moment the only way for me to make commit_index_file to work
>is to put unlink(indexfile) before rename(cf->lockfile, indexfile).
>
>For everyone interested, I attach cygwin's strace output here.
I'm sorry that I missed this thread. I'm usually pretty alert to the word
"cygwin" showing up in a subject.
I'll go back and read the archives to catch up but, at the risk of
making an observation that has already been made, under windows you
can't always rename a file that is open. Is that what's happening here?
--
Christopher Faylor spammer? -> aaaspam@sourceware.org
Cygwin Co-Project Leader aaaspam@duffek.com
TimeSys, Inc.
^ permalink raw reply [flat|nested] 62+ messages in thread
* Re: First cut at git port to Cygwin
2005-10-05 15:54 ` Christopher Faylor
@ 2005-10-05 16:09 ` Davide Libenzi
2005-10-05 16:15 ` Christopher Faylor
2005-10-05 19:17 ` Alex Riesen
1 sibling, 1 reply; 62+ messages in thread
From: Davide Libenzi @ 2005-10-05 16:09 UTC (permalink / raw)
To: Git Mailing List
On 10/5/05, Alex Riesen <raa.lkml@gmail.com> wrote:
> Still does not work for me. I cannot isolate the problem out of git,
> but at the moment the only way for me to make commit_index_file to work
> is to put unlink(indexfile) before rename(cf->lockfile, indexfile).
I don't know how Cygwin implemented rename(), but if they used MoveFile()
they broke the POSIX rename() since MoveFile() fails if destination
already exists. They should have used MoveFileEx(MOVEFILE_REPLACE_EXISTING)
instead, to guarantee POSIX semantics. The symptoms you're experiencing
make me think this might be the case (even if it is strange, since other
Unix software would fail the same way).
- Davide
^ permalink raw reply [flat|nested] 62+ messages in thread
* Re: First cut at git port to Cygwin
2005-10-05 16:09 ` Davide Libenzi
@ 2005-10-05 16:15 ` Christopher Faylor
2005-10-05 16:23 ` H. Peter Anvin
2005-10-05 17:29 ` Davide Libenzi
0 siblings, 2 replies; 62+ messages in thread
From: Christopher Faylor @ 2005-10-05 16:15 UTC (permalink / raw)
To: Davide Libenzi, Git Mailing List
On Wed, Oct 05, 2005 at 09:09:49AM -0700, Davide Libenzi wrote:
>On 10/5/05, Alex Riesen <raa.lkml@gmail.com> wrote:
>>Still does not work for me. I cannot isolate the problem out of git,
>>but at the moment the only way for me to make commit_index_file to work
>>is to put unlink(indexfile) before rename(cf->lockfile, indexfile).
>
>I don't know how Cygwin implemented rename(), but if they used
>MoveFile() they broke the POSIX rename() since MoveFile() fails if
>destination already exists. They should have used
>MoveFileEx(MOVEFILE_REPLACE_EXISTING) instead, to guarantee POSIX
>semantics. The symptoms you're experiencing make me think this might
>be the case (even if it is strange, since other Unix software would
>fail the same way).
Cygwin's rename is much more than just a simple wrapper around MoveFile
or MoveFileEx. It tries hard to guarantee POSIX semantics within the
strictures imposed by Windows.
--
Christopher Faylor spammer? -> aaaspam@sourceware.org
Cygwin Co-Project Leader aaaspam@duffek.com
TimeSys, Inc.
^ permalink raw reply [flat|nested] 62+ messages in thread
* Re: First cut at git port to Cygwin
2005-10-05 16:15 ` Christopher Faylor
@ 2005-10-05 16:23 ` H. Peter Anvin
2005-10-05 16:28 ` Christopher Faylor
2005-10-05 17:29 ` Davide Libenzi
1 sibling, 1 reply; 62+ messages in thread
From: H. Peter Anvin @ 2005-10-05 16:23 UTC (permalink / raw)
To: Christopher Faylor; +Cc: Davide Libenzi, Git Mailing List
Christopher Faylor wrote:
> Cygwin's rename is much more than just a simple wrapper around MoveFile
> or MoveFileEx. It tries hard to guarantee POSIX semantics within the
> strictures imposed by Windows.
Certainly, but presumably different versions of Win32 have different
limitations, no?
-hpa
^ permalink raw reply [flat|nested] 62+ messages in thread
* Re: First cut at git port to Cygwin
2005-10-05 16:23 ` H. Peter Anvin
@ 2005-10-05 16:28 ` Christopher Faylor
0 siblings, 0 replies; 62+ messages in thread
From: Christopher Faylor @ 2005-10-05 16:28 UTC (permalink / raw)
To: Git Mailing List
On Wed, Oct 05, 2005 at 09:23:36AM -0700, H. Peter Anvin wrote:
>Christopher Faylor wrote:
>>Cygwin's rename is much more than just a simple wrapper around MoveFile
>>or MoveFileEx. It tries hard to guarantee POSIX semantics within the
>>strictures imposed by Windows.
>
>Certainly, but presumably different versions of Win32 have different
>limitations, no?
Yes, definitely. That's why the Cygwin rename code (and unlink code for
that matter) is so headache-inducing.
FWIW, I just looked at the source and, AFAICT, if rename() is setting
EPERM on Windows NT/2000/XP, it should be the result of a failing
MoveFileEx (old, new, MOVEFILE_REPLACE_EXISTING).
--
Christopher Faylor spammer? -> aaaspam@sourceware.org
Cygwin Co-Project Leader aaaspam@duffek.com
TimeSys, Inc.
^ permalink raw reply [flat|nested] 62+ messages in thread
* Re: [PATCH] Fix symbolic ref validation
2005-10-05 15:52 ` [PATCH] Fix symbolic ref validation Jonas Fonseca
@ 2005-10-05 16:54 ` Junio C Hamano
0 siblings, 0 replies; 62+ messages in thread
From: Junio C Hamano @ 2005-10-05 16:54 UTC (permalink / raw)
To: Jonas Fonseca; +Cc: git
Jonas Fonseca <fonseca@diku.dk> writes:
> Yes, used rsync when I cloned. Seems validate_symref() was buggy.
>
>> The other errors could also stem from the fact that quite a few places
>> expect HEAD to be a symlink.
>
> git-reset still error out ...
>
> ---
>
> Use the correct buffer when validating 'ref: refs/...'
>
> Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
>
> ---
> diff --git a/refs.c b/refs.c
Thanks.
One request, not just to Jonas. Please do not use '^---$' to
separate the introductory discussion and the real commit log
message.
Linus style (recently the kernel list had a thread on this as
well) is to have the commit log upfront with signoff, three-dash
line, optional discussion and diffstat, and then diff.
I do not mind seeing discussion upfront personally [*1*], but
the thing is the tool treats everything after the first '^---$'
something to be fed to patch, and does not treat it as the
commit log message.
[Footnote]
*1* ...but remember, Linus does.
^ permalink raw reply [flat|nested] 62+ messages in thread
* Re: First cut at git port to Cygwin
2005-10-05 16:15 ` Christopher Faylor
2005-10-05 16:23 ` H. Peter Anvin
@ 2005-10-05 17:29 ` Davide Libenzi
1 sibling, 0 replies; 62+ messages in thread
From: Davide Libenzi @ 2005-10-05 17:29 UTC (permalink / raw)
To: Christopher Faylor; +Cc: Git Mailing List
On Wed, 5 Oct 2005, Christopher Faylor wrote:
> On Wed, Oct 05, 2005 at 09:09:49AM -0700, Davide Libenzi wrote:
>> On 10/5/05, Alex Riesen <raa.lkml@gmail.com> wrote:
>>> Still does not work for me. I cannot isolate the problem out of git,
>>> but at the moment the only way for me to make commit_index_file to work
>>> is to put unlink(indexfile) before rename(cf->lockfile, indexfile).
>>
>> I don't know how Cygwin implemented rename(), but if they used
>> MoveFile() they broke the POSIX rename() since MoveFile() fails if
>> destination already exists. They should have used
>> MoveFileEx(MOVEFILE_REPLACE_EXISTING) instead, to guarantee POSIX
>> semantics. The symptoms you're experiencing make me think this might
>> be the case (even if it is strange, since other Unix software would
>> fail the same way).
>
> Cygwin's rename is much more than just a simple wrapper around MoveFile
> or MoveFileEx. It tries hard to guarantee POSIX semantics within the
> strictures imposed by Windows.
Ouch, IC:
http://cygwin.com/cgi-bin/cvsweb.cgi/~checkout~/src/winsup/cygwin/syscalls.cc?rev=1.390&content-type=text/plain&cvsroot=src
That's quite some code.
- Davide
^ permalink raw reply [flat|nested] 62+ messages in thread
* Re: First cut at git port to Cygwin
2005-10-05 15:54 ` Christopher Faylor
2005-10-05 16:09 ` Davide Libenzi
@ 2005-10-05 19:17 ` Alex Riesen
2005-10-05 20:29 ` Christopher Faylor
1 sibling, 1 reply; 62+ messages in thread
From: Alex Riesen @ 2005-10-05 19:17 UTC (permalink / raw)
To: Christopher Faylor; +Cc: Git Mailing List
Christopher Faylor, Wed, Oct 05, 2005 17:54:57 +0200:
> >Still does not work for me. I cannot isolate the problem out of git,
> >but at the moment the only way for me to make commit_index_file to work
> >is to put unlink(indexfile) before rename(cf->lockfile, indexfile).
> >
> >For everyone interested, I attach cygwin's strace output here.
>
> I'm sorry that I missed this thread. I'm usually pretty alert to the word
> "cygwin" showing up in a subject.
>
> I'll go back and read the archives to catch up but, at the risk of
> making an observation that has already been made, under windows you
> can't always rename a file that is open. Is that what's happening here?
>
Don't think so, but will check in about 10 hrs. The code in question
is in index.c, commit_index_file.
^ permalink raw reply [flat|nested] 62+ messages in thread
* Re: First cut at git port to Cygwin
2005-10-05 19:17 ` Alex Riesen
@ 2005-10-05 20:29 ` Christopher Faylor
2005-10-06 9:05 ` Alex Riesen
0 siblings, 1 reply; 62+ messages in thread
From: Christopher Faylor @ 2005-10-05 20:29 UTC (permalink / raw)
To: Git Mailing List
On Wed, Oct 05, 2005 at 09:17:41PM +0200, Alex Riesen wrote:
>Christopher Faylor, Wed, Oct 05, 2005 17:54:57 +0200:
>> >Still does not work for me. I cannot isolate the problem out of git,
>> >but at the moment the only way for me to make commit_index_file to work
>> >is to put unlink(indexfile) before rename(cf->lockfile, indexfile).
>> >
>> >For everyone interested, I attach cygwin's strace output here.
>>
>> I'm sorry that I missed this thread. I'm usually pretty alert to the word
>> "cygwin" showing up in a subject.
>>
>> I'll go back and read the archives to catch up but, at the risk of
>> making an observation that has already been made, under windows you
>> can't always rename a file that is open. Is that what's happening here?
>>
>
>Don't think so, but will check in about 10 hrs. The code in question
>is in index.c, commit_index_file.
Ok. Looks pretty simple. FWIW, I've just built git on windows and I
don't see this behavior. For the most part, it "just works".
I do see the gitk behavior but I'm tk illiterate too, unfortunately, so
I can't help there.
Cygwin's tcl/tk is a funny beast. It is primarily included (by me) to
allow for the operation of the insight debugger and is more windows than
POSIX. As was noted, it doesn't interact with Cygwin/X but just draws
windows using the Windows API.
So, tcl/tk are just barely supported in Cygwin currently. I'm actually
a little surprised that it works as well as it does with gitk.
--
Christopher Faylor spammer? -> aaaspam@sourceware.org
Cygwin Co-Project Leader aaaspam@duffek.com
TimeSys, Inc.
^ permalink raw reply [flat|nested] 62+ messages in thread
* Re: First cut at git port to Cygwin
2005-10-05 20:29 ` Christopher Faylor
@ 2005-10-06 9:05 ` Alex Riesen
2005-10-06 10:07 ` Alex Riesen
0 siblings, 1 reply; 62+ messages in thread
From: Alex Riesen @ 2005-10-06 9:05 UTC (permalink / raw)
To: Git Mailing List; +Cc: Christopher Faylor, Junio C Hamano, H. Peter Anvin
[-- Attachment #1: Type: text/plain, Size: 924 bytes --]
On 10/5/05, Christopher Faylor <me@cgf.cx> wrote:
> >Don't think so, but will check in about 10 hrs. The code in question
> >is in index.c, commit_index_file.
>
> Ok. Looks pretty simple. FWIW, I've just built git on windows and I
> don't see this behavior. For the most part, it "just works".
Thanks for the hint. There are open files involved (both index.lock and index).
I attach the patch which closes index.lock (this is not really needed, btw:
rename works even without closing index.lock) and unmaps the index
(a bit too intrusive). The patch fixes only update-index.c (the one I had
problems with), there probably are other places were the situation is alike.
I don't like the patch (and win32 at all; hence the offending comment),
so use it only unless there is no other possibility to workaround.
I specifically do not request its inclusion into official branch
(even though Junio is cc'ed).
[-- Attachment #2: unmap_active_cache.patch --]
[-- Type: application/xxxxx, Size: 1998 bytes --]
^ permalink raw reply [flat|nested] 62+ messages in thread
* Re: First cut at git port to Cygwin
2005-10-06 9:05 ` Alex Riesen
@ 2005-10-06 10:07 ` Alex Riesen
2005-10-07 12:44 ` Alex Riesen
0 siblings, 1 reply; 62+ messages in thread
From: Alex Riesen @ 2005-10-06 10:07 UTC (permalink / raw)
To: Git Mailing List; +Cc: Christopher Faylor, Junio C Hamano, H. Peter Anvin
[-- Attachment #1: Type: text/plain, Size: 399 bytes --]
On 10/6/05, Alex Riesen <raa.lkml@gmail.com> wrote:
> (a bit too intrusive). The patch fixes only update-index.c (the one I had
> problems with), there probably are other places were the situation is alike.
of course there are "other places". Please, try the attached patch instead.
For the record: the patch is supposed to help people with
"Unable to write new cachefile" kind of errors.
[-- Attachment #2: unmap_active_cache.patch --]
[-- Type: application/xxxxx, Size: 3608 bytes --]
^ permalink raw reply [flat|nested] 62+ messages in thread
* Re: First cut at git port to Cygwin
2005-10-06 10:07 ` Alex Riesen
@ 2005-10-07 12:44 ` Alex Riesen
2005-10-07 15:34 ` Linus Torvalds
0 siblings, 1 reply; 62+ messages in thread
From: Alex Riesen @ 2005-10-07 12:44 UTC (permalink / raw)
To: Git Mailing List; +Cc: Christopher Faylor, Junio C Hamano, H. Peter Anvin
On 10/6/05, Alex Riesen <raa.lkml@gmail.com> wrote:
> > (a bit too intrusive). The patch fixes only update-index.c (the one I had
> > problems with), there probably are other places were the situation is alike.
>
> of course there are "other places". Please, try the attached patch instead.
>
> For the record: the patch is supposed to help people with
> "Unable to write new cachefile" kind of errors.
Just as I thought the situation improved (by closing index.lock and
unmapping index),
it suddenly get worse: now I'm stuck on git-pull.
git-merge-index (called at some point by git-pull) maps the index in, and starts
git-merge-one-file for each (or the given) entry in the index.
git-merge-one-file
calls git-update-index, which wants to update the index. Which doesn't work,
because it's locked by that piece of s$%^.
The only working walkaround for me atm is unlinking indexfile before rename in
commit_index_file :(
^ permalink raw reply [flat|nested] 62+ messages in thread
* Re: First cut at git port to Cygwin
2005-10-07 12:44 ` Alex Riesen
@ 2005-10-07 15:34 ` Linus Torvalds
2005-10-07 20:54 ` Alex Riesen
0 siblings, 1 reply; 62+ messages in thread
From: Linus Torvalds @ 2005-10-07 15:34 UTC (permalink / raw)
To: Alex Riesen
Cc: Git Mailing List, Christopher Faylor, Junio C Hamano, H. Peter Anvin
On Fri, 7 Oct 2005, Alex Riesen wrote:
>
> it suddenly get worse: now I'm stuck on git-pull.
>
> git-merge-index (called at some point by git-pull) maps the index in, and starts
> git-merge-one-file for each (or the given) entry in the index.
> git-merge-one-file
> calls git-update-index, which wants to update the index. Which doesn't work,
> because it's locked by that piece of s$%^.
NOTE! git doesn't use mmap() because it _needs_ to use mmap(), but because
it was simple to do that way, and it's a total idiosyncracy of mine that I
often try to mmap the data. I often also tend to do my own allocators
instead of using malloc() (see my "sparse" project in case you're
interested in other idiosyncracies of mine - macros to do list traversal
etc).
The fact is, "mmap()" isn't really any better than "read()": it has some
advantages wrt memory management for the kernel, which is probably one big
reason why I do it, but quite frankly, if you were to change every single
mmap() to be a "map_file()" instead, and made it optional whether it used
mmap() or "malloc + read()", I personally don't think it would be
horrible.
And it might make things much simpler for portability. The "use mmap"
approach is very much a unixism, particularly the way unix people do it
(mmap followed by close, making the file descriptor "go away"). Sure,
other OS's have mmap too, but I think on them it tends to be less commonly
used.
Linus
^ permalink raw reply [flat|nested] 62+ messages in thread
* Re: First cut at git port to Cygwin
2005-10-07 15:34 ` Linus Torvalds
@ 2005-10-07 20:54 ` Alex Riesen
2005-10-07 21:22 ` Alex Riesen
[not found] ` <7vfyrdyre5.fsf@assigned-by-dhcp.cox.net>
0 siblings, 2 replies; 62+ messages in thread
From: Alex Riesen @ 2005-10-07 20:54 UTC (permalink / raw)
To: Git Mailing List
Cc: Linus Torvalds, Christopher Faylor, Junio C Hamano, H. Peter Anvin
Linus Torvalds, Fri, Oct 07, 2005 17:34:19 +0200:
> > it suddenly get worse: now I'm stuck on git-pull.
> >
> > git-merge-index (called at some point by git-pull) maps the index
> > in, and starts git-merge-one-file for each (or the given) entry in
> > the index. git-merge-one-file calls git-update-index, which wants
> > to update the index. Which doesn't work, because it's locked by
> > that piece of s$%^.
>
> NOTE! git doesn't use mmap() because it _needs_ to use mmap(), but because
> it was simple to do that way, and it's a total idiosyncracy of mine that I
> often try to mmap the data. I often also tend to do my own allocators
> instead of using malloc() (see my "sparse" project in case you're
> interested in other idiosyncracies of mine - macros to do list traversal
> etc).
>
> The fact is, "mmap()" isn't really any better than "read()": it has some
> advantages wrt memory management for the kernel, which is probably one big
> reason why I do it, but quite frankly, if you were to change every single
> mmap() to be a "map_file()" instead, and made it optional whether it used
> mmap() or "malloc + read()", I personally don't think it would be
> horrible.
>
> And it might make things much simpler for portability. The "use mmap"
> approach is very much a unixism, particularly the way unix people do it
> (mmap followed by close, making the file descriptor "go away"). Sure,
> other OS's have mmap too, but I think on them it tends to be less commonly
> used.
"Sounds like a thinly veiled threat or a very effective prodding" 8)
---
Make read_cache copy the index into memory, to improve portability on
other OS's which have mmap too, tend to use it less commonly.
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
diff --git a/read-cache.c b/read-cache.c
--- a/read-cache.c
+++ b/read-cache.c
@@ -497,9 +497,11 @@ int read_cache(void)
offset = sizeof(*hdr);
for (i = 0; i < active_nr; i++) {
struct cache_entry *ce = map + offset;
- offset = offset + ce_size(ce);
- active_cache[i] = ce;
+ size_t size = ce_size(ce);
+ offset = offset + size;
+ active_cache[i] = malloc(ce, size);
}
+ munmap(map, size);
return active_nr;
unmap:
^ permalink raw reply [flat|nested] 62+ messages in thread
* Re: First cut at git port to Cygwin
2005-10-07 20:54 ` Alex Riesen
@ 2005-10-07 21:22 ` Alex Riesen
2005-10-07 21:29 ` Chuck Lever
2005-10-09 20:40 ` Commit text BEFORE the dashes (Re: First cut at git port to Cygwin) Matthias Urlichs
[not found] ` <7vfyrdyre5.fsf@assigned-by-dhcp.cox.net>
1 sibling, 2 replies; 62+ messages in thread
From: Alex Riesen @ 2005-10-07 21:22 UTC (permalink / raw)
To: Git Mailing List
Cc: Junio C Hamano, Linus Torvalds, Christopher Faylor, H. Peter Anvin
Alex Riesen, Fri, Oct 07, 2005 22:54:50 +0200:
> Linus Torvalds, Fri, Oct 07, 2005 17:34:19 +0200:
> > > it suddenly get worse: now I'm stuck on git-pull.
> > >
> > > git-merge-index (called at some point by git-pull) maps the index
> > > in, and starts git-merge-one-file for each (or the given) entry in
> > > the index. git-merge-one-file calls git-update-index, which wants
> > > to update the index. Which doesn't work, because it's locked by
> > > that piece of s$%^.
> >
> > NOTE! git doesn't use mmap() because it _needs_ to use mmap(), but because
> > it was simple to do that way, and it's a total idiosyncracy of mine that I
> > often try to mmap the data. I often also tend to do my own allocators
> > instead of using malloc() (see my "sparse" project in case you're
> > interested in other idiosyncracies of mine - macros to do list traversal
> > etc).
> >
> > The fact is, "mmap()" isn't really any better than "read()": it has some
> > advantages wrt memory management for the kernel, which is probably one big
> > reason why I do it, but quite frankly, if you were to change every single
> > mmap() to be a "map_file()" instead, and made it optional whether it used
> > mmap() or "malloc + read()", I personally don't think it would be
> > horrible.
> >
> > And it might make things much simpler for portability. The "use mmap"
> > approach is very much a unixism, particularly the way unix people do it
> > (mmap followed by close, making the file descriptor "go away"). Sure,
> > other OS's have mmap too, but I think on them it tends to be less commonly
> > used.
>
> "Sounds like a thinly veiled threat or a very effective prodding" 8)
>
Junio C Hamano, Fri, Oct 07, 2005 23:00:02 +0200:
> Huh? where is your memcpy?
Unbelievable... I actually tested the change! But not _the_ patch.
Thanks. Next time, hit me :)
---
Make read_cache copy the index into memory, to improve portability on
other OS's which have mmap too, tend to use it less commonly.
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
diff --git a/read-cache.c b/read-cache.c
--- a/read-cache.c
+++ b/read-cache.c
@@ -497,9 +497,12 @@ int read_cache(void)
offset = sizeof(*hdr);
for (i = 0; i < active_nr; i++) {
struct cache_entry *ce = map + offset;
- offset = offset + ce_size(ce);
- active_cache[i] = ce;
+ size_t size = ce_size(ce);
+ struct cache_entry *newce = malloc(size);
+ offset = offset + size;
+ active_cache[i] = memcpy(newce, ce, size);
}
+ munmap(map, size);
return active_nr;
unmap:
^ permalink raw reply [flat|nested] 62+ messages in thread
* Re: First cut at git port to Cygwin
2005-10-07 21:22 ` Alex Riesen
@ 2005-10-07 21:29 ` Chuck Lever
2005-10-07 21:39 ` Alex Riesen
2005-10-09 20:40 ` Commit text BEFORE the dashes (Re: First cut at git port to Cygwin) Matthias Urlichs
1 sibling, 1 reply; 62+ messages in thread
From: Chuck Lever @ 2005-10-07 21:29 UTC (permalink / raw)
To: Alex Riesen
Cc: Git Mailing List, Junio C Hamano, Linus Torvalds,
Christopher Faylor, H. Peter Anvin
[-- Attachment #1: Type: text/plain, Size: 752 bytes --]
Alex Riesen wrote:
> Make read_cache copy the index into memory, to improve portability on
> other OS's which have mmap too, tend to use it less commonly.
>
> Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
>
> diff --git a/read-cache.c b/read-cache.c
> --- a/read-cache.c
> +++ b/read-cache.c
> @@ -497,9 +497,12 @@ int read_cache(void)
> offset = sizeof(*hdr);
> for (i = 0; i < active_nr; i++) {
> struct cache_entry *ce = map + offset;
> - offset = offset + ce_size(ce);
> - active_cache[i] = ce;
> + size_t size = ce_size(ce);
> + struct cache_entry *newce = malloc(size);
> + offset = offset + size;
> + active_cache[i] = memcpy(newce, ce, size);
> }
> + munmap(map, size);
> return active_nr;
>
> unmap:
s/malloc/xmalloc/
[-- Attachment #2: cel.vcf --]
[-- Type: text/x-vcard, Size: 439 bytes --]
begin:vcard
fn:Chuck Lever
n:Lever;Charles
org:Network Appliance, Incorporated;Linux NFS Client Development
adr:535 West William Street, Suite 3100;;Center for Information Technology Integration;Ann Arbor;MI;48103-4943;USA
email;internet:cel@citi.umich.edu
title:Member of Technical Staff
tel;work:+1 734 763 4415
tel;fax:+1 734 763 4434
tel;home:+1 734 668 1089
x-mozilla-html:FALSE
url:http://www.monkey.org/~cel/
version:2.1
end:vcard
^ permalink raw reply [flat|nested] 62+ messages in thread
* Re: First cut at git port to Cygwin
2005-10-07 21:29 ` Chuck Lever
@ 2005-10-07 21:39 ` Alex Riesen
2005-10-08 16:11 ` Linus Torvalds
0 siblings, 1 reply; 62+ messages in thread
From: Alex Riesen @ 2005-10-07 21:39 UTC (permalink / raw)
To: Chuck Lever
Cc: Git Mailing List, Junio C Hamano, Linus Torvalds,
Christopher Faylor, H. Peter Anvin
Chuck Lever, Fri, Oct 07, 2005 23:29:16 +0200:
> s/malloc/xmalloc/
It's not that funny after second repost...
---
Make read_cache copy the index into memory, to improve portability on
other OS's which have mmap too, tend to use it less commonly.
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
diff --git a/read-cache.c b/read-cache.c
--- a/read-cache.c
+++ b/read-cache.c
@@ -497,9 +497,12 @@ int read_cache(void)
offset = sizeof(*hdr);
for (i = 0; i < active_nr; i++) {
struct cache_entry *ce = map + offset;
- offset = offset + ce_size(ce);
- active_cache[i] = ce;
+ size_t size = ce_size(ce);
+ struct cache_entry *newce = xmalloc(size);
+ offset = offset + size;
+ active_cache[i] = memcpy(newce, ce, size);
}
+ munmap(map, size);
return active_nr;
unmap:
^ permalink raw reply [flat|nested] 62+ messages in thread
* Re: First cut at git port to Cygwin
[not found] ` <7vfyrdyre5.fsf@assigned-by-dhcp.cox.net>
@ 2005-10-07 23:45 ` Alex Riesen
2005-10-08 1:00 ` Elfyn McBratney
0 siblings, 1 reply; 62+ messages in thread
From: Alex Riesen @ 2005-10-07 23:45 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
Junio C Hamano, Fri, Oct 07, 2005 23:00:02 +0200:
> > "Sounds like a thinly veiled threat or a very effective prodding" 8)
> > ---
> >
> > Make read_cache copy the index into memory, to improve portability on
> > other OS's which have mmap too, tend to use it less commonly.
> >
>
> Huh? where is your memcpy?
>
Junio, unless there already are pressing reasons to put the patch in
GIT, could you postpone its inclusion (if you ever considered)? Or at
least put "#ifdef __cygwin" (I hope this is the define) around it?
It just so ugly... And besides, GIT reportedly works without problems
for many people even without it.
Anyway, the patch is out, so anyone with the problems can just patch
their copy to workaround this specific win2k problem.
Thanks,
Alex
^ permalink raw reply [flat|nested] 62+ messages in thread
* Re: First cut at git port to Cygwin
2005-10-07 23:45 ` First cut at git port to Cygwin Alex Riesen
@ 2005-10-08 1:00 ` Elfyn McBratney
2005-10-10 18:45 ` H. Peter Anvin
0 siblings, 1 reply; 62+ messages in thread
From: Elfyn McBratney @ 2005-10-08 1:00 UTC (permalink / raw)
To: Alex Riesen; +Cc: Junio C Hamano, git
[-- Attachment #1: Type: text/plain, Size: 1011 bytes --]
On Sat, Oct 08, 2005 at 01:45:47AM +0200, Alex Riesen wrote:
> Junio C Hamano, Fri, Oct 07, 2005 23:00:02 +0200:
> > > "Sounds like a thinly veiled threat or a very effective prodding" 8)
> > > ---
> > >
> > > Make read_cache copy the index into memory, to improve portability on
> > > other OS's which have mmap too, tend to use it less commonly.
> > >
> >
> > Huh? where is your memcpy?
> >
>
> Junio, unless there already are pressing reasons to put the patch in
> GIT, could you postpone its inclusion (if you ever considered)? Or at
> least put "#ifdef __cygwin" (I hope this is the define) around it?
Close ;) - the define is "__CYGWIN__".
Best,
Elfyn
--
Elfyn McBratney
Gentoo Developer/Perl Team Lead
beu/irc.freenode.net http://dev.gentoo.org/~beu/
+------------O.o--------------------- http://dev.gentoo.org/~beu/pubkey.asc
PGP Key ID: 0x69DF17AD
PGP Key Fingerprint:
DBD3 B756 ED58 B1B4 47B9 B3BD 8D41 E597 69DF 17AD
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 62+ messages in thread
* Re: First cut at git port to Cygwin
2005-10-07 21:39 ` Alex Riesen
@ 2005-10-08 16:11 ` Linus Torvalds
2005-10-08 17:38 ` Elfyn McBratney
` (2 more replies)
0 siblings, 3 replies; 62+ messages in thread
From: Linus Torvalds @ 2005-10-08 16:11 UTC (permalink / raw)
To: Alex Riesen
Cc: Chuck Lever, Git Mailing List, Junio C Hamano,
Christopher Faylor, H. Peter Anvin
On Fri, 7 Oct 2005, Alex Riesen wrote:
>
> Make read_cache copy the index into memory, to improve portability on
> other OS's which have mmap too, tend to use it less commonly.
I really think that you should just get rid of the mmap.
As it is, you're just slowing the code down on sane architectures. That's
not good.
So I'd suggest something like this instead.
Totally untested, of course.
Linus
----
diff --git a/read-cache.c b/read-cache.c
--- a/read-cache.c
+++ b/read-cache.c
@@ -454,13 +454,39 @@ static int verify_hdr(struct cache_heade
return 0;
}
+static void *map_index_file(int fd, size_t size)
+{
+ void *map;
+#ifdef NO_MMAP
+ map = malloc(size);
+ if (!map)
+ die("Unable to allocate index file mapping");
+ if (read(fd, map, size) != size)
+ die("Unable to read %z bytes from inde
+#else
+ map = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0);
+ if (map == MAP_FAILED)
+ die("index file mmap failed (%s)", strerror(errno));
+#endif
+ return map;
+}
+
+static void unmap_index_file(void *map, size_t size)
+{
+#ifdef NO_MMAP
+ free(map);
+#else
+ munmap(map, size);
+#endif
+}
+
int read_cache(void)
{
int fd, i;
struct stat st;
unsigned long size, offset;
- void *map;
struct cache_header *hdr;
+ void *map;
errno = EBUSY;
if (active_cache)
@@ -475,16 +501,15 @@ int read_cache(void)
}
size = 0; // avoid gcc warning
- map = MAP_FAILED;
- if (!fstat(fd, &st)) {
- size = st.st_size;
- errno = EINVAL;
- if (size >= sizeof(struct cache_header) + 20)
- map = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0);
- }
+ if (fstat(fd, &st))
+ die("unable to fstat index file");
+
+ size = st.st_size;
+ errno = EINVAL;
+ if (size < sizeof(struct cache_header) + 20)
+ goto corrupt;
+ map = map_index_file(fd, size);
close(fd);
- if (map == MAP_FAILED)
- die("index file mmap failed (%s)", strerror(errno));
hdr = map;
if (verify_hdr(hdr, size) < 0)
@@ -503,8 +528,9 @@ int read_cache(void)
return active_nr;
unmap:
- munmap(map, size);
+ unmap_index_file(map, size);
errno = EINVAL;
+corrupt:
die("index file corrupt");
}
^ permalink raw reply [flat|nested] 62+ messages in thread
* Re: First cut at git port to Cygwin
2005-10-08 16:11 ` Linus Torvalds
@ 2005-10-08 17:38 ` Elfyn McBratney
2005-10-08 17:43 ` Elfyn McBratney
2005-10-08 18:27 ` Johannes Schindelin
2 siblings, 0 replies; 62+ messages in thread
From: Elfyn McBratney @ 2005-10-08 17:38 UTC (permalink / raw)
To: Git Mailing List
Cc: Linus Torvalds, Alex Riesen, Chuck Lever, Git Mailing List,
Junio C Hamano, Christopher Faylor, H. Peter Anvin
[-- Attachment #1: Type: text/plain, Size: 2779 bytes --]
On Sat, Oct 08, 2005 at 09:11:03AM -0700, Linus Torvalds wrote:
>
> On Fri, 7 Oct 2005, Alex Riesen wrote:
> >
> > Make read_cache copy the index into memory, to improve portability on
> > other OS's which have mmap too, tend to use it less commonly.
>
> I really think that you should just get rid of the mmap.
>
> As it is, you're just slowing the code down on sane architectures. That's
> not good.
>
> So I'd suggest something like this instead.
>
> Totally untested, of course.
>
> Linus
Slightly adjusted diff below so it compiles ;) (Note: only the second
die() un hunk #1 was changed.)
Best,
Elfyn
----
diff --git a/read-cache.c b/read-cache.c
--- a/read-cache.c
+++ b/read-cache.c
@@ -454,13 +454,39 @@ static int verify_hdr(struct cache_heade
return 0;
}
+static void *map_index_file(int fd, size_t size)
+{
+ void *map;
+#ifdef NO_MMAP
+ map = malloc(size);
+ if (!map)
+ die("Unable to allocate index file mapping");
+ if (read(fd, map, size) != size)
+ die("Unable to read %z bytes from index", size);
+#else
+ map = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0);
+ if (map == MAP_FAILED)
+ die("index file mmap failed (%s)", strerror(errno));
+#endif
+ return map;
+}
+
+static void unmap_index_file(void *map, size_t size)
+{
+#ifdef NO_MMAP
+ free(map);
+#else
+ munmap(map, size);
+#endif
+}
+
int read_cache(void)
{
int fd, i;
struct stat st;
unsigned long size, offset;
- void *map;
struct cache_header *hdr;
+ void *map;
errno = EBUSY;
if (active_cache)
@@ -475,16 +501,15 @@ int read_cache(void)
}
size = 0; // avoid gcc warning
- map = MAP_FAILED;
- if (!fstat(fd, &st)) {
- size = st.st_size;
- errno = EINVAL;
- if (size >= sizeof(struct cache_header) + 20)
- map = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0);
- }
+ if (fstat(fd, &st))
+ die("unable to fstat index file");
+
+ size = st.st_size;
+ errno = EINVAL;
+ if (size < sizeof(struct cache_header) + 20)
+ goto corrupt;
+ map = map_index_file(fd, size);
close(fd);
- if (map == MAP_FAILED)
- die("index file mmap failed (%s)", strerror(errno));
hdr = map;
if (verify_hdr(hdr, size) < 0)
@@ -503,8 +528,9 @@ int read_cache(void)
return active_nr;
unmap:
- munmap(map, size);
+ unmap_index_file(map, size);
errno = EINVAL;
+corrupt:
die("index file corrupt");
}
--
Elfyn McBratney
Gentoo Developer/Perl Team Lead
beu/irc.freenode.net http://dev.gentoo.org/~beu/
+------------O.o--------------------- http://dev.gentoo.org/~beu/pubkey.asc
PGP Key ID: 0x69DF17AD
PGP Key Fingerprint:
DBD3 B756 ED58 B1B4 47B9 B3BD 8D41 E597 69DF 17AD
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 62+ messages in thread
* Re: First cut at git port to Cygwin
2005-10-08 16:11 ` Linus Torvalds
2005-10-08 17:38 ` Elfyn McBratney
@ 2005-10-08 17:43 ` Elfyn McBratney
2005-10-08 18:27 ` Johannes Schindelin
2 siblings, 0 replies; 62+ messages in thread
From: Elfyn McBratney @ 2005-10-08 17:43 UTC (permalink / raw)
To: Git Mailing List
[-- Attachment #1: Type: text/plain, Size: 424 bytes --]
Er, apologies for the dups - postfix crapped itself :/
*goes and stands in the corner donning the 'D' hat*
--
Elfyn McBratney
Gentoo Developer/Perl Team Lead
beu/irc.freenode.net http://dev.gentoo.org/~beu/
+------------O.o--------------------- http://dev.gentoo.org/~beu/pubkey.asc
PGP Key ID: 0x69DF17AD
PGP Key Fingerprint:
DBD3 B756 ED58 B1B4 47B9 B3BD 8D41 E597 69DF 17AD
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 62+ messages in thread
* Re: First cut at git port to Cygwin
2005-10-08 16:11 ` Linus Torvalds
2005-10-08 17:38 ` Elfyn McBratney
2005-10-08 17:43 ` Elfyn McBratney
@ 2005-10-08 18:27 ` Johannes Schindelin
2005-10-08 18:44 ` Junio C Hamano
2005-10-08 18:49 ` Alex Riesen
2 siblings, 2 replies; 62+ messages in thread
From: Johannes Schindelin @ 2005-10-08 18:27 UTC (permalink / raw)
To: Linus Torvalds
Cc: Alex Riesen, Chuck Lever, Git Mailing List, Junio C Hamano,
Christopher Faylor, H. Peter Anvin
Hi,
On Sat, 8 Oct 2005, Linus Torvalds wrote:
> I really think that you should just get rid of the mmap.
>
> As it is, you're just slowing the code down on sane architectures. That's
> not good.
>
> So I'd suggest something like this instead.
>
> Totally untested, of course.
Am I missing something? I don't see where the changes are written back to
the fd. After all, mmap() is called with PROT_WRITE...
*shameless plug* Of course, this problem does not come up with my NO_MMAP
patch.
Ciao,
Dscho
^ permalink raw reply [flat|nested] 62+ messages in thread
* Re: First cut at git port to Cygwin
2005-10-08 18:27 ` Johannes Schindelin
@ 2005-10-08 18:44 ` Junio C Hamano
2005-10-08 19:04 ` Johannes Schindelin
2005-10-10 18:43 ` H. Peter Anvin
2005-10-08 18:49 ` Alex Riesen
1 sibling, 2 replies; 62+ messages in thread
From: Junio C Hamano @ 2005-10-08 18:44 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: git, Linus Torvalds
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> Am I missing something? I don't see where the changes are written back to
> the fd. After all, mmap() is called with PROT_WRITE...
PROT_WRITE is true, but we do MAP_PRIVATE, and if I recall
correctly we do not write file via mmap -- at least we do not
intend to.
- index file is mapped for reading, long ago it was mapped
read-only but these days we do PROT_WRITE, but updates are
done via opening a new file and writing afresh.
- objects are mapped for reading, but, never updated once
created. Creation side is regular open - write - close.
- diff reads original by mapping, but obviously has no business
writing.
- local-fetch reads original by mapping for copying.
> *shameless plug* Of course, this problem does not come up with
> my NO_MMAP patch.
Yes. It might have been overkill that you supported writing
changes back, though.
.
^ permalink raw reply [flat|nested] 62+ messages in thread
* Re: First cut at git port to Cygwin
2005-10-08 18:27 ` Johannes Schindelin
2005-10-08 18:44 ` Junio C Hamano
@ 2005-10-08 18:49 ` Alex Riesen
1 sibling, 0 replies; 62+ messages in thread
From: Alex Riesen @ 2005-10-08 18:49 UTC (permalink / raw)
To: Johannes Schindelin
Cc: Linus Torvalds, Chuck Lever, Git Mailing List, Junio C Hamano,
Christopher Faylor, H. Peter Anvin
Johannes Schindelin, Sat, Oct 08, 2005 20:27:06 +0200:
> > I really think that you should just get rid of the mmap.
> >
> > As it is, you're just slowing the code down on sane architectures. That's
> > not good.
> >
> > So I'd suggest something like this instead.
> >
> > Totally untested, of course.
>
> Am I missing something? I don't see where the changes are written back to
> the fd. After all, mmap() is called with PROT_WRITE...
It's just becase the file is open for reading only.
Also, it is not an mmap/unmap implementation. Just reading cache in.
^ permalink raw reply [flat|nested] 62+ messages in thread
* Re: First cut at git port to Cygwin
2005-10-08 18:44 ` Junio C Hamano
@ 2005-10-08 19:04 ` Johannes Schindelin
2005-10-08 21:10 ` Junio C Hamano
2005-10-10 18:43 ` H. Peter Anvin
1 sibling, 1 reply; 62+ messages in thread
From: Johannes Schindelin @ 2005-10-08 19:04 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git, Linus Torvalds
Hi,
On Sat, 8 Oct 2005, Junio C Hamano wrote:
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
>
> > Am I missing something? I don't see where the changes are written back to
> > the fd. After all, mmap() is called with PROT_WRITE...
>
> PROT_WRITE is true, but we do MAP_PRIVATE, and if I recall
> correctly we do not write file via mmap -- at least we do not
> intend to.
Ahh! Reading the man page helps!
> Yes. It might have been overkill that you supported writing
> changes back, though.
Sure. Something like this?
diff --git a/compat/mmap.c b/compat/mmap.c
index fca6321..fda39fc 100644
--- a/compat/mmap.c
+++ b/compat/mmap.c
@@ -49,7 +49,7 @@ void *gitfakemmap(void *start, size_t le
n += count;
}
- if(prot & PROT_WRITE) {
+ if((prot & PROT_WRITE) && !(flags & MAP_PRIVATE)) {
fakemmapwritable *next = xmalloc(sizeof(fakemmapwritable));
next->start = start;
next->length = length;
^ permalink raw reply related [flat|nested] 62+ messages in thread
* Re: First cut at git port to Cygwin
2005-10-08 19:04 ` Johannes Schindelin
@ 2005-10-08 21:10 ` Junio C Hamano
2005-10-08 22:06 ` Johannes Schindelin
0 siblings, 1 reply; 62+ messages in thread
From: Junio C Hamano @ 2005-10-08 21:10 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: git, Linus Torvalds
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
>> PROT_WRITE is true, but we do MAP_PRIVATE, and if I recall
>> correctly we do not write file via mmap -- at least we do not
>> intend to.
>
> Ahh! Reading the man page helps!
>
>> Yes. It might have been overkill that you supported writing
>> changes back, though.
>
> Sure. Something like this?
Not, really. What I meant was to rip out the writing out
altogether, and perhaps making sure that the caller never calls
us without MAP_PRIVATE.
^ permalink raw reply [flat|nested] 62+ messages in thread
* Re: First cut at git port to Cygwin
2005-10-08 21:10 ` Junio C Hamano
@ 2005-10-08 22:06 ` Johannes Schindelin
0 siblings, 0 replies; 62+ messages in thread
From: Johannes Schindelin @ 2005-10-08 22:06 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git, Linus Torvalds
Hi,
On Sat, 8 Oct 2005, Junio C Hamano wrote:
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
>
> > Sure. Something like this?
>
> Not, really. What I meant was to rip out the writing out
> altogether, and perhaps making sure that the caller never calls
> us without MAP_PRIVATE.
How about this, then?
[PATCH] If NO_MMAP is defined, fake mmap() and munmap()
Since some platforms do not support mmap() at all, and others do only just so,
this patch introduces the option to fake mmap() and munmap() by malloc()ing the
region explicitely.
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
---
Makefile | 6 ++++++
cache.h | 16 ++++++++++++++++
compat/mmap.c | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++
mailsplit.c | 1 -
4 files changed, 73 insertions(+), 1 deletions(-)
create mode 100644 compat/mmap.c
applies-to: 274542bcbc891cca353c2728ac4075df3d1d2c0d
ed334e3e2276fe9d41ed78917544ef6a3fa87eb7
diff --git a/Makefile b/Makefile
index 1bdf4de..7ca77cf 100644
--- a/Makefile
+++ b/Makefile
@@ -27,6 +27,8 @@
# Define NEEDS_SOCKET if linking with libc is not enough (SunOS,
# Patrick Mauritz).
#
+# Define NO_MMAP if you want to avoid mmap.
+#
# Define WITH_OWN_SUBPROCESS_PY if you want to use with python 2.3.
#
# Define NO_IPV6 if you lack IPv6 support and getaddrinfo().
@@ -258,6 +260,10 @@ ifdef NO_STRCASESTR
DEFINES += -Dstrcasestr=gitstrcasestr
LIB_OBJS += compat/strcasestr.o
endif
+ifdef NO_MMAP
+ DEFINES += -Dmmap=gitfakemmap -Dmunmap=gitfakemunmap -DNO_MMAP
+ LIB_OBJS += compat/mmap.o
+endif
ifdef NO_IPV6
DEFINES += -DNO_IPV6 -Dsockaddr_storage=sockaddr_in
endif
diff --git a/cache.h b/cache.h
index 514adb8..5987d4c 100644
--- a/cache.h
+++ b/cache.h
@@ -11,7 +11,9 @@
#include <string.h>
#include <errno.h>
#include <limits.h>
+#ifndef NO_MMAP
#include <sys/mman.h>
+#endif
#include <sys/param.h>
#include <netinet/in.h>
#include <sys/types.h>
@@ -356,4 +358,18 @@ extern void packed_object_info_detail(st
/* Dumb servers support */
extern int update_server_info(int);
+#ifdef NO_MMAP
+
+#ifndef PROT_READ
+#define PROT_READ 1
+#define PROT_WRITE 2
+#define MAP_PRIVATE 1
+#define MAP_FAILED ((void*)-1)
+#endif
+
+extern void *gitfakemmap(void *start, size_t length, int prot , int flags, int fd, off_t offset);
+extern int gitfakemunmap(void *start, size_t length);
+
+#endif
+
#endif /* CACHE_H */
diff --git a/compat/mmap.c b/compat/mmap.c
new file mode 100644
index 0000000..3f035a0
--- /dev/null
+++ b/compat/mmap.c
@@ -0,0 +1,51 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <errno.h>
+#include "../cache.h"
+
+void *gitfakemmap(void *start, size_t length, int prot , int flags, int fd, off_t offset)
+{
+ int n = 0;
+
+ if(start != NULL || !(flags & MAP_PRIVATE))
+ die("Invalid usage of gitfakemmap.");
+
+ if(lseek(fd, offset, SEEK_SET)<0) {
+ errno = EINVAL;
+ return MAP_FAILED;
+ }
+
+ start = xmalloc(length);
+ if(start == NULL) {
+ errno = ENOMEM;
+ return MAP_FAILED;
+ }
+
+ while(n < length) {
+ int count = read(fd, start+n, length-n);
+
+ if(count == 0) {
+ memset(start+n, 0, length-n);
+ break;
+ }
+
+ if(count < 0) {
+ free(start);
+ errno = EACCES;
+ return MAP_FAILED;
+ }
+
+ n += count;
+ }
+
+ return start;
+}
+
+int gitfakemunmap(void *start, size_t length)
+{
+ free(start);
+
+ return 0;
+}
+
diff --git a/mailsplit.c b/mailsplit.c
index 7981f87..0f8100d 100644
--- a/mailsplit.c
+++ b/mailsplit.c
@@ -9,7 +9,6 @@
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
-#include <sys/mman.h>
#include <string.h>
#include <stdio.h>
#include <ctype.h>
---
0.99.8.GIT
^ permalink raw reply related [flat|nested] 62+ messages in thread
* Commit text BEFORE the dashes (Re: First cut at git port to Cygwin)
2005-10-07 21:22 ` Alex Riesen
2005-10-07 21:29 ` Chuck Lever
@ 2005-10-09 20:40 ` Matthias Urlichs
1 sibling, 0 replies; 62+ messages in thread
From: Matthias Urlichs @ 2005-10-09 20:40 UTC (permalink / raw)
To: git
Hi, Alex Riesen wrote:
> [ some text ]
> ---
> [ the actual commit text ]
REMINDER: These need to be swapped.
--
Matthias Urlichs | {M:U} IT Design @ m-u-it.de | smurf@smurf.noris.de
^ permalink raw reply [flat|nested] 62+ messages in thread
* Re: First cut at git port to Cygwin
2005-10-08 18:44 ` Junio C Hamano
2005-10-08 19:04 ` Johannes Schindelin
@ 2005-10-10 18:43 ` H. Peter Anvin
2005-10-10 19:01 ` Johannes Schindelin
1 sibling, 1 reply; 62+ messages in thread
From: H. Peter Anvin @ 2005-10-10 18:43 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Johannes Schindelin, git, Linus Torvalds
Junio C Hamano wrote:
>
> PROT_WRITE is true, but we do MAP_PRIVATE, and if I recall
> correctly we do not write file via mmap -- at least we do not
> intend to.
>
Then PROT_READ probably makes more sense?
>
> Yes. It might have been overkill that you supported writing
> changes back, though.
Not just overkill; if we do MAP_PRIVATE it's actively WRONG.
-hpa
^ permalink raw reply [flat|nested] 62+ messages in thread
* Re: First cut at git port to Cygwin
2005-10-08 1:00 ` Elfyn McBratney
@ 2005-10-10 18:45 ` H. Peter Anvin
0 siblings, 0 replies; 62+ messages in thread
From: H. Peter Anvin @ 2005-10-10 18:45 UTC (permalink / raw)
To: Elfyn McBratney; +Cc: Alex Riesen, Junio C Hamano, git
Elfyn McBratney wrote:
> >
> > Junio, unless there already are pressing reasons to put the patch in
> > GIT, could you postpone its inclusion (if you ever considered)? Or at
> > least put "#ifdef __cygwin" (I hope this is the define) around it?
>
> Close ;) - the define is "__CYGWIN__".
>
This should be a feature-control macro in the Makefile.
^ permalink raw reply [flat|nested] 62+ messages in thread
* Re: First cut at git port to Cygwin
2005-10-10 18:43 ` H. Peter Anvin
@ 2005-10-10 19:01 ` Johannes Schindelin
2005-10-10 19:26 ` H. Peter Anvin
2005-10-10 20:27 ` Daniel Barkalow
0 siblings, 2 replies; 62+ messages in thread
From: Johannes Schindelin @ 2005-10-10 19:01 UTC (permalink / raw)
To: H. Peter Anvin; +Cc: Junio C Hamano, git, Linus Torvalds
Hi,
On Mon, 10 Oct 2005, H. Peter Anvin wrote:
> Junio C Hamano wrote:
> >
> > PROT_WRITE is true, but we do MAP_PRIVATE, and if I recall
> > correctly we do not write file via mmap -- at least we do not
> > intend to.
> >
>
> Then PROT_READ probably makes more sense?
Not necessarily. Sometimes you need to annotate the data from the index,
and this does not need to be written back to the index file.
> > Yes. It might have been overkill that you supported writing
> > changes back, though.
>
> Not just overkill; if we do MAP_PRIVATE it's actively WRONG.
See above.
BTW, is there a mechanism to make sure that the index file is locked
between reading and writing?
Ciao,
Dscho
^ permalink raw reply [flat|nested] 62+ messages in thread
* Re: First cut at git port to Cygwin
2005-10-10 19:01 ` Johannes Schindelin
@ 2005-10-10 19:26 ` H. Peter Anvin
2005-10-10 19:42 ` Johannes Schindelin
` (2 more replies)
2005-10-10 20:27 ` Daniel Barkalow
1 sibling, 3 replies; 62+ messages in thread
From: H. Peter Anvin @ 2005-10-10 19:26 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: Junio C Hamano, git, Linus Torvalds
Johannes Schindelin wrote:
>
>>Junio C Hamano wrote:
>>
>>>PROT_WRITE is true, but we do MAP_PRIVATE, and if I recall
>>>correctly we do not write file via mmap -- at least we do not
>>>intend to.
>>>
>>
>>Then PROT_READ probably makes more sense?
>
> Not necessarily. Sometimes you need to annotate the data from the index,
> and this does not need to be written back to the index file.
>
In the above sentence, emphasis on "at least we do not intend to." If
writes are done legitimately then that's fine, but we shouldn't have
"accidental writes" -- those would be program bugs!
>
>>>Yes. It might have been overkill that you supported writing
>>>changes back, though.
>>
>>Not just overkill; if we do MAP_PRIVATE it's actively WRONG.
>
> See above.
>
Eh? If we MAP_PRIVATE, *and* we (intentionally) write to it, we
*BETTER* not write anything back.
-hpa
^ permalink raw reply [flat|nested] 62+ messages in thread
* Re: First cut at git port to Cygwin
2005-10-10 19:26 ` H. Peter Anvin
@ 2005-10-10 19:42 ` Johannes Schindelin
2005-10-10 20:21 ` Junio C Hamano
2005-10-10 20:34 ` Junio C Hamano
2 siblings, 0 replies; 62+ messages in thread
From: Johannes Schindelin @ 2005-10-10 19:42 UTC (permalink / raw)
To: H. Peter Anvin; +Cc: Junio C Hamano, git, Linus Torvalds
Hi,
On Mon, 10 Oct 2005, H. Peter Anvin wrote:
> Johannes Schindelin wrote:
> >
> > > Junio C Hamano wrote:
> > >
> > > > PROT_WRITE is true, but we do MAP_PRIVATE, and if I recall
> > > > correctly we do not write file via mmap -- at least we do not
> > > > intend to.
> > > >
> > >
> > > Then PROT_READ probably makes more sense?
> >
> > Not necessarily. Sometimes you need to annotate the data from the index, and
> > this does not need to be written back to the index file.
> >
>
> In the above sentence, emphasis on "at least we do not intend to." If writes
> are done legitimately then that's fine, but we shouldn't have "accidental
> writes" -- those would be program bugs!
Yes, those would be bugs. However, if I understood the man page for mmap()
correctly, then PROT_WRITE && MAP_PRIVATE makes the data copy-on-write,
which means that those bugs would have been found (because the changes
would no longer be present when git was called the next time). And I
checked: all mmap() calls in git are MAP_PRIVATE.
> > > > Yes. It might have been overkill that you supported writing
> > > > changes back, though.
> > >
> > > Not just overkill; if we do MAP_PRIVATE it's actively WRONG.
> >
> > See above.
> >
>
> Eh? If we MAP_PRIVATE, *and* we (intentionally) write to it, we *BETTER* not
> write anything back.
Yes. That was *my* mistake.
Ciao,
Dscho
^ permalink raw reply [flat|nested] 62+ messages in thread
* Re: First cut at git port to Cygwin
2005-10-10 19:26 ` H. Peter Anvin
2005-10-10 19:42 ` Johannes Schindelin
@ 2005-10-10 20:21 ` Junio C Hamano
2005-10-10 20:34 ` Junio C Hamano
2 siblings, 0 replies; 62+ messages in thread
From: Junio C Hamano @ 2005-10-10 20:21 UTC (permalink / raw)
To: H. Peter Anvin; +Cc: Johannes Schindelin, git, Linus Torvalds
"H. Peter Anvin" <hpa@zytor.com> writes:
> Eh? If we MAP_PRIVATE, *and* we (intentionally) write to it, we
> *BETTER* not write anything back.
Correct.
It has already been fixed by Johannes last week and I merged it
over the weekend if not earlier if I recall correctly.
^ permalink raw reply [flat|nested] 62+ messages in thread
* Re: First cut at git port to Cygwin
2005-10-10 19:01 ` Johannes Schindelin
2005-10-10 19:26 ` H. Peter Anvin
@ 2005-10-10 20:27 ` Daniel Barkalow
1 sibling, 0 replies; 62+ messages in thread
From: Daniel Barkalow @ 2005-10-10 20:27 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: H. Peter Anvin, Junio C Hamano, git, Linus Torvalds
On Mon, 10 Oct 2005, Johannes Schindelin wrote:
> Hi,
>
> On Mon, 10 Oct 2005, H. Peter Anvin wrote:
>
> > Junio C Hamano wrote:
> > >
> > > PROT_WRITE is true, but we do MAP_PRIVATE, and if I recall
> > > correctly we do not write file via mmap -- at least we do not
> > > intend to.
> > >
> >
> > Then PROT_READ probably makes more sense?
>
> Not necessarily. Sometimes you need to annotate the data from the index,
> and this does not need to be written back to the index file.
In fact, it is intentional that we open the file O_RDONLY, and mmap it
PROT_READ | PROT_WRITE, MAP_PRIVATE. We prepare the next index in the
memory where we mapped the old index, but we don't want to change what's
on the disk using the mapping; we write that later to a different file
using write().
> > > Yes. It might have been overkill that you supported writing
> > > changes back, though.
> >
> > Not just overkill; if we do MAP_PRIVATE it's actively WRONG.
>
> See above.
>
> BTW, is there a mechanism to make sure that the index file is locked
> between reading and writing?
There's definitely locking; the new file is written to "(filename).lock",
which is openned O_CREAT | O_EXCL, and is moved to the destination when
it's complete. I believe everything that intends to write a new index gets
the lock before reading the old index, although I haven't actually
checked.
-Daniel
*This .sig left intentionally blank*
^ permalink raw reply [flat|nested] 62+ messages in thread
* Re: First cut at git port to Cygwin
2005-10-10 19:26 ` H. Peter Anvin
2005-10-10 19:42 ` Johannes Schindelin
2005-10-10 20:21 ` Junio C Hamano
@ 2005-10-10 20:34 ` Junio C Hamano
2005-10-10 20:52 ` H. Peter Anvin
2 siblings, 1 reply; 62+ messages in thread
From: Junio C Hamano @ 2005-10-10 20:34 UTC (permalink / raw)
To: H. Peter Anvin; +Cc: Johannes Schindelin, git, Linus Torvalds
"H. Peter Anvin" <hpa@zytor.com> writes:
>>>Junio C Hamano wrote:
>>>
>>>>PROT_WRITE is true, but we do MAP_PRIVATE, and if I recall
>>>>correctly we do not write file via mmap -- at least we do not
>>>>intend to.
>>>>
>
> In the above sentence, emphasis on "at least we do not intend to." If
> writes are done legitimately then that's fine, but we shouldn't have
> "accidental writes" -- those would be program bugs!
What I meant to say was "we do not intend to write back the
changes by expecting the modification on mapped area are written
back by mmap() mechanism -- the updates to index file is done by
creat - write - close - rename". So your saying "the overkill
being actively wrong" was technically correct, but that wrongly
written data was renamed out anyway and no real harm was done.
^ permalink raw reply [flat|nested] 62+ messages in thread
* Re: First cut at git port to Cygwin
2005-10-10 20:34 ` Junio C Hamano
@ 2005-10-10 20:52 ` H. Peter Anvin
0 siblings, 0 replies; 62+ messages in thread
From: H. Peter Anvin @ 2005-10-10 20:52 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Johannes Schindelin, git, Linus Torvalds
Junio C Hamano wrote:
> "H. Peter Anvin" <hpa@zytor.com> writes:
>
>
>>>>Junio C Hamano wrote:
>>>>
>>>>
>>>>>PROT_WRITE is true, but we do MAP_PRIVATE, and if I recall
>>>>>correctly we do not write file via mmap -- at least we do not
>>>>>intend to.
>>>>>
>>
>>In the above sentence, emphasis on "at least we do not intend to." If
>>writes are done legitimately then that's fine, but we shouldn't have
>>"accidental writes" -- those would be program bugs!
>
>
> What I meant to say was "we do not intend to write back the
> changes by expecting the modification on mapped area are written
> back by mmap() mechanism -- the updates to index file is done by
> creat - write - close - rename". So your saying "the overkill
> being actively wrong" was technically correct, but that wrongly
> written data was renamed out anyway and no real harm was done.
Well, it broke the atomicity of an operation, which *is* a real problem.
Anyway, malloc+read is a dead ringer for MAP_PRIVATE with PROT_WRITE, so
that makes it even easier to mimic.
-hpa
^ permalink raw reply [flat|nested] 62+ messages in thread
end of thread, other threads:[~2005-10-10 20:52 UTC | newest]
Thread overview: 62+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-29 0:53 First cut at git port to Cygwin H. Peter Anvin
2005-09-29 4:30 ` Junio C Hamano
2005-09-29 5:07 ` H. Peter Anvin
2005-09-29 4:46 ` Martin Langhoff
2005-09-29 5:13 ` Junio C Hamano
2005-09-29 6:19 ` H. Peter Anvin
2005-09-29 8:46 ` Johannes Schindelin
2005-09-29 16:11 ` H. Peter Anvin
2005-09-29 17:25 ` H. Peter Anvin
2005-09-30 10:02 ` Junio C Hamano
2005-09-30 17:01 ` H. Peter Anvin
2005-09-30 19:08 ` H. Peter Anvin
2005-10-04 12:31 ` Alex Riesen
2005-10-04 13:06 ` Alex Riesen
2005-10-04 14:06 ` H. Peter Anvin
2005-10-05 3:15 ` Christopher Faylor
2005-10-04 15:03 ` H. Peter Anvin
2005-10-05 3:16 ` Christopher Faylor
2005-10-05 5:25 ` H. Peter Anvin
2005-10-05 11:24 ` Alex Riesen
2005-10-05 15:46 ` Alex Riesen
2005-10-05 15:54 ` Christopher Faylor
2005-10-05 16:09 ` Davide Libenzi
2005-10-05 16:15 ` Christopher Faylor
2005-10-05 16:23 ` H. Peter Anvin
2005-10-05 16:28 ` Christopher Faylor
2005-10-05 17:29 ` Davide Libenzi
2005-10-05 19:17 ` Alex Riesen
2005-10-05 20:29 ` Christopher Faylor
2005-10-06 9:05 ` Alex Riesen
2005-10-06 10:07 ` Alex Riesen
2005-10-07 12:44 ` Alex Riesen
2005-10-07 15:34 ` Linus Torvalds
2005-10-07 20:54 ` Alex Riesen
2005-10-07 21:22 ` Alex Riesen
2005-10-07 21:29 ` Chuck Lever
2005-10-07 21:39 ` Alex Riesen
2005-10-08 16:11 ` Linus Torvalds
2005-10-08 17:38 ` Elfyn McBratney
2005-10-08 17:43 ` Elfyn McBratney
2005-10-08 18:27 ` Johannes Schindelin
2005-10-08 18:44 ` Junio C Hamano
2005-10-08 19:04 ` Johannes Schindelin
2005-10-08 21:10 ` Junio C Hamano
2005-10-08 22:06 ` Johannes Schindelin
2005-10-10 18:43 ` H. Peter Anvin
2005-10-10 19:01 ` Johannes Schindelin
2005-10-10 19:26 ` H. Peter Anvin
2005-10-10 19:42 ` Johannes Schindelin
2005-10-10 20:21 ` Junio C Hamano
2005-10-10 20:34 ` Junio C Hamano
2005-10-10 20:52 ` H. Peter Anvin
2005-10-10 20:27 ` Daniel Barkalow
2005-10-08 18:49 ` Alex Riesen
2005-10-09 20:40 ` Commit text BEFORE the dashes (Re: First cut at git port to Cygwin) Matthias Urlichs
[not found] ` <7vfyrdyre5.fsf@assigned-by-dhcp.cox.net>
2005-10-07 23:45 ` First cut at git port to Cygwin Alex Riesen
2005-10-08 1:00 ` Elfyn McBratney
2005-10-10 18:45 ` H. Peter Anvin
2005-10-05 13:16 ` Jonas Fonseca
2005-10-05 13:58 ` Johannes Schindelin
2005-10-05 15:52 ` [PATCH] Fix symbolic ref validation Jonas Fonseca
2005-10-05 16:54 ` Junio C Hamano
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).