Re: [PATCH] mailinfo: resolve -Wstring-plus-int warning

2014-09-22 Thread Junio C Hamano
On Mon, Sep 22, 2014 at 11:04 PM, Jeff King wrote: > > I don't mind silencing this one warning (even though I find it a little > ridiculous). I'm slightly concerned that more brain-damage may be coming > our way, but we can deal with that if it ever does. > > Like Junio, I prefer keeping strlen()

Re: [PATCH] mailinfo: resolve -Wstring-plus-int warning

2014-09-22 Thread Jeff King
On Mon, Sep 22, 2014 at 05:10:08PM -0400, Eric Sunshine wrote: > On Mon, Sep 22, 2014 at 1:41 PM, Junio C Hamano wrote: > > Eric Sunshine writes: > > > >> The just-released Apple Xcode 6.0.1 has -Wstring-plus-int enabled by > >> default which complains about pointer arithmetic applied to a strin

[PATCH for-maint] apply: gitdiff_verify_name(): accept "/dev/null\r"

2014-09-22 Thread Laszlo Ersek
The edk2 (EFI Development Kit II) project at uses CRLF line endings. The following small reproducer demonstrates how gitdiff_verify_name() breaks when it meets the usual git patches workflow in combination with CRLF line endings: 1. Prepare the test repo: m

Re: [PATCH v2] archive: support filtering paths with glob

2014-09-22 Thread Duy Nguyen
On Tue, Sep 23, 2014 at 2:15 AM, Junio C Hamano wrote: > When we have a/b/c and a/d/e to be written, the first round would > write a/ and then a/b/ with the above, and presumably elsewhere > somebody will write a/b/c; next time around we do need to write a/d/ > but we wouldn't want to write a/ its

Re: [PATCH v2 22/32] checkout: support checking out into a new working directory

2014-09-22 Thread Eric Sunshine
On Mon, Sep 22, 2014 at 5:00 PM, Marc Branchaud wrote: > On 14-09-21 05:50 AM, Duy Nguyen wrote: >> On Sun, Sep 21, 2014 at 10:10 AM, Eric Sunshine >> wrote: >>> Would it make sense for this "rule of thumb" summary to be presented >>> first, and then the explanation of that rule after, rather th

Re: [PATCH v5 09/35] lockfile.c: document the various states of lock_file objects

2014-09-22 Thread Jonathan Nieder
Michael Haggerty wrote: > I agree with your point about overlap. I will split the documentation > into two parts with less redundancy: > > * Documentation/technical/api-lockfile.txt: How to use the API. > > * lockfile.{c,h}: Internal implementation details. > > I think the implementation details w

Re: [PATCH v2 23/32] prune: strategies for linked checkouts

2014-09-22 Thread Eric Sunshine
On Sun, Sep 21, 2014 at 6:29 AM, Duy Nguyen wrote: > Here we go again. Thanks both for the suggestions. > > -- 8< -- > Subject: [PATCH] prune: strategies for linked checkouts > > (alias R=$GIT_COMMON_DIR/worktrees/) > > - linked checkouts are supposed to keep its location in $R/gitdir up >to

Re: [PATCH] mailinfo: resolve -Wstring-plus-int warning

2014-09-22 Thread Eric Sunshine
On Mon, Sep 22, 2014 at 4:50 PM, Junio C Hamano wrote: > Eric Sunshine writes: > >> however, the solution in this patch allows us drop a couple strlen()s in >> favor of sizeof()s. > > It is actually not a very good justification when you know you care > about the length of the string. A decent c

Re: [PATCH v15 11/11] Documentation: add documentation for 'git interpret-trailers'

2014-09-22 Thread Junio C Hamano
This has quite a few "trailing whitespace" errors in the patch in the documentation part. It would mean that people who try to follow along the examples would have difficult time deciphering where trailing whitespaces are necessary. For example > +* Configure a commit template with some trailers

Re: How to compile Git with NDK?

2014-09-22 Thread Stefan Beller
On 22.09.2014 21:04, Robert Dailey wrote: > I run the following on Ubuntu: > > fe@BLD01:~/code/git$ autoconf > fe@BLD01:~/code/git$ ./configure --prefix=/home/fe/git-arm > --build=x86_64-linux-gnu --host=arm-linux-androideabi > configure: Setting lib to 'lib' (the default) > configure: Will try -p

Re: [PATCH] mailinfo: resolve -Wstring-plus-int warning

2014-09-22 Thread Eric Sunshine
On Mon, Sep 22, 2014 at 1:41 PM, Junio C Hamano wrote: > Eric Sunshine writes: > >> The just-released Apple Xcode 6.0.1 has -Wstring-plus-int enabled by >> default which complains about pointer arithmetic applied to a string >> literal: >> >> builtin/mailinfo.c:303:24: warning: >> add

Re: [PATCH v2 28/32] gc: support prune --worktrees

2014-09-22 Thread Marc Branchaud
On 14-09-21 06:43 AM, Duy Nguyen wrote: > And this is the update as suggested in 23/32 [1] > > [1] http://thread.gmane.org/gmane.comp.version-control.git/256210/focus=256849 Looks good! FWIW: Signed-off-by: Marc Branchaud M. > -- 8< -- > Subject: [PATCH] gc: support prune --w

Re: [PATCH v2 23/32] prune: strategies for linked checkouts

2014-09-22 Thread Marc Branchaud
On 14-09-21 06:29 AM, Duy Nguyen wrote: > Here we go again. Thanks both for the suggestions. The documentation looks good to me. FWIW: Signed-off-by: Marc Branchaud M. > -- 8< -- > Subject: [PATCH] prune: strategies for linked checkouts > > (alias R=$GIT_COMMON_DIR/worktrees/

Re: [PATCH v2 22/32] checkout: support checking out into a new working directory

2014-09-22 Thread Marc Branchaud
On 14-09-21 05:50 AM, Duy Nguyen wrote: > On Sun, Sep 21, 2014 at 10:10 AM, Eric Sunshine > wrote: >> Would it make sense for this "rule of thumb" summary to be presented >> first, and then the explanation of that rule after, rather than the >> reverse as is currently the case? > > You mean like

Re: [PATCH] mailinfo: resolve -Wstring-plus-int warning

2014-09-22 Thread Junio C Hamano
Eric Sunshine writes: > however, the solution in this patch allows us drop a couple strlen()s in > favor of sizeof()s. It is actually not a very good justification when you know you care about the length of the string. A decent compiler ought to know the length of a constant string can be compu

Re: [PATCH] sha1_file: don't convert off_t to size_t too early to avoid potential die()

2014-09-22 Thread Junio C Hamano
Steffen Prohaska writes: > This patch should be applied on top of sp/stream-clean-filter. ... or it can be squashed in as a fix, as the topic is not yet in 'next'. > index_stream() might internally also be able to handle large files to > some extent. But it uses size_t for its third argument,

Re: [PATCH] Documentation/git-rebase.txt: discuss --fork-point assumption of vanilla "git rebase" in DESCRIPTION.

2014-09-22 Thread Junio C Hamano
Sergey Organov writes: > Vanilla "git rebase" defaults to --fork-point that in some cases > makes behavior very different from "git rebase ", > where --no-fork-point is assumed. This fact was not mentioned in > the DESCRIPTION section of the manual page, even though the case of > omitted was oth

Re: [PATCH v2] archive: support filtering paths with glob

2014-09-22 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > +static void queue_directory(const unsigned char *sha1, > + const char *base, int baselen, const char *filename, > + unsigned mode, int stage, struct archiver_context *c) > +{ > + struct directory *d; > + d = xmallocz(sizeof(*d) + ba

How to compile Git with NDK?

2014-09-22 Thread Robert Dailey
I run the following on Ubuntu: fe@BLD01:~/code/git$ autoconf fe@BLD01:~/code/git$ ./configure --prefix=/home/fe/git-arm --build=x86_64-linux-gnu --host=arm-linux-androideabi configure: Setting lib to 'lib' (the default) configure: Will try -pthread then -lpthread to enable POSIX Threads. configure

[PATCH] mingw.h: add dummy functions for sigset_t operations

2014-09-22 Thread Johannes Sixt
Windows does not have POSIX-like signals, and so we ignore all operations on the non-existent signal mask machinery. Do not turn sigemptyset into a function, but leave it a macro that erases the code in the argument because it is used to set sa_mask of a struct sigaction, but our dummy in mingw.h

[Bug] Query string not being phrased correctly when question marks present in config URL.

2014-09-22 Thread Steven Lawler
Cause: [remote "repo"] url = http://example.com/git/example.com?foo=bar There is a question mark in the URL of the repo URL. Effect (Taken from Apache logs): [22/Sep/2014:14:12:07 -0400] "GET /git/example.com?foo=bar/info/refs&service=git-receive-pack HTTP/1.1" 403 207 "-" "git/1.9.4.msysgit.1"

Re: [PATCH RFC] git-am: support any number of signatures

2014-09-22 Thread Junio C Hamano
"Michael S. Tsirkin" writes: > Hi Junio, Christian, > it's been a while. > I see that the work on trailers is going on. > I tried going over the documentation but I could not figure > out how would one implement multiple signatures using the > trailers mechanism. Good. Christian has been reroll

Re: [PATCH] sha1_file: don't convert off_t to size_t too early to avoid potential die()

2014-09-22 Thread Junio C Hamano
Steffen Prohaska writes: > xsize_t() checks if an off_t argument can be safely converted to > a size_t return value. If the check is executed too early, it could > fail for large files on 32-bit architectures even if the size_t code > path is not taken. Other paths might be able to handle the l

Re: [PATCH] mailinfo: resolve -Wstring-plus-int warning

2014-09-22 Thread Junio C Hamano
Eric Sunshine writes: > The just-released Apple Xcode 6.0.1 has -Wstring-plus-int enabled by > default which complains about pointer arithmetic applied to a string > literal: > > builtin/mailinfo.c:303:24: warning: > adding 'long' to a string does not append to the string >

Re: Bug/request: the empty string should be a valid git note

2014-09-22 Thread Junio C Hamano
"Kyle J. McKay" writes: > On Sep 20, 2014, at 18:44, Johan Herland wrote: > >> At least, we should fix >> >>git notes add -C e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 >> >> Whether we should also change >> >>git notes add -m '' >> >> to create an empty note, or leave it as-is, (i.e. simila

Re: [PATCH] notes: accept any ref for merge

2014-09-22 Thread Junio C Hamano
Johan Herland writes: >> Assuming that this is we all agree to go in that direction, let's >> make a list of things to be done to codify it, and do them. For a >> starter, I think these are needed, perhaps? >> ... > Sounds good to me. At least that would ... > ... > In addition to that we might

Re: [PATCH v2] unblock and unignore SIGPIPE

2014-09-22 Thread Junio C Hamano
Johannes Sixt writes: >> +static void restore_sigpipe_to_default(void) >> +{ >> +sigset_t unblock; >> + >> +sigemptyset(&unblock); >> +sigaddset(&unblock, SIGPIPE); >> +sigprocmask(SIG_UNBLOCK, &unblock, NULL); >> +signal(SIGPIPE, SIG_DFL); >> +} > > This does not build on Min

Re: Branching workflow

2014-09-22 Thread Javier Domingo Cansino
Hello!, I have been using this workflow you suggested, and I happen to find it really good fitting in many projects I am. I would like to seek for a little more advice. I keep rebasing all my work each time master branch is updated, and I would like to know if this is usually done or not. The wo

Re: [PATCH v5 09/35] lockfile.c: document the various states of lock_file objects

2014-09-22 Thread Michael Haggerty
On 09/16/2014 11:03 PM, Jonathan Nieder wrote: > Michael Haggerty wrote: > >> --- a/lockfile.c >> +++ b/lockfile.c >> @@ -4,6 +4,63 @@ >> #include "cache.h" >> #include "sigchain.h" >> >> +/* >> + * File write-locks as used by Git. >> + * >> + * When a file at $FILENAME needs to be written, it i

Re: [PATCH v5 10/35] cache.h: define constants LOCK_SUFFIX and LOCK_SUFFIX_LEN

2014-09-22 Thread Michael Haggerty
On 09/16/2014 11:05 PM, Jonathan Nieder wrote: > Michael Haggerty wrote: > >> There are a few places that use these values, so define constants for >> them. > > Seems like a symptom of the API leaving out a useful helper (e.g., > something that strips off the lock suffix and returns a memdupz'd >

Re: [PATCH v5 02/35] api-lockfile: expand the documentation

2014-09-22 Thread Michael Haggerty
On 09/16/2014 10:25 PM, Jonathan Nieder wrote: > Michael Haggerty wrote: > >> Document a couple more functions and the flags argument as used by >> hold_lock_file_for_update() and hold_lock_file_for_append(). > > Thanks. > > [...] >> --- a/Documentation/technical/api-lockfile.txt >> +++ b/Docume

Re: [PATCH RFC] git-am: support any number of signatures

2014-09-22 Thread Michael S. Tsirkin
On Wed, Jun 18, 2014 at 10:51:04AM -0700, Junio C Hamano wrote: > Junio C Hamano writes: > > > On Tue, Jun 17, 2014 at 8:09 PM, Michael S. Tsirkin wrote: > >> > >> OK, after looking into this for a while, I realize > >> this is a special property of the Signed-off-by footer. > >> For now I think

Re: [Bug] git status -unormal -- 'foo[b]/' won't display content of 'foo[b]/

2014-09-22 Thread Duy Nguyen
On Mon, Sep 22, 2014 at 8:24 AM, Duy Nguyen wrote: > On Mon, Sep 22, 2014 at 2:52 AM, Torsten Bögershausen wrote: >> git status takes a "pathspec" as a parameter, which is not the same as a >> filename. >> A pathspec can contain wildcards like '*' or '?' or things like "*[ch]". >> This is known