* [PATCH RESEND] git config: clarify bool types
From: Felipe Contreras @ 2009-12-03 8:21 UTC (permalink / raw)
To: git; +Cc: Felipe Contreras
The value is what it is, the --bool and --bool-or-int options don't
specify the value type, just how it is interpreted. For example: a value
of '1' can be interpreted as 'true'.
Comments by Michael J Gruber.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
builtin-config.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/builtin-config.c b/builtin-config.c
index a2d656e..d81928c 100644
--- a/builtin-config.c
+++ b/builtin-config.c
@@ -66,9 +66,9 @@ static struct option builtin_config_options[] = {
OPT_STRING(0, "get-color", &get_color_slot, "slot", "find the color configured: [default]"),
OPT_STRING(0, "get-colorbool", &get_colorbool_slot, "slot", "find the color setting: [stdout-is-tty]"),
OPT_GROUP("Type"),
- OPT_BIT(0, "bool", &types, "value is \"true\" or \"false\"", TYPE_BOOL),
+ OPT_BIT(0, "bool", &types, "value is interpreted as a boolean (\"true\" or \"false\")", TYPE_BOOL),
OPT_BIT(0, "int", &types, "value is decimal number", TYPE_INT),
- OPT_BIT(0, "bool-or-int", &types, "value is --bool or --int", TYPE_BOOL_OR_INT),
+ OPT_BIT(0, "bool-or-int", &types, "value is interpreted either as --bool or --int", TYPE_BOOL_OR_INT),
OPT_GROUP("Other"),
OPT_BOOLEAN('z', "null", &end_null, "terminate values with NUL byte"),
OPT_END(),
--
1.6.6.rc1.1.ge4e9b
^ permalink raw reply related
* Re: [PATCH] pull: clarify advice for the unconfigured error case
From: Jan Nieuwenhuizen @ 2009-12-03 8:49 UTC (permalink / raw)
To: Jeff King
Cc: Jonathan Nieder, Junio C Hamano, Jan Krüger, Tomas Carnecky,
git list
In-Reply-To: <20091203014315.GA12061@coredump.intra.peff.net>
Op woensdag 02-12-2009 om 20:43 uur [tijdzone -0500], schreef Jeff King:
> On Wed, Dec 02, 2009 at 07:26:14PM -0600, Jonathan Nieder wrote:
>
> > > and does the lack of follow-up mean everybody involved in the discussion
> > > is happy with this version?
> Yeah, that was my main complaint, and I withdrew it after getting a
> clue. :) I gave the patch another quick look, and I think it is fine.
Great, thanks!
Jan.
--
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond - The music typesetter
Avatar®: http://AvatarAcademy.nl | http://lilypond.org
^ permalink raw reply
* [ANNOUNCE] Git 1.6.5.4
From: Junio C Hamano @ 2009-12-03 9:21 UTC (permalink / raw)
To: git
The latest maintenance release Git 1.6.5.4 is available at the
usual places:
http://www.kernel.org/pub/software/scm/git/
git-1.6.5.4.tar.{gz,bz2} (source tarball)
git-htmldocs-1.6.5.4.tar.{gz,bz2} (preformatted docs)
git-manpages-1.6.5.4.tar.{gz,bz2} (preformatted docs)
The RPM binary packages for a few architectures are found in:
RPMS/$arch/git-*-1.6.5.4-1.fc11.$arch.rpm (RPM)
Contains some minor fixes that have been accumulated; all of them
appear in the upcoming 1.6.6 release as well.
This should fix the problem that man pages formatted on FC11 boxes are
littered with "man.base.url.for.relative.link" strings reported earlier
today.
Git v1.6.5.4 Release Notes
==========================
Fixes since v1.6.5.3
--------------------
* "git help" (without argument) used to check if you are in a directory
under git control. There was no breakage in behaviour per-se, but this
was unnecessary.
* "git prune-packed" gave progress output even when its standard error is
not connected to a terminal; this caused cron jobs that run it to
produce crufts.
* "git pack-objects --all-progress" is an option to ask progress output
from write-object phase _if_ progress output were to be produced, and
shouldn't have forced the progress output.
* "git apply -p<n> --directory=<elsewhere>" did not work well for a
non-default value of n.
* "git merge foo HEAD" was misparsed as an old-style invocation of the
command and produced a confusing error message. As it does not specify
any other branch to merge, it shouldn't be mistaken as such. We will
remove the old style "git merge <message> HEAD <commit>..." syntax in
future versions, but not in this release,
* "git merge -m <message> <branch>..." added the standard merge message
on its own after user-supplied message, which should have overrided the
standard one.
Other minor documentation updates are included.
----------------------------------------------------------------
Changes since v1.6.5.3 are as follows:
David Aguilar (1):
help: Do not unnecessarily look for a repository
David Soria Parra (1):
Documentation: Document --branch option in git clone synopsis
Greg Price (1):
Documentation: undocument gc'd function graph_release()
Jeff King (1):
prune-packed: only show progress when stderr is a tty
Junio C Hamano (7):
builtin-apply.c: pay attention to -p<n> when determining the name
Do not misidentify "git merge foo HEAD" as an old-style invocation
merge: do not add standard message when message is given with -m option
Prepare for 1.6.5.4
Documentation/Makefile: allow man.base.url.for.relative.link to be set from Make
Unconditionally set man.base.url.for.relative.links
Git 1.6.5.4
Michael J Gruber (1):
Documentation: Fix a few i.e./e.g. mix-ups
Nicolas Pitre (1):
pack-objects: split implications of --all-progress from progress activation
Stephen Boyd (1):
instaweb: restart server if already running
^ permalink raw reply
* Re: [ANNOUNCE] Git 1.6.5.4
From: Jeff King @ 2009-12-03 9:25 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
In-Reply-To: <7v638o76ra.fsf@alter.siamese.dyndns.org>
On Thu, Dec 03, 2009 at 01:21:13AM -0800, Junio C Hamano wrote:
> * "git pack-objects --all-progress" is an option to ask progress output
> from write-object phase _if_ progress output were to be produced, and
> shouldn't have forced the progress output.
Shouldn't this actually be --all-progress-implied? Nico's patch
intentionally kept --all-progress with the same behavior.
-Peff
^ permalink raw reply
* Re: [PATCH] reset: add --quiet option
From: Felipe Contreras @ 2009-12-03 9:33 UTC (permalink / raw)
To: Stephen Boyd; +Cc: git
In-Reply-To: <780e0a6b0911301345v42c2b22bs34092fb69b21a2a0@mail.gmail.com>
On Mon, Nov 30, 2009 at 11:45 PM, Stephen Boyd <bebarino@gmail.com> wrote:
> If you're already touching the line why not just do it once? I agree a
> follow-up patch to cover the other commands would be good.
Because the less trivial the patches, the less luck I have of getting
them applied :)
Anyway, I sent a patch to use OPT__QUIET directly in two places.
--
Felipe Contreras
^ permalink raw reply
* Re: [PATCH] reset: add --quiet option
From: Stephen Boyd @ 2009-12-03 9:46 UTC (permalink / raw)
To: Felipe Contreras; +Cc: git
In-Reply-To: <94a0d4530912030133n7e2fbf2asfea6e3896980dc7c@mail.gmail.com>
On Thu, 2009-12-03 at 11:33 +0200, Felipe Contreras wrote:
> On Mon, Nov 30, 2009 at 11:45 PM, Stephen Boyd <bebarino@gmail.com> wrote:
> > If you're already touching the line why not just do it once? I agree a
> > follow-up patch to cover the other commands would be good.
>
> Because the less trivial the patches, the less luck I have of getting
> them applied :)
Heh, still seems pretty trivial to me ;-)
>
> Anyway, I sent a patch to use OPT__QUIET directly in two places.
>
Great. Thanks for making it more consistent.
^ permalink raw reply
* Re: [PATCH] pull: clarify advice for the unconfigured error case
From: Jan Krüger @ 2009-12-03 10:51 UTC (permalink / raw)
To: Junio C Hamano
Cc: Jonathan Nieder, Jeff King, Jan Nieuwenhuizen, Tomas Carnecky,
git list
In-Reply-To: <7vk4x57z4e.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> wrote:
> Is this a good replacement for 31971b3 (git-pull.sh --rebase: overhaul
> error handling when no candidates are found, 2009-11-12) that is on
> 'pu' and does the lack of follow-up mean everybody involved in the
> discussion is happy with this version?
I'm not deliriously happy but I can't think of a better version, and I
suppose it's better than what I suggested. In other words, I'm fine
with the patch.
Jan
^ permalink raw reply
* git reset --hard in .git causes a checkout in that directory
From: Maarten Lankhorst @ 2009-12-03 11:30 UTC (permalink / raw)
To: git
Hi all,
When I was working on my code and made a mess that I wanted to undo, I
accidentally did it in the .git directory, and had a whole clone of my
last committed tree there.
It can be triggered easily:
mkdir test; cd test; git init; touch foo; git add foo; git commit -m
'add foo'; cd .git; git reset --hard; [ -f foo ] && echo hello beauty
Other parts of git could be affected, I haven't checked where exactly
the bug hides, so I was afraid to send in a patch
Cheers,
Maarten
^ permalink raw reply
* Re: [ANNOUNCE] Git 1.6.5.4
From: Andreas Schwab @ 2009-12-03 12:03 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
In-Reply-To: <7v638o76ra.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
> Unconditionally set man.base.url.for.relative.links
rm -f git-add.1 && \
xmlto -m manpage-normal.xsl --stringparam man.base.url.for.relative.links= man git-add.xml
xmlto: unrecognized option '--stringparam'
make[1]: *** [git-add.1] Error 1
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply
* Speedlimit at "git clone"
From: Stefan Kuhne @ 2009-12-03 12:09 UTC (permalink / raw)
To: git
[-- Attachment #1: Type: text/plain, Size: 90 bytes --]
Hello,
how can i limit the download speed at "git clone"?
Regards,
Stefan Kuhne
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 552 bytes --]
^ permalink raw reply
* Re: [ANNOUNCE] Git 1.6.5.4
From: Michael J Gruber @ 2009-12-03 12:15 UTC (permalink / raw)
To: Andreas Schwab; +Cc: Junio C Hamano, git
In-Reply-To: <m2hbs85koj.fsf@igel.home>
Andreas Schwab venit, vidit, dixit 03.12.2009 13:03:
> Junio C Hamano <gitster@pobox.com> writes:
>
>> Unconditionally set man.base.url.for.relative.links
>
> rm -f git-add.1 && \
> xmlto -m manpage-normal.xsl --stringparam man.base.url.for.relative.links= man git-add.xml
> xmlto: unrecognized option '--stringparam'
> make[1]: *** [git-add.1] Error 1
>
> Andreas.
>
and
uname -a
xmlto --version
says?
Michael
^ permalink raw reply
* Re: [ANNOUNCE] Git 1.6.5.4
From: Andreas Schwab @ 2009-12-03 13:50 UTC (permalink / raw)
To: Michael J Gruber; +Cc: Junio C Hamano, git
In-Reply-To: <4B17ABE3.6060003@drmicha.warpmail.net>
Michael J Gruber <git@drmicha.warpmail.net> writes:
> Andreas Schwab venit, vidit, dixit 03.12.2009 13:03:
>> Junio C Hamano <gitster@pobox.com> writes:
>>
>>> Unconditionally set man.base.url.for.relative.links
>>
>> rm -f git-add.1 && \
>> xmlto -m manpage-normal.xsl --stringparam man.base.url.for.relative.links= man git-add.xml
>> xmlto: unrecognized option '--stringparam'
>> make[1]: *** [git-add.1] Error 1
>>
>> Andreas.
>>
>
> and
>
> uname -a
> xmlto --version
>
> says?
xmlto version 0.0.18
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply
* Re: [ANNOUNCE] Git 1.6.5.4
From: Michael J Gruber @ 2009-12-03 14:51 UTC (permalink / raw)
To: Andreas Schwab; +Cc: Junio C Hamano, git
In-Reply-To: <m2d42w5fqq.fsf@igel.home>
Andreas Schwab venit, vidit, dixit 03.12.2009 14:50:
> Michael J Gruber <git@drmicha.warpmail.net> writes:
>
>> Andreas Schwab venit, vidit, dixit 03.12.2009 13:03:
>>> Junio C Hamano <gitster@pobox.com> writes:
>>>
>>>> Unconditionally set man.base.url.for.relative.links
>>>
>>> rm -f git-add.1 && \
>>> xmlto -m manpage-normal.xsl --stringparam man.base.url.for.relative.links= man git-add.xml
>>> xmlto: unrecognized option '--stringparam'
>>> make[1]: *** [git-add.1] Error 1
>>>
>>> Andreas.
>>>
>>
>> and
>>
>> uname -a
>> xmlto --version
>>
>> says?
>
> xmlto version 0.0.18
>
> Andreas.
>
Now that predates Git quite a bit (2004-01-21)...
I think we can require at least 0.0.20, which is in Debian Lenny and
Fedora 9, for example. I think that should have it. (I'm not sure, they
don't use a proper vcs ;) ).
Michael
^ permalink raw reply
* Re: [ANNOUNCE] Git 1.6.5.4
From: Todd Zullinger @ 2009-12-03 15:03 UTC (permalink / raw)
To: Michael J Gruber; +Cc: Andreas Schwab, Junio C Hamano, git
In-Reply-To: <4B17D078.6080000@drmicha.warpmail.net>
[-- Attachment #1: Type: text/plain, Size: 947 bytes --]
Michael J Gruber wrote:
>>> Andreas Schwab venit, vidit, dixit 03.12.2009 13:03:
>> xmlto version 0.0.18
[...]
> Now that predates Git quite a bit (2004-01-21)...
> I think we can require at least 0.0.20, which is in Debian Lenny and
> Fedora 9, for example. I think that should have it. (I'm not sure, they
> don't use a proper vcs ;) ).
xmlto-0.0.18 is what's in RHEL/CentOS 5. It would be nice to be able
to build git docs there, which works pretty well in general (I
believe).
I built 1.6.6.rc1 on CentOS 5.4 last night with Junio's first patch
for this, which only called --stringparam if MAN_BASE_URL was set.
--
Todd OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
A common mistake people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete
fools.
-- Douglas Adams
[-- Attachment #2: Type: application/pgp-signature, Size: 542 bytes --]
^ permalink raw reply
* Re: Git documentation consistency
From: Uri Okrent @ 2009-12-03 15:24 UTC (permalink / raw)
To: Jeff King; +Cc: The Git Mailing List
In-Reply-To: <20091203074500.GA31566@coredump.intra.peff.net>
On Wed, Dec 2, 2009 at 11:45 PM, Jeff King <peff@peff.net> wrote:
> So what systems _do_ treat "-?" specially?
>
> -Peff
Windows seems to (of course you need to use '/' instead of '-'):
Microsoft Windows [Version 6.0.6001]
c:\>dir -h
Volume in drive C has no label.
Volume Serial Number is B09A-B49F
Directory of c:\
File Not Found
c:\>dir /h
Invalid switch - "h".
c:\>dir /help
Invalid switch - "help".
c:\>dir /?
Displays a list of files and subdirectories in a directory.
DIR [drive:][path][filename] [/A[[:]attributes]] [/B] [/C] [/D] [/L] [/N]
[/O[[:]sortorder]] [/P] [/Q] [/R] [/S] [/T[[:]timefield]] [/W] [/X] [/4]
[drive:][path][filename]
Specifies drive, directory, and/or files to list.
/A Displays files with specified attributes.
attributes D Directories R Read-only files
H Hidden files A Files ready for archiving
S System files I Not content indexed files
L Reparse Points - Prefix meaning not
/B Uses bare format (no heading information or summary).
/C Display the thousand separator in file sizes. This is the
default. Use /-C to disable display of separator.
/D Same as wide but files are list sorted by column.
/L Uses lowercase.
/N New long list format where filenames are on the far right.
/O List by files in sorted order.
sortorder N By name (alphabetic) S By size (smallest first)
E By extension (alphabetic) D By date/time (oldest first)
G Group directories first - Prefix to reverse order
/P Pauses after each screenful of information.
/Q Display the owner of the file.
/R Display alternate data streams of the file.
/S Displays files in specified directory and all subdirectories.
/T Controls which time field displayed or used for sorting
timefield C Creation
A Last Access
W Last Written
/W Uses wide list format.
/X This displays the short names generated for non-8dot3 file
names. The format is that of /N with the short name inserted
before the long name. If no short name is present, blanks are
displayed in its place.
/4 Displays four-digit years
Switches may be preset in the DIRCMD environment variable. Override
preset switches by prefixing any switch with - (hyphen)--for example, /-W.
c:\>
--
Uri
Please consider the environment before printing this message.
http://www.panda.org/how_you_can_help/
^ permalink raw reply
* [BUG] crash on make test
From: Marinescu Paul dan @ 2009-12-03 15:38 UTC (permalink / raw)
To: git@vger.kernel.org
In-Reply-To: <D6F784B72498304C93A8A4691967698E8EE2C44FE1@REX2.intranet.epfl.ch>
I got a crash on git's make test with and a core file in ./t/trash directory.t4200-rerere/
The problem seems to be in garbage_collect (builtin-rerere.c) where readdir can be called with a null pointer
Below is the gdb stack trace:
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...
Reading symbols from /lib/libz.so.1...done.
Loaded symbols for /lib/libz.so.1
Reading symbols from /lib/i686/cmov/libcrypto.so.0.9.8...done.
Loaded symbols for /lib/i686/cmov/libcrypto.so.0.9.8
Reading symbols from /lib/tls/i686/cmov/libpthread.so.0...Reading symbols from /usr/lib/debug/lib/tls/i686/cmov/libpthread-2.9.so...done.
done.
Loaded symbols for /lib/tls/i686/cmov/libpthread.so.0
Reading symbols from /lib/tls/i686/cmov/libc.so.6...Reading symbols from /usr/lib/debug/lib/tls/i686/cmov/libc-2.9.so...done.
done.
Loaded symbols for /lib/tls/i686/cmov/libc.so.6
Reading symbols from /usr/lib/libxml2.so.2...done.
Loaded symbols for /usr/lib/libxml2.so.2
Reading symbols from /lib/tls/i686/cmov/librt.so.1...Reading symbols from /usr/lib/debug/lib/tls/i686/cmov/librt-2.9.so...done.
done.
Loaded symbols for /lib/tls/i686/cmov/librt.so.1
Reading symbols from /lib/tls/i686/cmov/libdl.so.2...Reading symbols from /usr/lib/debug/lib/tls/i686/cmov/libdl-2.9.so...done.
done.
Loaded symbols for /lib/tls/i686/cmov/libdl.so.2
Reading symbols from /usr/lib/libelf.so.1...done.
Loaded symbols for /usr/lib/libelf.so.1
Reading symbols from /usr/lib/libstdc++.so.6...done.
Loaded symbols for /usr/lib/libstdc++.so.6
Reading symbols from /lib/tls/i686/cmov/libm.so.6...Reading symbols from /usr/lib/debug/lib/tls/i686/cmov/libm-2.9.so...done.
done.
Loaded symbols for /lib/tls/i686/cmov/libm.so.6
Reading symbols from /lib/libgcc_s.so.1...done.
Loaded symbols for /lib/libgcc_s.so.1
Reading symbols from /lib/ld-linux.so.2...Reading symbols from /usr/lib/debug/lib/ld-2.9.so...done.
done.
Loaded symbols for /lib/ld-linux.so.2
Core was generated by `git rerere gc'.
Program terminated with signal 11, Segmentation fault.
[New process 5637]
#0 0x4027fca5 in __readdir64 (dirp=0x0) at ../sysdeps/unix/readdir.c:45
in ../sysdeps/unix/readdir.c
(gdb) bt full
#0 0x4027fca5 in __readdir64 (dirp=0x0) at ../sysdeps/unix/readdir.c:45
ignore1 = 0
ignore2 = 1
dp = <value optimized out>
saved_errno = 12
#1 0x0813cfd4 in garbage_collect (rr=0xbfabe89c) at builtin-rerere.c:51
to_remove = {items = 0x0, nr = 0, alloc = 0, strdup_strings = 1}
dir = (DIR *) 0x0
e = (struct dirent *) 0x1
i = 0
cutoff = -1079252800
now = 1259852637
then = 1
#2 0x0813d970 in cmd_rerere (argc=2, argv=0xbfabeaa8, prefix=0x0) at builtin-rerere.c:121
merge_rr = {items = 0xa0d2728, nr = 1, alloc = 32, strdup_strings = 1}
i = -1
fd = 6
#3 0x0804ca57 in run_builtin (p=0x831465c, argc=2, argv=0xbfabeaa8) at git.c:249
status = 1076211824
st = {st_dev = 3418922014550254984, __pad1 = 65535, __st_ino = 1073860596, st_mode = 134517300,
st_nlink = 1073862256, st_uid = 3215714640, st_gid = 1073798779, st_rdev = 4632177755147065384, __pad2 = 1,
st_size = 1, st_blksize = 134519071, st_blocks = 180, st_atim = {tv_sec = 137446088, tv_nsec = 1}, st_mtim = {
tv_sec = 1075774256, tv_nsec = 1077161972}, st_ctim = {tv_sec = 137183648, tv_nsec = 134524528},
st_ino = 4612030924696840600}
prefix = 0x0
#4 0x0804cee8 in handle_internal_command (argc=2, argv=0xbfabeaa8) at git.c:394
p = (struct cmd_struct *) 0x831465c
cmd = 0xbfac098a "rerere"
i = 69
commands = {{cmd = 0x82d4765 "add", fn = 0x804f757 <cmd_add>, option = 5}, {cmd = 0x82d4769 "stage",
fn = 0x804f757 <cmd_add>, option = 5}, {cmd = 0x82d476f "annotate", fn = 0x8050754 <cmd_annotate>, option = 1}, {
cmd = 0x82d4778 "apply", fn = 0x80679e1 <cmd_apply>, option = 0}, {cmd = 0x82d477e "archive",
fn = 0x8069ba0 <cmd_archive>, option = 0}, {cmd = 0x82d4786 "bisect--helper",
fn = 0x806a138 <cmd_bisect__helper>, option = 5}, {cmd = 0x82d4795 "blame", fn = 0x807770d <cmd_blame>,
option = 1}, {cmd = 0x82d479b "branch", fn = 0x807d584 <cmd_branch>, option = 1}, {cmd = 0x82d47a2 "bundle",
fn = 0x807e3ec <cmd_bundle>, option = 0}, {cmd = 0x82d47a9 "cat-file", fn = 0x80803cb <cmd_cat_file>,
option = 1}, {cmd = 0x82d47b2 "checkout", fn = 0x8088f1c <cmd_checkout>, option = 5}, {
cmd = 0x82d47bb "checkout-index", fn = 0x8082fc9 <cmd_checkout_index>, option = 5}, {
cmd = 0x82d47ca "check-ref-format", fn = 0x8081920 <cmd_check_ref_format>, option = 0}, {
cmd = 0x82d47db "check-attr", fn = 0x808125a <cmd_check_attr>, option = 1}, {cmd = 0x82d47e6 "cherry",
fn = 0x80eb740 <cmd_cherry>, option = 1}, {cmd = 0x82d47ed "cherry-pick", fn = 0x814c341 <cmd_cherry_pick>,
option = 5}, {cmd = 0x82d47f9 "clone", fn = 0x808e8a1 <cmd_clone>, option = 0}, {cmd = 0x82d47ff "clean",
fn = 0x808aa34 <cmd_clean>, option = 5}, {cmd = 0x82d4805 "commit", fn = 0x809b274 <cmd_commit>, option = 5}, {
cmd = 0x82d480c "commit-tree", fn = 0x8092531 <cmd_commit_tree>, option = 1}, {cmd = 0x82d4818 "config",
fn = 0x809f881 <cmd_config>, option = 0}, {cmd = 0x82d481f "count-objects", fn = 0x80a1c75 <cmd_count_objects>,
option = 1}, {cmd = 0x82d482d "describe", fn = 0x80a4d6d <cmd_describe>, option = 1}, {cmd = 0x82d4836 "diff",
fn = 0x80a99e8 <cmd_diff>, option = 0}, {cmd = 0x82d483b "diff-files", fn = 0x80a56d0 <cmd_diff_files>,
option = 5}, {cmd = 0x82d4846 "diff-index", fn = 0x80a601c <cmd_diff_index>, option = 1}, {
cmd = 0x82d4851 "diff-tree", fn = 0x80a7307 <cmd_diff_tree>, option = 1}, {cmd = 0x82d485b "fast-export",
fn = 0x80af36f <cmd_fast_export>, option = 1}, {cmd = 0x82d4867 "fetch", fn = 0x80c1668 <cmd_fetch>,
option = 1}, {cmd = 0x82d486d "fetch-pack", fn = 0x80ba759 <cmd_fetch_pack>, option = 1}, {
cmd = 0x82d4878 "fetch--tool", fn = 0x80b4202 <cmd_fetch__tool>, option = 1}, {cmd = 0x82d4884 "fmt-merge-msg",
fn = 0x80c5038 <cmd_fmt_merge_msg>, option = 1}, {cmd = 0x82d4892 "for-each-ref",
fn = 0x80cb172 <cmd_for_each_ref>, option = 1}, {cmd = 0x82d489f "format-patch",
fn = 0x80e86a4 <cmd_format_patch>, option = 1}, {cmd = 0x82d48ac "fsck", fn = 0x80cf9d5 <cmd_fsck>, option = 1},
{cmd = 0x82d48b1 "fsck-objects", fn = 0x80cf9d5 <cmd_fsck>, option = 1}, {cmd = 0x82d48be "gc",
fn = 0x80d17fd <cmd_gc>, option = 1}, {cmd = 0x82d48c1 "get-tar-commit-id",
fn = 0x8163545 <cmd_get_tar_commit_id>, option = 0}, {cmd = 0x82d48d3 "grep", fn = 0x80d80ba <cmd_grep>,
option = 3}, {cmd = 0x82d48d8 "help", fn = 0x80dcd12 <cmd_help>, option = 0}, {cmd = 0x82d48dd "init",
fn = 0x80e0d5b <cmd_init_db>, option = 0}, {cmd = 0x82d48e2 "init-db", fn = 0x80e0d5b <cmd_init_db>,
option = 0}, {cmd = 0x82d48ea "log", fn = 0x80e4c6f <cmd_log>, option = 3}, {cmd = 0x82d48ee "ls-files",
fn = 0x80ef3e5 <cmd_ls_files>, option = 1}, {cmd = 0x82d48f7 "ls-tree", fn = 0x80f1e84 <cmd_ls_tree>,
option = 1}, {cmd = 0x82d48ff "ls-remote", fn = 0x80f0a35 <cmd_ls_remote>, option = 0}, {
cmd = 0x82d4909 "mailinfo", fn = 0x80f99ac <cmd_mailinfo>, option = 0}, {cmd = 0x82d4912 "mailsplit",
fn = 0x80fbd21 <cmd_mailsplit>, option = 0}, {cmd = 0x82d491c "merge", fn = 0x81045ff <cmd_merge>, option = 5}, {
cmd = 0x82d4922 "merge-base", fn = 0x81084c3 <cmd_merge_base>, option = 1}, {cmd = 0x82d492d "merge-file",
fn = 0x8108839 <cmd_merge_file>, option = 0}, {cmd = 0x82d4938 "merge-ours", fn = 0x8109594 <cmd_merge_ours>,
option = 1}, {cmd = 0x82d4943 "merge-recursive", fn = 0x81097ca <cmd_merge_recursive>, option = 5}, {
cmd = 0x82d4953 "merge-subtree", fn = 0x81097ca <cmd_merge_recursive>, option = 5}, {cmd = 0x82d4961 "mktree",
fn = 0x810afea <cmd_mktree>, option = 1}, {cmd = 0x82d4968 "mv", fn = 0x810ba65 <cmd_mv>, option = 5}, {
cmd = 0x82d496b "name-rev", fn = 0x810ef35 <cmd_name_rev>, option = 1}, {cmd = 0x82d4974 "pack-objects",
fn = 0x811daed <cmd_pack_objects>, option = 1}, {cmd = 0x82d4981 "peek-remote", fn = 0x80f0a35 <cmd_ls_remote>,
option = 0}, {cmd = 0x82d498d "pickaxe", fn = 0x807770d <cmd_blame>, option = 1}, {cmd = 0x82d4995 "prune",
fn = 0x812160f <cmd_prune>, option = 1}, {cmd = 0x82d499b "prune-packed", fn = 0x812029c <cmd_prune_packed>,
option = 1}, {cmd = 0x82d49a8 "push", fn = 0x8122de2 <cmd_push>, option = 1}, {cmd = 0x82d49ad "read-tree",
fn = 0x8123640 <cmd_read_tree>, option = 1}, {cmd = 0x82d49b7 "receive-pack", fn = 0x8128ec4 <cmd_receive_pack>,
option = 0}, {cmd = 0x82d49c4 "reflog", fn = 0x812ebcf <cmd_reflog>, option = 1}, {cmd = 0x82d49cb "remote",
fn = 0x813ad5e <cmd_remote>, option = 1}, {cmd = 0x82d49d2 "replace", fn = 0x813c0fc <cmd_replace>, option = 1},
{cmd = 0x82d49da "repo-config", fn = 0x809f881 <cmd_config>, option = 0}, {cmd = 0x82d49e6 "rerere",
fn = 0x813d60d <cmd_rerere>, option = 1}, {cmd = 0x82d49ed "reset", fn = 0x813f0c9 <cmd_reset>, option = 1}, {
cmd = 0x82d49f3 "rev-list", fn = 0x8142605 <cmd_rev_list>, option = 1}, {cmd = 0x82d49fc "rev-parse",
fn = 0x81461ab <cmd_rev_parse>, option = 0}, {cmd = 0x82d4a06 "revert", fn = 0x814c24b <cmd_revert>,
option = 5}, {cmd = 0x82d4a0d "rm", fn = 0x814d170 <cmd_rm>, option = 1}, {cmd = 0x82d4a10 "send-pack",
fn = 0x815167e <cmd_send_pack>, option = 1}, {cmd = 0x82d4a1a "shortlog", fn = 0x81547ad <cmd_shortlog>,
option = 2}, {cmd = 0x82d4a23 "show-branch", fn = 0x81590c0 <cmd_show_branch>, option = 1}, {
cmd = 0x82d4a2f "show", fn = 0x80e3cc2 <cmd_show>, option = 3}, {cmd = 0x82d4a34 "status",
fn = 0x809a6e5 <cmd_status>, option = 5}, {cmd = 0x82d4a3b "stripspace", fn = 0x815e3e7 <cmd_stripspace>,
option = 0}, {cmd = 0x82d4a46 "symbolic-ref", fn = 0x815e849 <cmd_symbolic_ref>, option = 1}, {
cmd = 0x82d4a53 "tag", fn = 0x816180b <cmd_tag>, option = 1}, {cmd = 0x82d4a57 "tar-tree",
fn = 0x81630ac <cmd_tar_tree>, option = 0}, {cmd = 0x82d4a60 "unpack-objects",
fn = 0x8166bdf <cmd_unpack_objects>, option = 1}, {cmd = 0x82d4a6f "update-index",
fn = 0x816b514 <cmd_update_index>, option = 1}, {cmd = 0x82d4a7c "update-ref", fn = 0x816ddd0 <cmd_update_ref>,
option = 1}, {cmd = 0x82d4a87 "update-server-info", fn = 0x816e734 <cmd_update_server_info>, option = 1}, {
cmd = 0x82d4a9a "upload-archive", fn = 0x816f579 <cmd_upload_archive>, option = 0}, {
cmd = 0x82d4aa9 "verify-tag", fn = 0x817257a <cmd_verify_tag>, option = 1}, {cmd = 0x82d4ab4 "version",
fn = 0x81f5c18 <cmd_version>, option = 0}, {cmd = 0x82d4abc "whatchanged", fn = 0x80e339b <cmd_whatchanged>,
option = 3}, {cmd = 0x82d4ac8 "write-tree", fn = 0x8172814 <cmd_write_tree>, option = 1}, {
cmd = 0x82d4ad3 "verify-pack", fn = 0x81714a2 <cmd_verify_pack>, option = 0}, {cmd = 0x82d4adf "show-ref",
fn = 0x815d8b1 <cmd_show_ref>, option = 1}, {cmd = 0x82d4ae8 "pack-refs", fn = 0x811f8a4 <cmd_pack_refs>,
option = 1}}
ext = ""
#5 0x0804d1ce in run_argv (argcp=0xbfabea20, argv=0xbfabea24) at git.c:436
done_alias = 0
#6 0x0804d6d1 in main (argc=2, argv=0xbfabeaa8) at git.c:507
cmd = 0xbfac098a "rerere"
done_help = 0
was_alias = 0
(gdb) quit
^ permalink raw reply
* Re: git gsoc money
From: Shawn O. Pearce @ 2009-12-03 15:39 UTC (permalink / raw)
To: Jeff King; +Cc: git
In-Reply-To: <20091203052220.GA22582@coredump.intra.peff.net>
Jeff King <peff@peff.net> wrote:
> However, we still have about $500 USD remaining.
>
> Some possibilities are:
>
> 1. Become an affiliated project of an organization like The Software
> Freedom Conservancy or Software in the Public Interest.
Try to join the Software Freedom Conservancy and retain the funds
for Git's use? Maybe you can slide in before the Dec 31st deadline.
I know a few users of Git have said they can't contribute code, but
they would like to throw $25-50 towards a developer to say thank you.
This would give them an easier vehicle to do that.
I'm not saying we should actively seek donations, we have virtually
no expenses and don't need them.
But we do sometimes have these GitTogether things, or one of us is
going to a Linux Plumbers conference or something to give a talk
promoting Git. Having $500 from a handful of donations available
to defray Git related travel costs for some of our more active
developers is more useful than having a user send something from
an Amazon wish list [1][2].
At worst, if we collect a bunch of money and realize "Oh, wait,
we have like $8000 USD and we haven't spent any of it in the past
5 years!" we can have the SFC do a big donation to FSF or something
and say "thanks for GCC!".
If joining the SFC proves too difficult, just donate the $500 to
the FSF. That's what we did the first year we were in GSoC.
[1] At least, to me. My apartment isn't big enough for the crap
I already own, I don't need more crap shipped to it.
[2] This remark is due to a user on #git the other week wondering
why I don't have an Amazon wish list, as he wanted to send me
something to thank me for some feature I wrote eons ago.
--
Shawn.
^ permalink raw reply
* Re: Git documentation consistency
From: Marko Kreen @ 2009-12-03 16:22 UTC (permalink / raw)
To: The Git Mailing List
In-Reply-To: <m1NG61U-000kn4C@most.weird.com>
On 12/3/09, Greg A. Woods <woods@planix.com> wrote:
> At Wed, 02 Dec 2009 17:34:01 -0800, Junio C Hamano <gitster@pobox.com> wrote:
> Subject: Re: Git documentation consistency
> > I think you are showing ignorance here, as -? is *not* even close to
> > standard, nor even widely used practice at all.
>
> I think I should know something about Unix command line and option
> parsers, having used them for some 25 years or so now. In fact I've
> used most every kind of unix that ever was, and I've worked on the
> source to more than a few.
'?' is what getopt(3) is supposed to return for unknown options.
--
marko
^ permalink raw reply
* Re: git gsoc money
From: Junio C Hamano @ 2009-12-03 17:32 UTC (permalink / raw)
To: Jeff King; +Cc: git
In-Reply-To: <20091203052220.GA22582@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
> As a result of our participation in the Summer of Code project last
> summer and this summer, Google gave the git community some money. Most
> of that money went to defraying travel costs to the SoC mentor summit
> and the GitTogether, both last year and this year.
I have never been actively involved in SoC mentoring so my suggestion
shouldn't count too much, but the SFC route sounds like a very reasonable
option to me. Travel fund helped me a lot to attend last year's
GitTogether, and it would be very handy to have such a community fund to
cover part of costs when git people need to appear in events and
conferences for the benefit of git community as a whole.
^ permalink raw reply
* Re: [ANNOUNCE] Git 1.6.5.4
From: Junio C Hamano @ 2009-12-03 17:43 UTC (permalink / raw)
To: Todd Zullinger; +Cc: Michael J Gruber, Andreas Schwab, Junio C Hamano, git
In-Reply-To: <20091203150323.GI23717@inocybe.localdomain>
Todd Zullinger <tmz@pobox.com> writes:
> Michael J Gruber wrote:
>>>> Andreas Schwab venit, vidit, dixit 03.12.2009 13:03:
>>> xmlto version 0.0.18
> [...]
>> Now that predates Git quite a bit (2004-01-21)...
>> I think we can require at least 0.0.20, which is in Debian Lenny and
>> Fedora 9, for example. I think that should have it. (I'm not sure, they
>> don't use a proper vcs ;) ).
>
> xmlto-0.0.18 is what's in RHEL/CentOS 5. It would be nice to be able
> to build git docs there, which works pretty well in general (I
> believe).
>
> I built 1.6.6.rc1 on CentOS 5.4 last night with Junio's first patch
> for this, which only called --stringparam if MAN_BASE_URL was set.
I did the second one after seeing that both my Debian box and the k.org
machine that manpages tarballs are made (FC11 IIRC) had that option, and
my impression has been that it usually is safe to say "even Debian has it,
and there wouldn't be many things older than that distro", but that is
apparently not true.
Either we require 0.0.20 or we revert the tip one on this topic. I think
the latter is a safe thing to do.
Thanks for a quick report and analysis.
^ permalink raw reply
* [PATCH 1/2] t4201: use ISO8859-1 rather than ISO-8859-1
From: Brandon Casey @ 2009-12-03 17:52 UTC (permalink / raw)
To: gitster; +Cc: git, Brandon Casey
From: Brandon Casey <drafnel@gmail.com>
Some ancient platforms do not have an extensive list of alternate names for
character encodings. For example, Solaris 7 and IRIX 6.5 do not know that
ISO-8859-1 is the same as ISO8859-1. Modern platforms do know this, so use
the older name.
Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
---
t/t4201-shortlog.sh | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/t/t4201-shortlog.sh b/t/t4201-shortlog.sh
index dd818f6..a01e55b 100755
--- a/t/t4201-shortlog.sh
+++ b/t/t4201-shortlog.sh
@@ -53,7 +53,7 @@ GIT_DIR=non-existing git shortlog -w < log > out
test_expect_success 'shortlog from non-git directory' 'test_cmp expect out'
iconvfromutf8toiso88591() {
- printf "%s" "$*" | iconv -f UTF-8 -t ISO-8859-1
+ printf "%s" "$*" | iconv -f UTF-8 -t ISO8859-1
}
DSCHO="Jöhännës \"Dschö\" Schindëlin"
@@ -72,7 +72,7 @@ test_expect_success 'shortlog encoding' '
git config --unset i18n.commitencoding &&
echo 2 > a1 &&
git commit --quiet -m "$MSG1" --author="$DSCHOE" a1 &&
- git config i18n.commitencoding "ISO-8859-1" &&
+ git config i18n.commitencoding "ISO8859-1" &&
echo 3 > a1 &&
git commit --quiet -m "$(iconvfromutf8toiso88591 "$MSG2")" \
--author="$(iconvfromutf8toiso88591 "$DSCHOE")" a1 &&
--
1.6.5.3
^ permalink raw reply related
* [PATCH 2/2] t9001: use older Getopt::Long boolean prefix '--no' rather than '--no-'
From: Brandon Casey @ 2009-12-03 17:52 UTC (permalink / raw)
To: gitster; +Cc: git, Brandon Casey
In-Reply-To: <cQVSAldE71QbE653CpBd7qjd43g8URlxW7WO99KN4T0njgcXAbpAJQhTbfLeU5wxWrW84lsFVZE@cipher.nrlssc.navy.mil>
From: Brandon Casey <drafnel@gmail.com>
The '--no-chain-reply-to' option is a Getopt::Long boolean option. The
'--no-' prefix (as in --no-chain-reply-to) for boolean options is not
supported in Getopt::Long version 2.32 which was released with Perl 5.8.0.
This version only supports '--no' as in '--nochain-reply-to'. More recent
versions of Getopt::Long, such as version 2.34, support either prefix. So
use the older form in the tests.
Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
---
t/t9001-send-email.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh
index fb51ab3..752adaa 100755
--- a/t/t9001-send-email.sh
+++ b/t/t9001-send-email.sh
@@ -827,7 +827,7 @@ test_expect_success 'no warning with an explicit --no-chain-reply-to' '
--dry-run \
--from="Example <nobody@example.com>" \
--to=nobody@example.com \
- --no-chain-reply-to \
+ --nochain-reply-to \
outdir/000?-*.patch 2>errors >out &&
! grep "no-chain-reply-to" errors
'
--
1.6.5.3
^ permalink raw reply related
* [PATCH 1/2] Makefile: Add a target to generate C preprocessor output files
From: Ramsay Jones @ 2009-12-03 18:11 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Marius Storm-Olsen, Johannes Sixt, GIT Mailing-list
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
---
Whilst fixing an msvc compiler warning (see patch #2), I needed to
look at the output of the c-preprocessor; maybe other people will
find it useful.
ATB,
Ramsay Jones
Makefile | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/Makefile b/Makefile
index 1092589..6c9e8a8 100644
--- a/Makefile
+++ b/Makefile
@@ -1527,6 +1527,8 @@ git.o git.spec \
$(patsubst %.perl,%,$(SCRIPT_PERL)) \
: GIT-VERSION-FILE
+%.i: %.c .ALWAYS
+ $(QUIET_CC)$(CC) -E $(ALL_CFLAGS) $< >$*.i
%.o: %.c GIT-CFLAGS
$(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) $<
%.s: %.c GIT-CFLAGS
@@ -1863,7 +1865,7 @@ endif
.PHONY: all install clean strip
.PHONY: shell_compatibility_test please_set_SHELL_PATH_to_a_more_modern_shell
.PHONY: .FORCE-GIT-VERSION-FILE TAGS tags cscope .FORCE-GIT-CFLAGS
-.PHONY: .FORCE-GIT-BUILD-OPTIONS
+.PHONY: .FORCE-GIT-BUILD-OPTIONS .ALWAYS
### Check documentation
#
--
1.6.5
^ permalink raw reply related
* Re: [LIBGIT2 PATCH] git_odb_open ckeck for valid path to database
From: Ramsay Jones @ 2009-12-03 18:54 UTC (permalink / raw)
To: Esben Mose Hansen; +Cc: ae, git
In-Reply-To: <200911301037.53512.kde@mosehansen.dk>
Esben Mose Hansen wrote:
> On Tuesday 10 November 2009 22:07:04 Esben Mose Hansen wrote:
>> On Monday 09 November 2009 20:16:15 Ramsay Jones wrote:
>>
>> I have made 2 new patchsets: One
>
> Did these get lost in transit? Or am I going about it in the wrong way? :)
Oh, sorry, I didn't notice that this was sent to me! *ahem*
(I thought/expected them to be addressed to Andreas)
Maybe you could resend the first patch, inline rather than as an attachment,
addressed to Andreas (ae@op5.com) so that he can comment on them (or commit
them).
ATB,
Ramsay Jones
^ permalink raw reply
* [RFC PATCH 2/2] MSVC: Fix an "incompatible pointer types" compiler warning
From: Ramsay Jones @ 2009-12-03 18:44 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Marius Storm-Olsen, Johannes Sixt, GIT Mailing-list
In particular, the following warning is issued while compiling
compat/msvc.c:
...mingw.c(223) : warning C4133: 'function' : incompatible \
types - from '_stati64 *' to '_stat64 *'
which relates to a call of _fstati64() in the mingw_fstat()
function definition.
This is caused by various layers of macro magic and attempts to
avoid macro redefinition compiler warnings. For example, the call
to _fstati64() mentioned above is actually a call to _fstat64(),
since macro _USE_32BIT_TIME_T is not defined, and expects a pointer
to a struct _stat64 rather than the struct _stati64 which is passed
to mingw_fstat().
The definition of struct _stati64 given in compat/msvc.h had the
same "shape" as the definition of struct _stat64, so the call to
_fstat64() does not actually cause any runtime errors, but the
structure types are indeed incompatible. Also, the "shape" of
struct _stati64 changes, depending on the _USE_32BIT_TIME_T
macro, since the time_t type is defined as either __time64_t or
__time32_t.
When _USE_32BIT_TIME_T is defined, the call to _fstati64() is
actually a call to _fstat32i64() and expects a struct _stat32i64
pointer parameter. (struct _stati64 would again have the same
"shape" as struct _stat32i64).
The _USE_32BIT_TIME_T macro, along with all of the additional
structure type definitions, function definitions, and overloading
macro magic was introduced in msvc 2005.
In order to avoid the compiler warning, we use the appropriate
structure type names (and function names) from the msvc headers.
This allows us to compile with -D_USE_32BIT_TIME_T if necessary.
Note that the original mingw code should work with an msvc/sdk
prior to 2005. We attempt to detect this by checking for _stati64
being defined as a macro and, if not defined, conditionally
compiling the original code.
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
---
The first version of this patch was much simpler; the diffstat showed
a net decrease of 15 lines of code! The extra fat comes from additions
to the compat/mingw.h file. The original change looked like this (along
with the identical change to compat/msvc.h):
@@ -175,13 +175,21 @@ int mingw_getpagesize(void);
* mingw_fstat() instead of fstat() on Windows.
*/
#define off_t off64_t
-#define stat _stati64
#define lseek _lseeki64
+#if defined(_MSC_VER)
+#define stat _stat64
+#else
+#define stat _stati64
+#endif
int mingw_lstat(const char *file_name, struct stat *buf);
int mingw_fstat(int fd, struct stat *buf);
#define fstat mingw_fstat
#define lstat mingw_lstat
+#if defined(_MSC_VER)
+#define _stat64(x,y) mingw_lstat(x,y)
+#else
#define _stati64(x,y) mingw_lstat(x,y)
+#endif
int mingw_utime(const char *file_name, const struct utimbuf *times);
#define utime mingw_utime
This works with my version of msvc/sdk, provided we have no need to compile
with -D_USE_32BIT_TIME_T. (I was a little concerned when I noticed that the
time_t type was 64-bits; I checked a few of the obvious places to see if this
causes any breakage, but didn't find any).
Also, I added the "&& defined(_stati64)" in the hope that it would work with
older msvc/sdk versions.
The reason for the RFC is:
- maybe we don't need the flexibility of compiling with/without the 32-bit
time_t definition (which *works* BTW) and can revert to the original patch?
- I *think* this will work with older msvc, but I can't test it!
- I've tried to be careful not to break the MinGW build, but again I can't
test it. (I will be shocked if I have ;-)
ATB,
Ramsay Jones
compat/mingw.h | 27 ++++++++++++++++++++++++++-
compat/msvc.h | 25 +------------------------
2 files changed, 27 insertions(+), 25 deletions(-)
diff --git a/compat/mingw.h b/compat/mingw.h
index 5b5258b..98d233b 100644
--- a/compat/mingw.h
+++ b/compat/mingw.h
@@ -175,14 +175,39 @@ int mingw_getpagesize(void);
* mingw_fstat() instead of fstat() on Windows.
*/
#define off_t off64_t
-#define stat _stati64
#define lseek _lseeki64
+
+#if defined(_MSC_VER) && defined(_stati64)
+
+# if defined(_USE_32BIT_TIME_T)
+# define stat _stat32i64
+# else
+# define stat _stat64
+# endif
+
+ int mingw_lstat(const char *file_name, struct stat *buf);
+ int mingw_fstat(int fd, struct stat *buf);
+
+# define fstat mingw_fstat
+# define lstat mingw_lstat
+
+# if defined(_USE_32BIT_TIME_T)
+# define _stat32i64(x,y) mingw_lstat(x,y)
+# else
+# define _stat64(x,y) mingw_lstat(x,y)
+# endif
+
+#else /* !defined(_MSC_VER) || !defined(_stati64) */
+
+#define stat _stati64
int mingw_lstat(const char *file_name, struct stat *buf);
int mingw_fstat(int fd, struct stat *buf);
#define fstat mingw_fstat
#define lstat mingw_lstat
#define _stati64(x,y) mingw_lstat(x,y)
+#endif
+
int mingw_utime(const char *file_name, const struct utimbuf *times);
#define utime mingw_utime
diff --git a/compat/msvc.h b/compat/msvc.h
index 9c753a5..c099fe0 100644
--- a/compat/msvc.h
+++ b/compat/msvc.h
@@ -21,30 +21,7 @@ static __inline int strcasecmp (const char *s1, const char *s2)
}
#undef ERROR
-#undef stat
-#undef _stati64
+
#include "compat/mingw.h"
-#undef stat
-#define stat _stati64
-#define _stat64(x,y) mingw_lstat(x,y)
-/*
- Even though _stati64 is normally just defined at _stat64
- on Windows, we specify it here as a proper struct to avoid
- compiler warnings about macro redefinition due to magic in
- mingw.h. Struct taken from ReactOS (GNU GPL license).
-*/
-struct _stati64 {
- _dev_t st_dev;
- _ino_t st_ino;
- unsigned short st_mode;
- short st_nlink;
- short st_uid;
- short st_gid;
- _dev_t st_rdev;
- __int64 st_size;
- time_t st_atime;
- time_t st_mtime;
- time_t st_ctime;
-};
#endif
--
1.6.5
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox