Re: [PATCH 2/2] ewah: use less generic macro name

2015-06-02 Thread Eric Sunshine
On Wed, Jun 3, 2015 at 2:39 AM, Jeff King wrote: > The ewah/ewok.h header pollutes the global namespace with > "BITS_IN_WORD", without any specific notion that we are > talking about the bits in an eword_t. We can give this the > more specific name "BITS_IN_EWORD". > > Signed-off-by: Jeff King Y

[PATCH v2 05/19] pull: implement fetch + merge

2015-06-02 Thread Paul Tan
Implement the fetch + merge functionality of git-pull, by first running git-fetch with the repo and refspecs provided on the command line, then running git-merge on FETCH_HEAD to merge the fetched refs into the current branch. Signed-off-by: Paul Tan --- builtin/pull.c | 61 +

[PATCH v2 04/19] pull: implement skeletal builtin pull

2015-06-02 Thread Paul Tan
For the purpose of rewriting git-pull.sh into a C builtin, implement a skeletal builtin/pull.c that redirects to $GIT_EXEC_PATH/git-pull.sh if the environment variable _GIT_USE_BUILTIN_PULL is not defined. This allows us to fall back on the functional git-pull.sh when running the test suite for tes

[PATCH v2 16/19] pull: configure --rebase via branch..rebase or pull.rebase

2015-06-02 Thread Paul Tan
Since cd67e4d (Teach 'git pull' about --rebase, 2007-11-28), fetch+rebase could be set by default by defining the config variable branch..rebase. This setting can be overriden on the command line by --rebase and --no-rebase. Since 6b37dff (pull: introduce a pull.rebase option to enable --rebase, 2

[PATCH v2 13/19] pull: implement pulling into an unborn branch

2015-06-02 Thread Paul Tan
b4dc085 (pull: merge into unborn by fast-forwarding from empty tree, 2013-06-20) established git-pull's current behavior of pulling into an unborn branch by fast-forwarding the work tree from an empty tree to the merge head, then setting HEAD to the merge head. Re-implement this behavior by introd

[PATCH v2 06/19] pull: pass verbosity, --progress flags to fetch and merge

2015-06-02 Thread Paul Tan
7f87aff (Teach/Fix pull/fetch -q/-v options, 2008-11-15) taught git-pull to accept the verbosity -v and -q options and pass them to git-fetch and git-merge. Re-implement support for the verbosity flags by adding it to the options list and introducing argv_push_verbosity() to push the flags into th

[PATCH v2 14/19] pull: set reflog message

2015-06-02 Thread Paul Tan
f947413 (Use GIT_REFLOG_ACTION environment variable instead., 2006-12-28) established git-pull's method for setting the reflog message, which is to set the environment variable GIT_REFLOG_ACTION to the evaluation of "pull${1+ $*}" if it has not already been set. Re-implement this behavior. Helped

[PATCH v2 15/19] pull: teach git pull about --rebase

2015-06-02 Thread Paul Tan
Since cd67e4d (Teach 'git pull' about --rebase, 2007-11-28), if the --rebase option is set, git-rebase is run instead of git-merge. Re-implement this by introducing run_rebase(), which is called instead of run_merge() if opt_rebase is a true value. Since c85c792 (pull --rebase: be cleverer with r

[PATCH v2 18/19] pull --rebase: error on no merge candidate cases

2015-06-02 Thread Paul Tan
Tweak the error messages printed by die_no_merge_candidates() to take into account that we may be "rebasing against" rather than "merging with". Signed-off-by: Paul Tan --- Notes: v2 * Decided to use fprintf_ln() for the sake of code consistency, and for the added trailing new

[PATCH v2 17/19] pull --rebase: exit early when the working directory is dirty

2015-06-02 Thread Paul Tan
Re-implement the behavior introduced by f9189cf (pull --rebase: exit early when the working directory is dirty, 2008-05-21). Signed-off-by: Paul Tan --- builtin/pull.c | 77 +- 1 file changed, 76 insertions(+), 1 deletion(-) diff --git a/b

[PATCH v2 08/19] pull: pass git-fetch's options to git-fetch

2015-06-02 Thread Paul Tan
Since eb2a8d9 (pull: handle git-fetch's options as well, 2015-06-02), git-pull knows about and handles git-fetch's options, passing them to git-fetch. Re-implement this behavior. Since 29609e6 (pull: do nothing on --dry-run, 2010-05-25) git-pull supported the --dry-run option, exiting after git-fe

Re: [PATCH] ewah/bitmap: silence warning about MASK macro redefinition

2015-06-02 Thread Junio C Hamano
On Tue, Jun 2, 2015 at 11:28 PM, Eric Sunshine wrote: > On Wed, Jun 3, 2015 at 12:51 AM, Jeff King wrote: >> --- >> I'm also happy to split it into two patches, and make Eric the author on >> the MASK part. > > I don't mind being an author of a patch, so splitting works for me, OK, then let's ha

[PATCH v2 12/19] pull: fast-forward working tree if head is updated

2015-06-02 Thread Paul Tan
Since b10ac50 (Fix pulling into the same branch., 2005-08-25), git-pull, upon detecting that git-fetch updated the current head, will fast-forward the working tree to the updated head commit. Re-implement this behavior. Signed-off-by: Paul Tan --- builtin/pull.c | 30 +++

[PATCH v2 11/19] pull: check if in unresolved merge state

2015-06-02 Thread Paul Tan
Since d38a30d (Be more user-friendly when refusing to do something because of conflict., 2010-01-12), git-pull will error out with user-friendly advices if the user is in the middle of a merge or has unmerged files. Re-implement this behavior. While the "has unmerged files" case can be handled by

[PATCH v2 03/19] argv-array: implement argv_array_pushv()

2015-06-02 Thread Paul Tan
When we have a null-terminated array, it would be useful to convert it or append it to an argv_array for further manipulation. Implement argv_array_pushv() which will push a null-terminated array of strings on to an argv_array. Signed-off-by: Paul Tan --- Documentation/technical/api-argv-array.

[PATCH v2 07/19] pull: pass git-merge's options to git-merge

2015-06-02 Thread Paul Tan
Specify git-merge's options in the option list, and pass any specified options to git-merge. These options are: * -n, --stat, --summary: since d8abe14 (merge, pull: introduce '--(no-)stat' option, 2008-04-06) * --log: since efb779f (merge, pull: add '--(no-)log' command line option, 2008-04-

[PATCH v2 09/19] pull: error on no merge candidates

2015-06-02 Thread Paul Tan
Commit a8c9bef (pull: improve advice for unconfigured error case, 2009-10-05) fully established the current advices given by git-pull for the different cases where git-fetch will not have anything marked for merge: 1. We fetched from a specific remote, and a refspec was given, but it ended up n

[PATCH v2 19/19] pull: remove redirection to git-pull.sh

2015-06-02 Thread Paul Tan
At the beginning of the rewrite of git-pull.sh to C, we introduced a redirection to git-pull.sh if the environment variable _GIT_USE_BUILTIN_PULL was not defined in order to not break test scripts that relied on a functional git-pull. Now that all of git-pull's functionality has been re-implemente

[PATCH v2 10/19] pull: support pull.ff config

2015-06-02 Thread Paul Tan
Since b814da8 (pull: add pull.ff configuration, 2014-01-15), git-pull.sh would lookup the configuration value of "pull.ff", and set the flag "--ff" if its value is "true", "--no-ff" if its value is "false" and "--ff-only" if its value is "only". Re-implement this behavior. Signed-off-by: Paul Tan

[PATCH v2 01/19] parse-options-cb: implement parse_opt_pass_strbuf()

2015-06-02 Thread Paul Tan
Certain git commands, such as git-pull, are simply wrappers around other git commands like git-fetch, git-merge and git-rebase. As such, these wrapper commands will typically need to "pass through" command-line options of the commands they wrap. Implement the parse_opt_pass_strbuf() parse-options

[PATCH v2 00/19] Make git-pull a builtin

2015-06-02 Thread Paul Tan
This is a re-roll of [v1]. Thanks Johannes, Stefan and Junio for the reviews last round. Previous versions: [v1] http://thread.gmane.org/gmane.comp.version-control.git/269258 git-pull is a commonly executed command to check for new changes in the upstream repository and, if there are, fetch and

[PATCH v2 02/19] parse-options-cb: implement parse_opt_pass_argv_array()

2015-06-02 Thread Paul Tan
Certain git commands, such as git-pull, are simply wrappers around other git commands like git-fetch, git-merge and git-rebase. As such, these wrapper commands will typically need to "pass through" command-line options of the commands they wrap. Implement the parse_opt_pass_argv_array() parse-opti

Re: Minor bug report

2015-06-02 Thread Junio C Hamano
On Tue, Jun 2, 2015 at 11:20 PM, Jeff King wrote: > > Here are some prior discussions: > > http://thread.gmane.org/gmane.comp.version-control.git/75692 > > http://thread.gmane.org/gmane.comp.version-control.git/200504 > > I just skimmed through them, but I expect the most desirable solution >

Re: [PATCH 1/2] ewah/bitmap: silence warning about MASK macro redefinition

2015-06-02 Thread Eric Sunshine
On Wed, Jun 3, 2015 at 2:39 AM, Jeff King wrote: > From: Eric Sunshine > > On PowerPC Mac OS X (10.5.8 "Leopard" with Xcode 3.1), > system header /usr/include/ppc/param.h[1] pollutes the > preprocessor namespace with a macro generically named MASK. > This conflicts with the same-named macro in ew

Re: [PATCH/RFCv3 2/2] git rebase -i: warn about removed commits

2015-06-02 Thread Matthieu Moy
Remi Galan Alfonso writes: > Checking that the warning was correctly displayed like in the test for > "warn" if I understood correctly. About that, is checking that the > first line is "Warning: some commits may have been dropped > accidentally." (like in the test for "warn") enough, or should I

[PATCH 2/2] ewah: use less generic macro name

2015-06-02 Thread Jeff King
The ewah/ewok.h header pollutes the global namespace with "BITS_IN_WORD", without any specific notion that we are talking about the bits in an eword_t. We can give this the more specific name "BITS_IN_EWORD". Signed-off-by: Jeff King --- ewah/bitmap.c | 12 ++-- ewah/ewah_bitmap.c |

[PATCH 1/2] ewah/bitmap: silence warning about MASK macro redefinition

2015-06-02 Thread Jeff King
From: Eric Sunshine On PowerPC Mac OS X (10.5.8 "Leopard" with Xcode 3.1), system header /usr/include/ppc/param.h[1] pollutes the preprocessor namespace with a macro generically named MASK. This conflicts with the same-named macro in ewah/bitmap.c. We can avoid this conflict by using a more speci

Re: [PATCH] ewah/bitmap: silence warning about MASK macro redefinition

2015-06-02 Thread Jeff King
On Wed, Jun 03, 2015 at 02:28:10AM -0400, Eric Sunshine wrote: > On Wed, Jun 3, 2015 at 12:51 AM, Jeff King wrote: > > Subject: [PATCH] ewah: use less generic macro names > > > > The ewah/ewok.h header pollutes the global namespace with > > "BITS_IN_WORD", without any specific notion that we are

Re: [PATCH] ewah/bitmap: silence warning about MASK macro redefinition

2015-06-02 Thread Eric Sunshine
On Wed, Jun 3, 2015 at 12:51 AM, Jeff King wrote: > Subject: [PATCH] ewah: use less generic macro names > > The ewah/ewok.h header pollutes the global namespace with > "BITS_IN_WORD", without any specific notion that we are > talking about the bits in an eword_t. We can give this the > more specif

Re: Minor bug report

2015-06-02 Thread Jeff King
On Wed, Jun 03, 2015 at 11:24:19AM +0530, Tummala Dhanvi wrote: > When we do create a new empty git repo using git init or create a > orphan branch and do a git log then I am getting an error saying that > fatal: bad default revision 'HEAD' > > Well the error should have been something like no co

Minor bug report

2015-06-02 Thread Tummala Dhanvi
When we do create a new empty git repo using git init or create a orphan branch and do a git log then I am getting an error saying that fatal: bad default revision 'HEAD' Well the error should have been something like no commits to show either the branch is orphan / you didn't make any commits in

Re: [PATCH/RFC v3 2/4] git-am.txt: add configuration section in git am documentation

2015-06-02 Thread Torsten Bögershausen
On 06/02/2015 07:34 PM, Remi Lespinet wrote: [] Signed-off-by: Remi Lespinet --- Documentation/git-am.txt | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/Documentation/git-am.txt b/Documentation/git-am.txt index 0d8ba48..d412f6b 100644 --- a/Documentation

Re: [PATCH] ewah/bitmap: silence warning about MASK macro redefinition

2015-06-02 Thread Jeff King
On Tue, Jun 02, 2015 at 03:15:09PM -0700, Junio C Hamano wrote: > > The alternative is to rename MASK in ewah/bitmap.c to something less > > generic, resulting in a slightly more noisy patch. I chose the #undef > > approach since it's a relatively common idiom to #undef a macro before > > #definin

Re: [PATCH] pull: allow dirty tree when rebase.autostash enabled

2015-06-02 Thread Paul Tan
Hi, Some comments which may not necessarily be correct. On Wed, Jun 3, 2015 at 5:55 AM, Kevin Daudt wrote: > rebase learned to stash changes when it encounters a dirty work tree, but > git pull --rebase does not. > > Only verify if the working tree is dirty when rebase.autostash is not > enabled

Re: [PATCH v2 0/2] auto-detect getdelim()

2015-06-02 Thread Jeff King
On Tue, Jun 02, 2015 at 05:15:42PM -0400, Eric Sunshine wrote: > This series updates config.mak.uname to define HAVE_GETDELIM on Mac OS X > when appropriate, and adds a configure check for the same. > > Changes since v1[1]: > > patch 1/2 -- optimize OS X version recognition: > > * Use `...` for

Re: Git: How to keep multiple bare repos in sync?

2015-06-02 Thread David Lang
On Wed, 3 Jun 2015, chenxitwo wrote: Hi Konrad Scherer, Thanks for your reply. But git mirror is helpless for me. I have an idea about two repos' sync. However there is a problem with this is how to prevent other usrs' push operation. Details as follows:

Re: Git: How to keep multiple bare repos in sync?

2015-06-02 Thread chenxitwo
Hi Konrad Scherer, Thanks for your reply. But git mirror is helpless for me. I have an idea about two repos' sync. However there is a problem with this is how to prevent other usrs' push operation. Details as follows: Team A, B have their own git server

Re: [RFCv2 14/16] t5544: add a test case for the new protocol

2015-06-02 Thread Eric Sunshine
On Mon, Jun 1, 2015 at 8:02 PM, Stefan Beller wrote: > Signed-off-by: Stefan Beller > --- > diff --git a/t/t5544-fetch-2.sh b/t/t5544-fetch-2.sh > new file mode 100755 > index 000..beee46c > --- /dev/null > +++ b/t/t5544-fetch-2.sh > @@ -0,0 +1,40 @@ > +#!/bin/sh > +# > +# Copyright (c) 2015

What's cooking in git.git (Jun 2015, #01; Tue, 2)

2015-06-02 Thread Junio C Hamano
Here are the topics that have been cooking. Commits prefixed with '-' are only in 'pu' (proposed updates) while commits prefixed with '+' are in 'next'. You can find the changes described here in the integration branches of the repositories listed at http://git-blame.blogspot.com/p/git-publi

Re: Not a BUG: For first push to a bare repo, using "--tags" prevents creation of master branch

2015-06-02 Thread Junio C Hamano
Matthieu Moy writes: > Junio C Hamano writes: > >> I recall "fetch --tags" was updated to become your "--tags-also" by >> e66ef7ae (Merge branch 'mh/fetch-tags-in-addition-to-normal-refs', >> 2013-12-12). Perhaps we should do the same on the push side. > > Would we still have a way to push tags

Re: [RFCv2 04/16] upload-pack-2: Implement the version 2 of upload-pack

2015-06-02 Thread Stefan Beller
On Tue, Jun 2, 2015 at 11:59 AM, Junio C Hamano wrote: > Stefan Beller writes: > >> Subject: [RFCv2 04/16] upload-pack-2: Implement the version 2 of upload-pack > > Nit; s/I/i/, to match others in the series, I think. > >> In upload-pack-2 we send each capability in its own packet buffer. >> >> S

Re: [RFCv2 10/16] transport: connect_setup appends protocol version number

2015-06-02 Thread Junio C Hamano
Stefan Beller writes: >> Hmph, so everybody else thinks it is interacting with 'upload-pack', >> and this is the only function that knows it is actually talking with >> 'upload-pack-2'? > > Yes. >> >> I am wondering why there isn't a separate helper function that >> munges data->options.{uploadpa

Re: [RFCv2 12/16] transport: get_refs_via_connect exchanges capabilities before refs.

2015-06-02 Thread Stefan Beller
On Tue, Jun 2, 2015 at 2:55 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> Signed-off-by: Stefan Beller >> --- >> >> Notes: >> A minor issue I am unsure about here is the >> line >> && transport->smart_options->transport_version) >> which could be prevented if we always

Re: [PATCH] ewah/bitmap: silence warning about MASK macro redefinition

2015-06-02 Thread Junio C Hamano
Eric Sunshine writes: > On PowerPC Mac OS X (10.5.8 "Leopard" with Xcode 3.1), system header > /usr/include/ppc/param.h[1] pollutes the preprocessor namespace with a > macro generically named MASK. This conflicts with the same-named macro > in ewah/bitmap.c. > > [1]: Included indirectly via: >

Re: [RFCv2 10/16] transport: connect_setup appends protocol version number

2015-06-02 Thread Stefan Beller
On Tue, Jun 2, 2015 at 2:37 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> Signed-off-by: Stefan Beller >> --- >> >> Notes: >> name it to_free >> >> transport.c | 17 +++-- >> 1 file changed, 15 insertions(+), 2 deletions(-) >> >> diff --git a/transport.c b/transport.c >

Re: [RFCv2 15/16] Documentation/technical/pack-protocol: Mention http as possible protocol

2015-06-02 Thread Junio C Hamano
Junio C Hamano writes: > Stefan Beller writes: > >> Signed-off-by: Stefan Beller >> --- >> >> This may go unrelated to this series as well. > > Yeah, this can come before this series as a good independent > clean-up. I'll pick this up and queue (with s/: Mention/: mention/) separately for 'nex

Re: [RFCv2 15/16] Documentation/technical/pack-protocol: Mention http as possible protocol

2015-06-02 Thread Junio C Hamano
Stefan Beller writes: > Signed-off-by: Stefan Beller > --- > > This may go unrelated to this series as well. Yeah, this can come before this series as a good independent clean-up. > > Documentation/technical/pack-protocol.txt | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > d

Re: [RFCv2 12/16] transport: get_refs_via_connect exchanges capabilities before refs.

2015-06-02 Thread Junio C Hamano
Stefan Beller writes: > Signed-off-by: Stefan Beller > --- > > Notes: > A minor issue I am unsure about here is the > line > && transport->smart_options->transport_version) > which could be prevented if we always set the transport_version > in make_remote to be the default

[PATCH] pull: allow dirty tree when rebase.autostash enabled

2015-06-02 Thread Kevin Daudt
rebase learned to stash changes when it encounters a dirty work tree, but git pull --rebase does not. Only verify if the working tree is dirty when rebase.autostash is not enabled. --- git-pull.sh | 5 - t/t5520-pull.sh | 17 + 2 files changed, 21 insertions(+), 1 deletio

[PATCH] ewah/bitmap: silence warning about MASK macro redefinition

2015-06-02 Thread Eric Sunshine
On PowerPC Mac OS X (10.5.8 "Leopard" with Xcode 3.1), system header /usr/include/ppc/param.h[1] pollutes the preprocessor namespace with a macro generically named MASK. This conflicts with the same-named macro in ewah/bitmap.c. [1]: Included indirectly via: git-compat-util.h -> sys/sysc

Re: [RFCv2 11/16] remote: have preselect_capabilities

2015-06-02 Thread Junio C Hamano
Stefan Beller writes: > Signed-off-by: Stefan Beller > --- Why? When adding a new thing that nobody uses yet, please explain what it is used for and how it would help the callers in what way to help reviewers. > connect.c | 28 > remote.h | 1 + > 2 files chang

Re: [RFCv2 06/16] remote.h: add new struct for options

2015-06-02 Thread Junio C Hamano
Stefan Beller writes: > On Tue, Jun 2, 2015 at 2:18 PM, Junio C Hamano wrote: >> Why? >> > > To have all options required for selecting the capabilities > together in one struct. No need to explain in the e-mail, as that won't be kept in our history, unless you write it in your reroll. Just ke

Re: [RFCv2 05/16] remote.h: Change get_remote_heads return to void

2015-06-02 Thread Junio C Hamano
Stefan Beller writes: > On Tue, Jun 2, 2015 at 2:17 PM, Junio C Hamano wrote: >> Stefan Beller writes: >> >>> No function uses the return value of get_remote_heads, so we don't want >>> to confuse readers by it. >>> >>> Signed-off-by: Stefan Beller >>> --- >> >> This is somewhat a sad change,

Re: [RFCv2 06/16] remote.h: add new struct for options

2015-06-02 Thread Stefan Beller
On Tue, Jun 2, 2015 at 2:18 PM, Junio C Hamano wrote: > Why? > To have all options required for selecting the capabilities together in one struct. Currently there are independent variables used in a few places for this (fetchpack.c: lines 296 - 309, which is where I also got the formatting from)

Re: [RFCv2 10/16] transport: connect_setup appends protocol version number

2015-06-02 Thread Junio C Hamano
Stefan Beller writes: > Signed-off-by: Stefan Beller > --- > > Notes: > name it to_free > > transport.c | 17 +++-- > 1 file changed, 15 insertions(+), 2 deletions(-) > > diff --git a/transport.c b/transport.c > index 651f0ac..b49fc60 100644 > --- a/transport.c > +++ b/transport

Re: [RFCv2 05/16] remote.h: Change get_remote_heads return to void

2015-06-02 Thread Stefan Beller
On Tue, Jun 2, 2015 at 2:17 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> No function uses the return value of get_remote_heads, so we don't want >> to confuse readers by it. >> >> Signed-off-by: Stefan Beller >> --- > > This is somewhat a sad change, as the returned value is designed t

Re: [RFCv2 09/16] remote.h: add get_remote_capabilities, request_capabilities

2015-06-02 Thread Junio C Hamano
Stefan Beller writes: > Instead of calling get_remote_heads as a first command during the > protocol exchange, we need to have fine grained control over the > capability negotiation in version 2 of the protocol. > > Introduce get_remote_capabilities, which will just listen to > capabilities of th

Re: [RFCv2 06/16] remote.h: add new struct for options

2015-06-02 Thread Junio C Hamano
Stefan Beller writes: > Signed-off-by: Stefan Beller > --- Why? > remote.h | 14 ++ > 1 file changed, 14 insertions(+) > > diff --git a/remote.h b/remote.h > index d5242b0..16cacfe 100644 > --- a/remote.h > +++ b/remote.h > @@ -56,6 +56,20 @@ struct remote { > char *http_pro

Re: [RFCv2 05/16] remote.h: Change get_remote_heads return to void

2015-06-02 Thread Junio C Hamano
Stefan Beller writes: > No function uses the return value of get_remote_heads, so we don't want > to confuse readers by it. > > Signed-off-by: Stefan Beller > --- This is somewhat a sad change, as the returned value is designed to be useful if caller wants to continue appending to the list. No

[PATCH v2 0/2] auto-detect getdelim()

2015-06-02 Thread Eric Sunshine
This series updates config.mak.uname to define HAVE_GETDELIM on Mac OS X when appropriate, and adds a configure check for the same. Changes since v1[1]: patch 1/2 -- optimize OS X version recognition: * Use `...` for 'expr' invocation to extract digits from $(uname_R), thus only a fork(), rath

[PATCH v2 2/2] configure: add getdelim() check

2015-06-02 Thread Eric Sunshine
As an optimization, strbuf will take advantage of getdelim() if available, so add a configure check which defines HAVE_GETDELIM if found. Signed-off-by: Eric Sunshine --- configure.ac | 6 ++ 1 file changed, 6 insertions(+) diff --git a/configure.ac b/configure.ac index bbdde85..14012fa 100

[PATCH v2 1/2] config.mak.uname: Darwin: define HAVE_GETDELIM for modern OS X releases

2015-06-02 Thread Eric Sunshine
On Mac OS X, getdelim() first became available with Xcode 4.1[1], which was released the same day as OS X 10.7 "Lion", so assume getdelim() availability from 10.7 onward. (As of this writing, OS X is at 10.10 "Yosemite".) According to Wikipedia[2], 4.1 was also available for download by paying dev

Re: [PATCH v2 3/3] read_loose_refs(): treat NULL_SHA1 loose references as broken

2015-06-02 Thread Michael Haggerty
On 06/02/2015 07:28 PM, Stefan Beller wrote: > On Tue, Jun 2, 2015 at 8:57 AM, Michael Haggerty wrote: >> NULL_SHA1 is never a valid value for a reference. If a loose reference >> has that value, mark it as broken. >> >> Why check NULL_SHA1 and not the nearly 2^160 other SHA-1s that are >> also in

Re: [PATCH v2 0/2] Improve git-pull's option parsing

2015-06-02 Thread Junio C Hamano
Paul Tan writes: > However, certain functions in git-pull assume that the positional > parameters do not contain any options. Fix this by making git-pull > handle git-fetch's options as well at the option parsing stage. Good. -- To unsubscribe from this list: send the line "unsubscribe git" in t

Re: [PATCH/RFC v3 1/4] git-am.sh: fix initialization of the threeway variable

2015-06-02 Thread Junio C Hamano
Overall this round looks sensible, modulo minor nits. Thanks. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH/RFC v3 4/4] git-am: add am.threeWay config variable

2015-06-02 Thread Junio C Hamano
Remi Lespinet writes: > diff --git a/Documentation/git-am.txt b/Documentation/git-am.txt > index d412f6b..0472182 100644 > --- a/Documentation/git-am.txt > +++ b/Documentation/git-am.txt > ... > +am.threeWay:: > + By default, git-am will fail if the patch does not apply cleanly. When > +

Re: [PATCH 1/2] config.mak.uname: Darwin: define HAVE_GETDELIM for modern OS X releases

2015-06-02 Thread Eric Sunshine
On Tue, Jun 2, 2015 at 4:01 PM, Jeff King wrote: > On Tue, Jun 02, 2015 at 03:57:44PM -0400, Eric Sunshine wrote: > >> > Oops, I missed the trailing '.' in the regex there, and it probably >> > needs double-quotes in case the inner expr fails to match anything. >> >> Which is messy considering the

Re: [PATCH/RFC v3 2/4] git-am.txt: add configuration section in git am documentation

2015-06-02 Thread Junio C Hamano
Remi Lespinet writes: > Prepare a configuration section for the git am documentation. > Remove the part related to the am.keepcr configuration variable in the > description of the --keepcr option and place the description of the > am.keepcr configuration variable in the newly created configuratio

Re: [PATCH v2 3/3] read_loose_refs(): treat NULL_SHA1 loose references as broken

2015-06-02 Thread Junio C Hamano
Michael Haggerty writes: > NULL_SHA1 is never a valid value for a reference. If a loose reference > has that value, mark it as broken. > > Why check NULL_SHA1 and not the nearly 2^160 other SHA-1s that are > also invalid in a given repository? Because (a) it is cheap to test > for NULL_SHA1, and

Re: [PATCH 1/2] config.mak.uname: Darwin: define HAVE_GETDELIM for modern OS X releases

2015-06-02 Thread Jeff King
On Tue, Jun 02, 2015 at 03:57:44PM -0400, Eric Sunshine wrote: > > Oops, I missed the trailing '.' in the regex there, and it probably > > needs double-quotes in case the inner expr fails to match anything. > > Which is messy considering the double quotes already surrounding > $(uname_R). Suggest

Re: [PATCH 1/2] config.mak.uname: Darwin: define HAVE_GETDELIM for modern OS X releases

2015-06-02 Thread Eric Sunshine
On Tue, Jun 2, 2015 at 3:04 PM, Jeff King wrote: > On Tue, Jun 02, 2015 at 02:44:13PM -0400, Jeff King wrote: >> > + ifeq ($(shell expr $(shell expr "$(uname_R)" : '\([0-9][0-9]*\)\.') >> > '>=' 11),1) >> >> Do you need to spawn two shells? It seems like: >> >> $(shell expr `expr "$(uname_R)"

Re: [PATCH v4 1/4] implement submodule config cache for lookup of submodule names

2015-06-02 Thread Junio C Hamano
Heiko Voigt writes: > This submodule configuration cache allows us to lazily read .gitmodules > configurations by commit into a runtime cache which can then be used to > easily lookup values from it. Currently only the values for path or name > are stored but it can be extended for any value need

You can upload your invited paper for our conferences in Salerno, Italy, June 27-29, 2015: www. wseas. org until June 7, 2015 (by the way, you can also upload your papers for our conferences in Zakyn

2015-06-02 Thread Dr. Anna Papadimitriou
Dear Author, You can upload your invited paper for our conferences in Salerno, Italy, June 27-29, 2015: www. wseas. org until June 7, 2015 (by the way, you can also upload your papers for our conferences in Zakynthos Island, Greece until June 30, 2015) As you remember we had invited you as Inv

Re: [PATCH 1/2] config.mak.uname: Darwin: define HAVE_GETDELIM for modern OS X releases

2015-06-02 Thread Jeff King
On Tue, Jun 02, 2015 at 02:44:13PM -0400, Jeff King wrote: > > + ifeq ($(shell expr $(shell expr "$(uname_R)" : '\([0-9][0-9]*\)\.') > > '>=' 11),1) > > Do you need to spawn two shells? It seems like: > > $(shell expr `expr "$(uname_R)" : '\([0-9][0-9]*\)'` '>=' 11),1) Oops, I missed the t

Re: [RFCv2 04/16] upload-pack-2: Implement the version 2 of upload-pack

2015-06-02 Thread Junio C Hamano
Stefan Beller writes: > Subject: [RFCv2 04/16] upload-pack-2: Implement the version 2 of upload-pack Nit; s/I/i/, to match others in the series, I think. > In upload-pack-2 we send each capability in its own packet buffer. > > Signed-off-by: Stefan Beller > --- > > Notes: > Moved the capab

Re: git mergetool: create temporary files in different sub-folders but with same filenames

2015-06-02 Thread Stefan Beller
On Tue, Jun 2, 2015 at 11:48 AM, Andre Bossert wrote: > Hello, > > we are moving from ClearCase to Git (MSYS 1.9.5 at Win7x64) and trying to > configure one special merge tool "DiffMerge" for IBM Rhapsody files. So > we've added our merge tool (script) to gitconfig. The merge script calls the > Di

git mergetool: create temporary files in different sub-folders but with same filenames

2015-06-02 Thread Andre Bossert
Hello, we are moving from ClearCase to Git (MSYS 1.9.5 at Win7x64) and trying to configure one special merge tool "DiffMerge" for IBM Rhapsody files. So we've added our merge tool (script) to gitconfig. The merge script calls the DiffMerge for some file-extensions (sbs, rpy etc.). It works in

Re: [RFCv2 03/16] connect: rewrite feature parsing to work on string_list

2015-06-02 Thread Junio C Hamano
Stefan Beller writes: > Signed-off-by: Stefan Beller > --- The change in 2/16 to extract something into a helper was sort-of guessable without any comment (i.e. perhaps it will gain new callers in later patches), but a change like this needs to hint why this is a good thing to do, I would think

Re: [PATCH 2/2] configure: add getdelim() check

2015-06-02 Thread Jeff King
On Tue, Jun 02, 2015 at 02:18:58PM -0400, Eric Sunshine wrote: > As an optimization, strbuf will take advantage of getdelim() if > available, so add a configure check which defines HAVE_GETDELIM if > found. Thanks, looks good. -Peff -- To unsubscribe from this list: send the line "unsubscribe gi

Re: [PATCH 1/2] config.mak.uname: Darwin: define HAVE_GETDELIM for modern OS X releases

2015-06-02 Thread Jeff King
On Tue, Jun 02, 2015 at 02:18:57PM -0400, Eric Sunshine wrote: > The use of 'expr' in this new test is decidedly different from existing > instances which merely check if `uname -R` matches a particular single > digit and a period. If the new test took the same approach, it would > have to match e

Re: [PATCH 7/9] strbuf_getwholeline: use getdelim if it is available

2015-06-02 Thread Eric Sunshine
On Fri, May 8, 2015 at 9:09 PM, Jeff King wrote: > On Fri, May 08, 2015 at 07:56:28PM -0400, Eric Sunshine wrote: >> I spent some time downloading old Xcode releases and poking through >> the packages. Xcode 3.2.x seems to be the last in the Xcode 3 series, >> and none of the Xcode 3.2.x versions

Re: [PATCH/RFCv3 2/2] git rebase -i: warn about removed commits

2015-06-02 Thread Junio C Hamano
Remi Galan Alfonso writes: > In this case it is not true, because of the infile and outfile being > identical. However sort does have a -o (-output) that I missed that > allows avoiding using echo or writing in another file; I'm correcting > with this. Even though it is in POSIX, some implementa

[PATCH 0/2] auto-detect getdelim()

2015-06-02 Thread Eric Sunshine
As an optimization, strbuf takes advantage of getdelim() when available (HAVE_GETDELIM). Currently, HAVE_GETDELIM is defined automatically only for Linux. This patch series updates config.mak.uname to define HAVE_GETDELIM on Mac OS X (Darwin) based upon version ("uname -r"), and more generally via

[PATCH 2/2] configure: add getdelim() check

2015-06-02 Thread Eric Sunshine
As an optimization, strbuf will take advantage of getdelim() if available, so add a configure check which defines HAVE_GETDELIM if found. Signed-off-by: Eric Sunshine --- Tested on: * OS X 10.10.3 "Yosemite" with Xcode 6.3.2 * OS X 10.5.8 "Leopard" with Xcode 3.1 * Linux * FreeBSD configure.ac

[PATCH 1/2] config.mak.uname: Darwin: define HAVE_GETDELIM for modern OS X releases

2015-06-02 Thread Eric Sunshine
On Mac OS X, getdelim() first became available with Xcode 4.1[1], which was released the same day as OS X 10.7 "Lion", so assume getdelim() availability from 10.7 onward. (As of this writing, OS X is at 10.10 "Yosemite".) According to Wikipedia[2], 4.1 was also available for download by paying dev

Re: [RFCv2 10/16] transport: connect_setup appends protocol version number

2015-06-02 Thread Stefan Beller
On Tue, Jun 2, 2015 at 2:58 AM, Duy Nguyen wrote: > On Tue, Jun 2, 2015 at 7:02 AM, Stefan Beller wrote: >> Signed-off-by: Stefan Beller >> --- >> >> Notes: >> name it to_free >> >> transport.c | 17 +++-- >> 1 file changed, 15 insertions(+), 2 deletions(-) >> >> diff --git a/tr

Re: [RFCv2 01/16] stringlist: add from_space_separated_string

2015-06-02 Thread Stefan Beller
On Tue, Jun 2, 2015 at 8:10 AM, Eric Sunshine wrote: > On Tue, Jun 2, 2015 at 5:42 AM, Duy Nguyen wrote: >> On Tue, Jun 2, 2015 at 7:02 AM, Stefan Beller wrote: >>> diff --git a/string-list.h b/string-list.h >>> index d3809a1..88c18e9 100644 >>> --- a/string-list.h >>> +++ b/string-list.h >>> @@

Re: AW: Getting the full path of a conflicting file within a custom merge driver?

2015-06-02 Thread Junio C Hamano
"Gondek, Andreas" writes: > thank you for responding this fast. I would suggest providing this > information as an additional parameter (like %A %O %B and %L) maybe > %P. Yes, per-cent plus a letter is more in line with the way information is passed to the scripts already. Thanks for making a m

[PATCH/RFC v3 3/4] t4150-am: refactor am -3 tests

2015-06-02 Thread Remi Lespinet
Create a setup for git am -3 in a separate test instead of creating this setup each time. This prepares for the next commit which will use this setup as well. Signed-off-by: Remi Lespinet --- t/t4150-am.sh | 32 ++-- 1 file changed, 14 insertions(+), 18 deletions(-)

[PATCH/RFC v3 2/4] git-am.txt: add configuration section in git am documentation

2015-06-02 Thread Remi Lespinet
Prepare a configuration section for the git am documentation. Remove the part related to the am.keepcr configuration variable in the description of the --keepcr option and place the description of the am.keepcr configuration variable in the newly created configuration section. This section will be

[PATCH/RFC v3 4/4] git-am: add am.threeWay config variable

2015-06-02 Thread Remi Lespinet
Add the am.threeWay configuration variable to use the -3 or --3way option of git am by default. When am.threeway is set and not desired for a specific git am command, the --no-3way option can be used to override it. Signed-off-by: Remi Lespinet --- Even if git am will be rewritten soon, the code

[PATCH/RFC v3 1/4] git-am.sh: fix initialization of the threeway variable

2015-06-02 Thread Remi Lespinet
Initialization for the threeway variable was missing. This caused a behavior change for command lines like: threeway=t git am ... This commit fixes the bug. Signed-off-by: Remi Lespinet --- git-am.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/git-am.sh b/git-am.sh index 761bef

Re: [PATCH v2 3/3] read_loose_refs(): treat NULL_SHA1 loose references as broken

2015-06-02 Thread Stefan Beller
On Tue, Jun 2, 2015 at 8:57 AM, Michael Haggerty wrote: > NULL_SHA1 is never a valid value for a reference. If a loose reference > has that value, mark it as broken. > > Why check NULL_SHA1 and not the nearly 2^160 other SHA-1s that are > also invalid in a given repository? Because (a) it is cheap

Re: [PATCH 2/2] send-email: allow multiple emails using --cc, --to and --bcc

2015-06-02 Thread Junio C Hamano
Rémi Lespinet writes: > Junio C Hamano writes: > >> The reason why we have the "verify the input" thing, allow users to >> supply multiple --to/--cc/etc., and do not try to split the >> addresses ourselves is because we want to avoid mistakenly splitting >> a single address like the above into t

Re: [PATCH/RFCv2 2/2] git rebase -i: warn about removed commits

2015-06-02 Thread Junio C Hamano
Matthieu Moy writes: > Galan Rémi writes: > >> Check if commits were removed (i.e. a line was deleted) and print >> warnings or abort git rebase according to the value of the >> configuration variable rebase.checkLevel. > > checkLevel does not seem to be a good name, because it doesn't say > _wh

Re: [PATCH/RFCv2 1/2] git-rebase -i: add command "drop" to remove a commit

2015-06-02 Thread Junio C Hamano
Matthieu Moy writes: > Discussions on this list often lead to "Oh, BTW, shall we do XYZ also?", > but you shouldn't take this kind of remark as blocking (as long as XYZ > is not incompatible with your patch, which is the case here). Yeah, thanks for clarification. As long as what is given to 'd

Re: [RFC/WIP PATCH 11/11] Document protocol version 2

2015-06-02 Thread Junio C Hamano
Stefan Beller writes: > I think the recent issue with the push certificates shows that having > arbitrary > data after the = is a bad idea. I do not think push certificate episode tells any such thing. It was about not carefully using cryptography with arbitrary data. How that arbitrary data c

[GSoC] Week 1: Unification of 'for-each-ref', 'tag -l' and 'branch -l'

2015-06-02 Thread Karthik Nayak
Hello All, As part of GSoC I'm working on the Unification of 'for-each-ref', 'tag -l' and 'branch -l'. I will update the list on my weekly progress in an effort to keep everyone updated. Current Progress: Currently I have been working on moving all code from 'for-each-ref' to an independent libr

Re: [PATCH/RFCv3 2/2] git rebase -i: warn about removed commits

2015-06-02 Thread Remi Galan Alfonso
Matthieu Moy writes: > > Galan Rémi writes: > > +# Sort the SHA-1 and compare them > > +echo "$(sort -u "$todo".oldsha1)" >"$todo".oldsha1 > > +echo "$(sort -u "$todo".newsha1)" >"$todo".newsha1 > > Useless uses of echo. > > echo $(foo) -> foo In

Re: [PATCH] l10n: de.po: translate "index" as "Index"

2015-06-02 Thread Ralf Thielow
Am 1. Juni 2015 um 09:38 schrieb : > Ralf Thielow venit, vidit, dixit 29.05.2015 20:54: >> #: sequencer.c:501 >> #, c-format >> @@ -1294,12 +1294,12 @@ msgstr "leere Menge von Commits übergeben" >> #: sequencer.c:661 >> #, c-format >> msgid "git %s: failed to read the index" >> -msgstr "git %

  1   2   >