Re: [GSoC] Applying for conversion scripts to builtins

2015-03-16 Thread Paul Tan
Hi, On Tue, Mar 17, 2015 at 12:49 AM, Yurii Shevtsov unge...@gmail.com wrote: I'm going to write for this idea. As I know good proposal should contain timeline and Todo estimations. What should I write in my proposal, since there is no clear plan for converting scripts to builtins. Thanks in

[PATCH v4 1/4] git-credential-store: support multiple credential files

2015-03-18 Thread Paul Tan
. Helped-by: Matthieu Moy matthieu@grenoble-inp.fr Helped-by: Junio C Hamano gits...@pobox.com Helped-by: Jeff King p...@peff.net Signed-off-by: Paul Tan pyoka...@gmail.com --- The previous version can be found at [1]. [1] http://thread.gmane.org/gmane.comp.version-control.git/265305/focus=265309

[PATCH v4 4/4] t0302: test credential-store support for XDG_CONFIG_HOME

2015-03-18 Thread Paul Tan
gits...@pobox.com Helped-by: Eric Sunshine sunsh...@sunshineco.com Signed-off-by: Paul Tan pyoka...@gmail.com --- The previous version can be found at [1]. [1] http://thread.gmane.org/gmane.comp.version-control.git/265305/focus=265308 * Merge related, but previously separate, tests together

[PATCH v4 2/4] git-credential-store: support XDG_CONFIG_HOME

2015-03-18 Thread Paul Tan
matching credentials from all files. Helped-by: Matthieu Moy matthieu@grenoble-inp.fr Helped-by: Junio C Hamano gits...@pobox.com Helped-by: Jeff King p...@peff.net Signed-off-by: Paul Tan pyoka...@gmail.com --- The previous version can be found at [1]. [1] http://thread.gmane.org

[PATCH v4 3/4] docs/git-credential-store: document XDG file and precedence

2015-03-18 Thread Paul Tan
-by: Paul Tan pyoka...@gmail.com --- The previous version can be found at [1]. [1] http://thread.gmane.org/gmane.comp.version-control.git/265305/focus=265308 The changes are as follows: * Remove support for this file was added fairly recently statement, as it will become out-dated with time

Re: [PATCH/RFC/GSOC] make git-pull a builtin

2015-03-22 Thread Paul Tan
Hi, On Sun, Mar 22, 2015 at 1:35 AM, Johannes Schindelin johannes.schinde...@gmx.de wrote: Maybe code coverage tools could help here so we only need to focus on the code paths that are untested by the test suite. At the minimum, all of the non-trivial code paths in both the shell script and

[PATCH/RFC/GSOC] make git-pull a builtin

2015-03-17 Thread Paul Tan
as a shell script they would have to be stored as strings and parsed over and over again. Furthermore, this reduces git's dependence on posix shells and utilities, which would be very helpful in porting git to non-posix environments such as Windows. Signed-off-by: Paul Tan pyoka...@gmail.com

Re: [PATCH v4 3/4] docs/git-credential-store: document XDG file and precedence

2015-03-20 Thread Paul Tan
the documentation says. And as a reviewer, I like having pieces of docs linked to the patch they document. Yup, I can see what you mean. Will squash on the next version. Paul Tan pyoka...@gmail.com writes: +Credential storage will per default Not a native, but per default sounds weird

Re: [PATCH v4 4/4] t0302: test credential-store support for XDG_CONFIG_HOME

2015-03-21 Thread Paul Tan
Hi, On Thu, Mar 19, 2015 at 9:35 PM, Matthieu Moy matthieu@grenoble-inp.fr wrote: Eric Sunshine sunsh...@sunshineco.com writes: I also tend to favor adding failure tests which are flipped to success when appropriate, however, as this is an entirely new feature, this approach may be

Re: [PATCH v4 4/4] t0302: test credential-store support for XDG_CONFIG_HOME

2015-03-20 Thread Paul Tan
Hi, On Thu, Mar 19, 2015 at 3:26 AM, Eric Sunshine sunsh...@sunshineco.com wrote: On Wed, Mar 18, 2015 at 3:04 AM, Paul Tan pyoka...@gmail.com wrote: diff --git a/t/t0302-credential-store.sh b/t/t0302-credential-store.sh index f61b40c..5b0a666 100755 --- a/t/t0302-credential-store.sh +++ b/t

Re: [PATCH/RFC/GSOC] make git-pull a builtin

2015-03-21 Thread Paul Tan
Hi, On Thu, Mar 19, 2015 at 6:26 AM, Junio C Hamano gits...@pobox.com wrote: Paul Tan pyoka...@gmail.com writes: +/* Global vars since they are used often */ +static char *head_name; +static const char *head_name_short; +static unsigned char head_sha1[20]; +static int head_flags; + +enum

Re: [PATCH/RFC/GSOC] make git-pull a builtin

2015-03-21 Thread Paul Tan
Hi, Thanks for the review, though I would like to work on the proposal now before the deadline passes :) On Thu, Mar 19, 2015 at 1:52 AM, Matthieu Moy matthieu@grenoble-inp.fr wrote: Paul Tan pyoka...@gmail.com writes: Ideally, I think the solution is to improve the test suite and make

Re: [PATCH/RFC/GSOC] make git-pull a builtin

2015-03-21 Thread Paul Tan
Hi, Thanks for your suggestions, I agree with most of them :). On Wed, Mar 18, 2015 at 5:00 PM, Johannes Schindelin johannes.schinde...@gmx.de wrote: +static int parse_opt_rebase(const struct option *opt, const char *arg, int unset) +{ + if (arg) + *(int *)opt-value =

Re: [PATCH v2 2/4] git-credential-store: support XDG_CONFIG_HOME

2015-03-10 Thread Paul Tan
On Sun, Mar 8, 2015 at 3:58 PM, Paul Tan pyoka...@gmail.com wrote: remove_credential(fns, c); else if (!strcmp(op, store)) - store_credential(fns, c, fns.nr - 1); + store_credential(fns, c, 0); else ; /* Ignore

Re: [PATCH v2 4/4] t0302: test credential-store support for XDG_CONFIG_HOME

2015-03-10 Thread Paul Tan
On Mon, Mar 9, 2015 at 8:36 PM, Matthieu Moy matthieu@grenoble-inp.fr wrote: Paul Tan pyoka...@gmail.com writes: +' +test_expect_success 'xdg credentials file will not be created if it does not exist' ' We usually put a blank line between tests. Okay, will do that. +helper_test store

Re: [PATCH v3 3/4] docs/git-credential-store: document XDG file and precedence

2015-03-12 Thread Paul Tan
On Wed, Mar 11, 2015 at 3:47 PM, Eric Sunshine sunsh...@sunshineco.com wrote: On Wed, Mar 11, 2015 at 2:49 AM, Paul Tan pyoka...@gmail.com wrote: + +If not set explicitly with '--file', there are two files where +git-credential-store will search for credentials in order of precedence

Re: [PATCH v3 4/4] t0302: test credential-store support for XDG_CONFIG_HOME

2015-03-12 Thread Paul Tan
Hi, Thanks for taking the time to write such a detailed review and catching all of my careless mistakes. On Wed, Mar 11, 2015 at 4:40 PM, Eric Sunshine sunsh...@sunshineco.com wrote: On Wed, Mar 11, 2015 at 2:49 AM, Paul Tan pyoka...@gmail.com wrote: t0302 now tests git-credential-store's

Re: [GSoC microproject] Add XDG support to the credential-store helper

2015-03-06 Thread Paul Tan
Hi, Reading my previous message again, I apologize if it sounded conflicting. Truth to be told, I see merits in both proposed behaviors, but it all depends on whether we want git-credentials-store to support an arbitrary number of config files (now or in the future) or just two. I'm not sitting

[PATCH v2 1/4] git-credential-store: support multiple credential files

2015-03-07 Thread Paul Tan
by default_index. Helped-by: Matthieu Moy matthieu@grenoble-inp.fr Helped-by: Junio C Hamano gits...@pobox.com Helped-by: Jeff King p...@peff.net Signed-off-by: Paul Tan pyoka...@gmail.com --- credential-store.c | 77 -- 1 file changed, 52

[PATCH v2 3/4] docs/git-credential-store: document XDG file and precedence

2015-03-07 Thread Paul Tan
in their order of precedence, and explains how the ordering affects the lookup, storage and erase operations. Also update documentation for --store to briefly explain the operations on multiple files if the --store option is not provided. Signed-off-by: Paul Tan pyoka...@gmail.com

[PATCH v2 2/4] git-credential-store: support XDG_CONFIG_HOME

2015-03-07 Thread Paul Tan
matching credentials from all files. Helped-by: Matthieu Moy matthieu@grenoble-inp.fr Helped-by: Junio C Hamano gits...@pobox.com Helped-by: Jeff King p...@peff.net Signed-off-by: Paul Tan pyoka...@gmail.com --- credential-store.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions

[PATCH v2 0/4] git-credential-store: XDG user-specific config file support

2015-03-07 Thread Paul Tan
feedback, please. [3] https://github.com/pyokagan/git Paul Tan (4): git-credential-store: support multiple credential files git-credential-store: support XDG_CONFIG_HOME docs/git-credential-store: document XDG file and precedence t0302: test credential-store support for XDG_CONFIG_HOME

[PATCH v2 4/4] t0302: test credential-store support for XDG_CONFIG_HOME

2015-03-07 Thread Paul Tan
Hamano gits...@pobox.com Signed-off-by: Paul Tan pyoka...@gmail.com --- t/t0302-credential-store.sh | 92 + 1 file changed, 92 insertions(+) diff --git a/t/t0302-credential-store.sh b/t/t0302-credential-store.sh index f61b40c..7fe832d 100755 --- a/t/t0302

Re: [PATCH v3 1/4] git-credential-store: support multiple credential files

2015-03-14 Thread Paul Tan
On Fri, Mar 13, 2015 at 2:15 PM, Jeff King p...@peff.net wrote: +static void store_credential(const struct string_list *fns, struct credential *c, + const char *default_fn) I think you could even get away without passing default_fn here, and just use the rule the

[PATCH v3 1/4] git-credential-store: support multiple credential files

2015-03-11 Thread Paul Tan
-by: Matthieu Moy matthieu@grenoble-inp.fr Helped-by: Junio C Hamano gits...@pobox.com Helped-by: Jeff King p...@peff.net Signed-off-by: Paul Tan pyoka...@gmail.com --- Previous version can be found at [1]. [1] http://thread.gmane.org/gmane.comp.version-control.git/265042/focus=265038 The changes

[PATCH v3 4/4] t0302: test credential-store support for XDG_CONFIG_HOME

2015-03-11 Thread Paul Tan
Hamano gits...@pobox.com Signed-off-by: Paul Tan pyoka...@gmail.com --- The previous version can be found at [1]. [1] http://thread.gmane.org/gmane.comp.version-control.git/265042/focus=265041 The changes are as follows: * Corrected code style violations: All tests are now separated by newlines

[PATCH v3 0/4] git-credential-store: XDG user-specific config file support

2015-03-11 Thread Paul Tan
credentials from home file if xdg files are unr -- EOF ' + test_expect_success 'erase: erase matching credentials from both xdg and home files' ' mkdir -p $HOME/.config/git echo https://xdg-user:xdg-p...@example.com; $HOME/.config/git/credentials Paul Tan (4

[PATCH v3 3/4] docs/git-credential-store: document XDG file and precedence

2015-03-11 Thread Paul Tan
in their order of precedence, and explains how the ordering affects the lookup, storage and erase operations. Also update documentation for --store to briefly explain the operations on multiple files if the --store option is not provided. Signed-off-by: Paul Tan pyoka...@gmail.com

[PATCH v3 2/4] git-credential-store: support XDG_CONFIG_HOME

2015-03-11 Thread Paul Tan
matching credentials from all files. Helped-by: Matthieu Moy matthieu@grenoble-inp.fr Helped-by: Junio C Hamano gits...@pobox.com Helped-by: Jeff King p...@peff.net Signed-off-by: Paul Tan pyoka...@gmail.com --- credential-store.c | 13 + 1 file changed, 9 insertions(+), 4 deletions

Re: [PATCH/RFC/GSOC] make git-pull a builtin

2015-03-24 Thread Paul Tan
On Mon, Mar 23, 2015 at 6:18 PM, Duy Nguyen pclo...@gmail.com wrote: Could you share these changes? I'm just wondering if we can add kcov support to the test suite. In this case it's more of an embarrassing hack, as I just needed a way to make git run kcov outdir git-pull.sh whenever git pull

Re: [RFC/GSoC] Proposal: Make git-pull and git-am builtins

2015-03-24 Thread Paul Tan
Hi, On Wed, Mar 25, 2015 at 2:37 AM, Junio C Hamano gits...@pobox.com wrote: Paul Tan pyoka...@gmail.com writes: ..., I propose the following requirements for the rewritten code: 1. No spawning of external git processes. This is to support systems with high ``fork()`` or process

[RFC/GSoC] Proposal: Make git-pull and git-am builtins

2015-03-24 Thread Paul Tan
Hi all, I'm applying for git in the Google Summer of Code this year. For my project, I propose to rewrite git-pull.sh and git-am.sh into fast optimized C builtins. I've already hacked up a prototype of a builtin git-pull in [1], and it showed a promising 8x improvement in execution time on

Re: [RFC/GSoC] Proposal: Make git-pull and git-am builtins

2015-03-24 Thread Paul Tan
On Tue, Mar 24, 2015 at 6:19 PM, Matthieu Moy matthieu@grenoble-inp.fr wrote: A few minor details: on operating systems with poor file system performance (i.e. Windows) = that's not only windows, I also commonly use a slow filesystem on Linux, just because it's NFS. Mentionning other

[RFC/GSoC v2] Proposal: Make git-pull and git-am builtins

2015-03-25 Thread Paul Tan
Since the deadline is fast approaching, and I've read that google-melange usually becomes overwhelmed near the deadline, I'll try to iterate on the proposal as much as possible. Below is v2, mostly small changes in response to Matthieu's and Junio's reviews. The changes are as follows: * Make it

Re: [PATCH] parse-options: fix the description of defval

2015-03-29 Thread Paul Tan
Hi, On Sun, Mar 29, 2015 at 4:32 PM, Ivan Ukhov ivan.uk...@gmail.com wrote: Since the deletion of OPT_SET_PTR, defval can no longer contain a pointer. Actually, it can contain a pointer for OPTION_CMDMODE, OPTION_STRING and OPTION_FILENAME. Since we are on the topic of updating the

[PATCH] enter_repo(): fix suffix precedence documentation

2015-03-30 Thread Paul Tan
The ordering of the list of suffixes tested in enter_repo() is documented as %s.git/.git, %s/.git, %s.git, %s. This does not match the ordering of the list of suffixes tested in the code which is %s/.git, %s, %s.git/.git, %s.git. Fix this. Signed-off-by: Paul Tan pyoka...@gmail.com --- path.c

[PATCH v3] enter_repo(): fix docs to match code

2015-03-31 Thread Paul Tan
: Paul Tan Thanks, didn't know that could be done. Fixed patch (and fixed scissors line) below, -- 8 -- From: Jeff King p...@peff.net In b3256eb (standardize and improve lookup rules for external local repos), enter_repo() was modified to use a different precedence ordering of suffixes for DWIM

[PATCH v2] enter_repo(): fix docs to match code

2015-03-31 Thread Paul Tan
-off-by: Jeff King p...@peff.net Signed-off-by: Paul Tan pyoka...@gmail.com --- path.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/path.c b/path.c index e608993..595da81 100644 --- a/path.c +++ b/path.c @@ -303,14 +303,9 @@ return_null: * (3) relative/path

Re: [PATCH] parse-options: fix the description of defval

2015-03-29 Thread Paul Tan
Hi, On Sun, Mar 29, 2015 at 5:28 PM, Ivan Ukhov ivan.uk...@gmail.com wrote: I have checked the definitions of the three macros you mentioned, and it seems that none of them uses defval to store pointers. OPTION_CMDMODE stores chars and integers. OPTION_STRING does not use defval at all

[GSoC15] Interested in contributing to git

2015-03-03 Thread Paul Tan
Hi all, git is one of the projects that I wish to contribute to for Google Summer of Code 2015 as it's an integral part of my workflow. I'm from Singapore, and have been accepted to the National University of Singapore for Computer Engineering, and will only matriculate on 3 Aug 2015. I have

Re: [GSoC15] Interested in contributing to git

2015-03-03 Thread Paul Tan
Hi Matthieu, On Wed, Mar 4, 2015 at 12:20 AM, Matthieu Moy matthieu@grenoble-inp.fr wrote: Be carefull: a GSoC is a full-time job. The GSoC itself ends on August 21st, so there would be a substantial (too big?) overlap between the GSoC and your studies. I understand. I will have to try my

[PATCH 1/2] git-credential-store: support XDG config dir

2015-03-03 Thread Paul Tan
. In order to support the above, parse_credential_file() now returns 1 if it finds a matching credential, and 0 if it does not. Likewise, lookup_credential() returns 1 if it could find the credential, and 0 if it could not. Signed-off-by: Paul Tan pyoka...@gmail.com --- credential-store.c | 60

[PATCH 2/2] tests: test credential-store XDG support

2015-03-03 Thread Paul Tan
are found in both XDG and HOME files. * Test that credentials from HOME file are used if a matching credential could not be found in the XDG file. * Test that when erasing credentials, matching credentials in both the XDG and HOME files are erase.d Signed-off-by: Paul Tan pyoka...@gmail.com --- t

[PATCH] [GSoC15] git-credentials-store: support XDG config dir

2015-03-03 Thread Paul Tan
Hi all, This is my initial implementation for the GSoC15 microproject for supporting both ~/.git-credentials and the XDG standard $XDG_CONFIG_HOME/git/credentials. I wrote the XDG tests in t0302-credential-store.sh in the end because it depends on the helper_test and check functions defined in

Re: [PATCH 1/2] git-credential-store: support XDG config dir

2015-03-04 Thread Paul Tan
, 2015 at 6:00 AM, Matthieu Moy matthieu@grenoble-inp.fr wrote: Paul Tan pyoka...@gmail.com writes: * get: call lookup_credential() on the XDG file first if it exists. If the credential can't be found, call lookup_credential() on the HOME file. * erase: Call remove_credential() on both

[PATCH v5 2/3] git-credential-store: support XDG_CONFIG_HOME

2015-03-23 Thread Paul Tan
-by: Paul Tan pyoka...@gmail.com --- This patch is a combination of 2 patches [1][2]. [1] http://thread.gmane.org/gmane.comp.version-control.git/265683/focus=265686 [2] http://thread.gmane.org/gmane.comp.version-control.git/265683/focus=265685 The changes are as follows: * s/per default/by default

[PATCH v5 3/3] t0302: test credential-store support for XDG_CONFIG_HOME

2015-03-23 Thread Paul Tan
gits...@pobox.com Helped-by: Eric Sunshine sunsh...@sunshineco.com Signed-off-by: Paul Tan pyoka...@gmail.com --- The previous version can be found at [1]. [1] http://thread.gmane.org/gmane.comp.version-control.git/265683/focus=265684 The changes are as follows: * Fix broken chains * Rewrite

[PATCH v5 1/3] git-credential-store: support multiple credential files

2015-03-23 Thread Paul Tan
. Helped-by: Matthieu Moy matthieu@grenoble-inp.fr Helped-by: Junio C Hamano gits...@pobox.com Helped-by: Jeff King p...@peff.net Signed-off-by: Paul Tan pyoka...@gmail.com --- The previous version can be found at [1]. [1] http://thread.gmane.org/gmane.comp.version-control.git/265683 The changes

Re: [PATCH v3 1/4] git-credential-store: support multiple credential files

2015-03-18 Thread Paul Tan
Hi all, thanks for providing your feedback. On Sun, Mar 15, 2015 at 6:14 AM, Junio C Hamano gits...@pobox.com wrote: I am not sure if this is not a premature over-engineering---I am not convinced that such a future need will be fulfilled by passing just a single default_fn this version already

Re: [GSoC microproject] Add XDG support to the credential-store helper

2015-03-06 Thread Paul Tan
Hi Luis, On Fri, Mar 6, 2015 at 7:41 AM, Luis Ressel ara...@aixah.de wrote: Okay, I've had a look at Paul's patch for this. Sorry again for the dupe, I must've missed it before. I guess I'll attempt another microproject. However, I feel like my patch is really all that's neccessary; I don't

Re: [RFC/GSoC] Proposal: Make git-pull and git-am builtins

2015-03-25 Thread Paul Tan
On Thu, Mar 26, 2015 at 1:54 AM, Junio C Hamano gits...@pobox.com wrote: Paul Tan pyoka...@gmail.com writes: I think it's still good to have the ideal in mind though (and whoops I forgot to put in the word ideal in the text). Using or not using fork is merely one of the trade-offs we can

Re: [PATCH v5 3/3] t0302: test credential-store support for XDG_CONFIG_HOME

2015-03-25 Thread Paul Tan
On Wed, Mar 25, 2015 at 01:25:07PM -0700, Junio C Hamano wrote: Junio C Hamano gits...@pobox.com writes: I've already queued the following and merged it to 'next'. Thanks Matthieu and Eric for your reviews, and Johannes for following up on this. Will keep in view XDG support for

[PATCH v3 1/7] path.c: implement xdg_config_home()

2015-04-20 Thread Paul Tan
, together with expand_user_path(), can replace all uses of home_config_paths(). [1] http://standards.freedesktop.org/basedir-spec/basedir-spec-0.7.html Helped-by: Eric Sunshine sunsh...@sunshineco.com Signed-off-by: Paul Tan pyoka...@gmail.com --- cache.h | 7 +++ path.c | 15 +++ 2

Re: GSoC 2015: 2 accepted proposals

2015-04-28 Thread Paul Tan
by Christian Couder and yours truly. Paul Tan will work on Make git-pull and git-am builtins, mentored by Johannes Schindelin and Stefan Beller. Thanks for accepting me, and it is my pleasure to work with everyone. For reference, information on the proposed project can be found at [1

[PATCH 2/7] t5520: implement tests for no merge candidates cases

2015-05-02 Thread Paul Tan
to the default remote. 5. We fetched from a specified remote, and a refspec was given, but it ended up not fetching anything. Implement tests for the above 5 cases to ensure that the correct code paths are triggered for each of these cases. Signed-off-by: Paul Tan pyoka...@gmail.com --- I'm

[PATCH v3 3/7] dir.c: replace home_config_paths() with xdg_config_home()

2015-05-06 Thread Paul Tan
Since only the xdg excludes file path is required, simplify the code by replacing use of home_config_paths() with xdg_config_home(). Signed-off-by: Paul Tan pyoka...@gmail.com --- Re-sending the patch series. There are no changes. dir.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions

[PATCH v2 01/12] t5520: implement tests for no merge candidates cases

2015-05-07 Thread Paul Tan
branch to merge didn't get fetched (either it doesn't exist, or wasn't part of the configured fetch refspec) Implement tests for the above 5 cases to ensure that the correct code paths are triggered for each of these cases. Signed-off-by: Paul Tan pyoka...@gmail.com --- Notes: * Re-worded

[PATCH v2 07/12] t4013: call git-merge instead of git-pull

2015-05-07 Thread Paul Tan
-by: Paul Tan pyoka...@gmail.com --- Notes: * This is a new patch in the patch series. t/t4013-diff-various.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t4013-diff-various.sh b/t/t4013-diff-various.sh index 6ec6072..48f2fe2 100755 --- a/t/t4013-diff-various.sh +++ b

Re: [PATCH v2 09/12] t7406: use git pull instead of git pull --rebase

2015-05-10 Thread Paul Tan
Hi Junio, On Fri, May 8, 2015 at 4:15 AM, Junio C Hamano gits...@pobox.com wrote: I do not think touching this test which does not have anything to do with git pull in your series is sensible at all, and you shouldn't flip test_expect_success temporarily to _expect_failure, if that is what

[PATCH v3 8/9] t5521: test --dry-run does not make any changes

2015-05-13 Thread Paul Tan
Test that when --dry-run is provided to git-pull, it does not make any changes, namely: * --dry-run gets passed to git-fetch, so no FETCH_HEAD will be created and no refs will be fetched. * The index and work tree will not be modified. Signed-off-by: Paul Tan pyoka...@gmail.com --- t/t5521

[PATCH v3 0/9] Improve git-pull test coverage

2015-05-13 Thread Paul Tan
, Torsten, Junio, Stefan, Dscho and Johannes for your reviews last round. [1] http://thread.gmane.org/gmane.comp.version-control.git/268510/ Paul Tan (9): t5520: fixup file contents comparisons t5520: ensure origin refs are updated t5520: test no merge candidates cases t5520: test for failure

[PATCH 12/14] pull: configure --rebase via branch.name.rebase or pull.rebase

2015-05-18 Thread Paul Tan
--rebase, 2011-11-06), git-pull --rebase can also be configured via the pull.rebase configuration option. Re-implement support for these two configuration settings by introducing config_get_rebase() which is called before parse_options() to set the default value of opt_rebase. Signed-off-by: Paul Tan

[PATCH 00/14] Make git-pull a builtin

2015-05-18 Thread Paul Tan
and portability. It is part of my GSoC project to rewrite git-pull and git-am into builtins[2]. [1] http://thread.gmane.org/gmane.comp.version-control.git/269249 [2] https://gist.github.com/pyokagan/1b7b0d1f4dab6ba3cef1 Paul Tan (14): pull: implement fetch + merge pull: pass verbosity, --progress

[PATCH v4 4/8] t5520: test work tree fast-forward when fetch updates head

2015-05-18 Thread Paul Tan
-friendly advice is printed upon failure. Signed-off-by: Paul Tan pyoka...@gmail.com --- * Removed use of verbose. t/t5520-pull.sh | 21 + 1 file changed, 21 insertions(+) diff --git a/t/t5520-pull.sh b/t/t5520-pull.sh index 3bc0594..3a53a5e 100755 --- a/t/t5520-pull.sh +++ b

[PATCH v2 2/2] pull: parse pull.ff as a bool or string

2015-05-18 Thread Paul Tan
with the merge.ff setting, which supports these aliases. Fix this by using the bool_or_string_config function to retrieve the value of pull.ff. Signed-off-by: Paul Tan pyoka...@gmail.com --- git-pull.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-pull.sh b/git-pull.sh index

[PATCH v2] pull: handle --log=n

2015-05-18 Thread Paul Tan
explicitly set the number of shortlog entries. However, git-pull does not recognize this option, and will instead pass it to git-fetch, leading to unknown option errors. Fix this by matching --log=* in addition to --log and --no-log. Implement a test for this use case. Signed-off-by: Paul Tan

[PATCH v2 1/7] path.c: implement xdg_config_home()

2015-04-14 Thread Paul Tan
-04-12 09:46, Paul Tan wrote: diff --git a/cache.h b/cache.h index 3d3244b..7f9bab0 100644 --- a/cache.h +++ b/cache.h @@ -836,6 +836,13 @@ char *strip_path_suffix(const char *path, const char *suffix); int daemon_avoid_alias(const char *path); extern int is_ntfs_dotgit(const char

[PATCH 3/7] dir.c: replace home_config_paths() with xdg_config_home()

2015-04-12 Thread Paul Tan
Since only the xdg excludes file path is required, simplify the code by replacing use of home_config_paths() with xdg_config_home(). Signed-off-by: Paul Tan pyoka...@gmail.com --- dir.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/dir.c b/dir.c index 0943a81

[PATCH 7/7] path.c: remove home_config_paths()

2015-04-12 Thread Paul Tan
, remove it. Signed-off-by: Paul Tan pyoka...@gmail.com --- cache.h | 1 - path.c | 28 2 files changed, 29 deletions(-) diff --git a/cache.h b/cache.h index 7f9bab0..19d75ef 100644 --- a/cache.h +++ b/cache.h @@ -816,7 +816,6 @@ enum scld_error

[PATCH 6/7] git-config: replace use of home_config_paths()

2015-04-12 Thread Paul Tan
(). Signed-off-by: Paul Tan pyoka...@gmail.com --- builtin/config.c | 6 ++ config.c | 6 ++ 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/builtin/config.c b/builtin/config.c index d32c532..5e61f4a 100644 --- a/builtin/config.c +++ b/builtin/config.c @@ -488,10 +488,8 @@ int

[PATCH 4/7] credential-store.c: replace home_config_paths() with xdg_config_home()

2015-04-12 Thread Paul Tan
Since only the xdg credentials file path is required, and home_config_paths() is unable to construct the path ~/.git-credentials, simplify the code by replacing home_config_paths() with xdg_config_home(). Signed-off-by: Paul Tan pyoka...@gmail.com --- credential-store.c | 2 +- 1 file changed, 1

[PATCH 2/7] attr.c: replace home_config_paths() with xdg_config_home()

2015-04-12 Thread Paul Tan
Since only the xdg attributes file path is required, simplify the code by using xdg_config_home() instead of home_config_paths(). Signed-off-by: Paul Tan pyoka...@gmail.com --- attr.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/attr.c b/attr.c index 1f9eebd

[PATCH 5/7] git-commit: replace use of home_config_paths()

2015-04-12 Thread Paul Tan
(). Signed-off-by: Paul Tan pyoka...@gmail.com --- builtin/commit.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/builtin/commit.c b/builtin/commit.c index da79ac4..c2ebea4 100644 --- a/builtin/commit.c +++ b/builtin/commit.c @@ -1398,12 +1398,10 @@ int cmd_status(int argc

[PATCH 1/7] path.c: implement xdg_config_home()

2015-04-12 Thread Paul Tan
replace all uses of home_config_paths(). [1] http://standards.freedesktop.org/basedir-spec/basedir-spec-0.7.html Signed-off-by: Paul Tan pyoka...@gmail.com --- cache.h | 7 +++ path.c | 16 2 files changed, 23 insertions(+) diff --git a/cache.h b/cache.h index 3d3244b

Re: [PATCH v2 1/7] path.c: implement xdg_config_home()

2015-04-18 Thread Paul Tan
Hi, On Fri, Apr 17, 2015 at 5:41 AM, Eric Sunshine sunsh...@sunshineco.com wrote: On Tue, Apr 14, 2015 at 1:28 PM, Paul Tan pyoka...@gmail.com wrote: Below is the fixed patch. I also decided to return NULL if `filename` is NULL because such an input usually indicated an uncaught error

Re: [PATCH v2 1/7] path.c: implement xdg_config_home()

2015-04-18 Thread Paul Tan
Hi, On Fri, Apr 17, 2015 at 5:41 AM, Eric Sunshine sunsh...@sunshineco.com wrote: On Tue, Apr 14, 2015 at 1:28 PM, Paul Tan pyoka...@gmail.com wrote: Below is the fixed patch. I also decided to return NULL if `filename` is NULL because such an input usually indicated an uncaught error

Re: [PATCH 2/2] pull: use git-rev-parse --parseopt for option parsing

2015-05-21 Thread Paul Tan
Hi, On Mon, May 18, 2015 at 10:43 PM, Johannes Schindelin johannes.schinde...@gmx.de wrote: On 2015-05-18 15:54, Paul Tan wrote: diff --git a/git-pull.sh b/git-pull.sh index 633c385..67f825c 100755 --- a/git-pull.sh +++ b/git-pull.sh @@ -4,13 +4,53 @@ # # Fetch one or more remote refs

Re: [PATCH v4 8/8] t5520: check reflog action in fast-forward merge

2015-05-21 Thread Paul Tan
Hi, On Mon, May 18, 2015 at 11:20 PM, Johannes Schindelin johannes.schinde...@gmx.de wrote: Hi Paul, On 2015-05-18 15:32, Paul Tan wrote: @@ -95,7 +94,11 @@ test_expect_success 'test . as a remote' ' git checkout copy test $(cat file) = file git pull - test $(cat

Re: [PATCH v4 3/8] t5520: test for failure if index has unresolved entries

2015-05-21 Thread Paul Tan
Hi, On Mon, May 18, 2015 at 11:13 PM, Johannes Schindelin johannes.schinde...@gmx.de wrote: Hi Paul, On 2015-05-18 15:32, Paul Tan wrote: diff --git a/t/t5520-pull.sh b/t/t5520-pull.sh index 4a2c0a1..3bc0594 100755 --- a/t/t5520-pull.sh +++ b/t/t5520-pull.sh @@ -164,6 +164,26

Re: [PATCH 1/2] pull: handle git-fetch's options as well

2015-05-21 Thread Paul Tan
Hi, On Mon, May 18, 2015 at 10:37 PM, Johannes Schindelin johannes.schinde...@gmx.de wrote: On 2015-05-18 15:30, Paul Tan wrote: t5520: failing test for pull --all with no configured upstream t5521: test pull --all --dry-run does not make any changes error_on_no_merge_candidates() does

Re: [PATCH 1/2] pull: handle git-fetch's options as well

2015-05-21 Thread Paul Tan
Hi, On Mon, May 18, 2015 at 10:37 PM, Johannes Schindelin johannes.schinde...@gmx.de wrote: On 2015-05-18 15:30, Paul Tan wrote: t5520: failing test for pull --all with no configured upstream t5521: test pull --all --dry-run does not make any changes error_on_no_merge_candidates() does

Re: [PATCH v4 6/8] t5520: test --rebase failure on unborn branch with index

2015-05-21 Thread Paul Tan
Hi, On Tue, May 19, 2015 at 2:00 AM, Stefan Beller sbel...@google.com wrote: On Mon, May 18, 2015 at 6:32 AM, Paul Tan pyoka...@gmail.com wrote: diff --git a/t/t5520-pull.sh b/t/t5520-pull.sh index f991439..4d649a5 100755 --- a/t/t5520-pull.sh +++ b/t/t5520-pull.sh @@ -413,6 +413,21

Re: [RFC] git-am: handling unborn branches

2015-06-05 Thread Paul Tan
On Fri, Jun 5, 2015 at 1:26 AM, Junio C Hamano gits...@pobox.com wrote: Paul Tan pyoka...@gmail.com writes: git-am generally supports applying patches to unborn branches. However, there are 2 cases where git-am does not handle unborn branches which I would like to address before the git-am

Re: [RFC] git-am: handling unborn branches

2015-06-05 Thread Paul Tan
On Fri, Jun 5, 2015 at 1:27 AM, Stefan Beller sbel...@google.com wrote: On Thu, Jun 4, 2015 at 3:34 AM, Paul Tan pyoka...@gmail.com wrote: Or, the current behavior of git-am.sh will print some scary errors about the missing HEAD, but will then continue on to the next patch. If the index

Re: [PATCH 2/5] am: teach StGit patch parser how to read from stdin

2015-06-09 Thread Paul Tan
On Tue, Jun 9, 2015 at 3:57 AM, Junio C Hamano gits...@pobox.com wrote: Paul Tan pyoka...@gmail.com writes: git-mailsplit, which splits mbox patches, will read the patch from stdin when the filename is - or there are no files listed on the command-line. To be consistent with this behavior

Re: [PATCH 5/6] am --abort: support aborting to unborn branch

2015-06-09 Thread Paul Tan
On Tue, Jun 9, 2015 at 4:10 AM, Junio C Hamano gits...@pobox.com wrote: Paul Tan pyoka...@gmail.com writes: When git-am is first run on an unborn branch, no ORIG_HEAD is created. As such, any applied commits will remain even after a git am --abort. I think this answered my question on 4/6

Re: [PATCH 6/6] am --abort: keep unrelated commits on unborn branch

2015-06-09 Thread Paul Tan
On Tue, Jun 9, 2015 at 4:13 AM, Junio C Hamano gits...@pobox.com wrote: Paul Tan pyoka...@gmail.com writes: Since 7b3b7e3 (am --abort: keep unrelated commits since the last failure and warn, 2010-12-21), git-am would refuse to rewind HEAD if commits were made since the last git-am failure

Re: [RFC] git-am: handling unborn branches

2015-06-05 Thread Paul Tan
On Fri, Jun 5, 2015 at 11:36 PM, Junio C Hamano gits...@pobox.com wrote: Paul Tan pyoka...@gmail.com writes: Hmm, actually git-am.sh doesn't seem to do that even when we have a history to apply patches to. This is okay in the non-3way case, as git-apply will check to see if the patch applies

[PATCH 1/6] am --skip: revert changes introduced by failed 3way merge

2015-06-06 Thread Paul Tan
the failed merge. Signed-off-by: Paul Tan pyoka...@gmail.com --- git-am.sh | 7 ++- t/t4151-am-abort.sh | 11 +++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/git-am.sh b/git-am.sh index 761befb..df3c8f4 100755 --- a/git-am.sh +++ b/git-am.sh @@ -69,6 +69,8

[PATCH 2/6] am -3: support 3way merge on unborn branch

2015-06-06 Thread Paul Tan
While on an unborn branch, git am -3 will fail to do a threeway merge as it references HEAD as our tree, but HEAD does not point to a valid tree. Fix this by using an empty tree as our tree when we are on an unborn branch. Signed-off-by: Paul Tan pyoka...@gmail.com --- git-am.sh | 3

[PATCH 5/6] am --abort: support aborting to unborn branch

2015-06-06 Thread Paul Tan
to by HEAD if there is no ORIG_HEAD. Signed-off-by: Paul Tan pyoka...@gmail.com --- git-am.sh | 9 - t/t4151-am-abort.sh | 17 + 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/git-am.sh b/git-am.sh index e4fe3ed..95f90a0 100755 --- a/git-am.sh +++ b

[PATCH 6/6] am --abort: keep unrelated commits on unborn branch

2015-06-06 Thread Paul Tan
-by: Paul Tan pyoka...@gmail.com --- git-am.sh | 2 +- t/t4151-am-abort.sh | 11 +++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/git-am.sh b/git-am.sh index 95f90a0..4324bb1 100755 --- a/git-am.sh +++ b/git-am.sh @@ -87,7 +87,7 @@ safe_to_abort

[PATCH 4/6] am --abort: revert changes introduced by failed 3way merge

2015-06-06 Thread Paul Tan
, thus undoing all the changes from the failed merge. When we are on an unborn branch, HEAD and ORIG_HEAD will not point to valid trees. In this case, use an empty tree. Signed-off-by: Paul Tan pyoka...@gmail.com --- git-am.sh | 6 +- t/t4151-am-abort.sh | 23

[PATCH 3/6] am --skip: support skipping while on unborn branch

2015-06-06 Thread Paul Tan
When git am --skip is run, git am will copy HEAD's tree entries to the index with git reset HEAD. However, on an unborn branch, HEAD does not point to a tree, so git reset HEAD will fail. Fix this by treating HEAD as en empty tree when we are on an unborn branch. Signed-off-by: Paul Tan pyoka

[PATCH 0/6] am --skip/--abort: improve index/worktree cleanup

2015-06-06 Thread Paul Tan
branch. Paul Tan (6): am --skip: revert changes introduced by failed 3way merge am -3: support 3way merge on unborn branch am --skip: support skipping while on unborn branch am --abort: revert changes introduced by failed 3way merge am --abort: support aborting to unborn branch am --abort

[PATCH 3/5] t4150: test applying StGit series

2015-06-08 Thread Paul Tan
this series file, is able to detect it as an StGit series and apply all the patches in the series. Signed-off-by: Paul Tan pyoka...@gmail.com --- t/t4150-am.sh | 17 + 1 file changed, 17 insertions(+) diff --git a/t/t4150-am.sh b/t/t4150-am.sh index 51962e4..7aad8f8 100755 --- a/t

[PATCH 2/5] am: teach StGit patch parser how to read from stdin

2015-06-08 Thread Paul Tan
. Based-on-patch-by: Chris Packham judge.pack...@gmail.com Signed-off-by: Paul Tan pyoka...@gmail.com --- git-am.sh | 5 +++-- t/t4150-am.sh | 10 ++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/git-am.sh b/git-am.sh index 761befb..83f2ea6 100755 --- a/git-am.sh +++ b

[PATCH 0/5] am: improve test coverage and touch up foreign patch parsing

2015-06-08 Thread Paul Tan
date wrongly and git-am is thus unable to reconstruct the exact commit. Most patches are based on Chris' patch series[1], which I've credited accordingly. [1] http://thread.gmane.org/gmane.comp.version-control.git/256502 Paul Tan (5): t4150: test applying StGit patch am: teach StGit patch

[PATCH 4/5] am: use gmtime() to parse mercurial patch date

2015-06-08 Thread Paul Tan
in the patch, the resulting commit will have the wrong author date. Fix this by using gmtime() instead, which uses UTC instead of the user's time zone. Signed-off-by: Paul Tan pyoka...@gmail.com --- git-am.sh | 6 +++--- t/t4150-am.sh | 23 +++ 2 files changed, 26

[PATCH 1/5] t4150: test applying StGit patch

2015-06-08 Thread Paul Tan
to be able to extract the commit author, date and message from such a patch. Based-on-patch-by: Chris Packham judge.pack...@gmail.com Signed-off-by: Paul Tan pyoka...@gmail.com --- t/t4150-am.sh | 22 ++ 1 file changed, 22 insertions(+) diff --git a/t/t4150-am.sh b/t/t4150-am.sh index

  1   2   3   4   5   6   7   >