Re: [PATCH 3/3] git-am: add am.threeWay config variable

2015-05-28 Thread Paul Tan
Hi, On Wed, May 27, 2015 at 5:32 AM, Remi Lespinet remi.lespi...@ensimag.grenoble-inp.fr wrote: 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

[PATCH/WIP 0/8] Make git-am a builtin

2015-05-27 Thread Paul Tan
://github.com/pyokagan/git/compare/master...pyokagan:pt/ref-builtin-am [2] https://gist.github.com/pyokagan/1b7b0d1f4dab6ba3cef1 [3] Since a 56-patch series was posted recently ;-) [4] The subset of the test suite that calls git-rebase and git-am. Paul Tan (8): wrapper: implement xopen() wrapper

[PATCH/WIP 2/8] wrapper: implement xfopen()

2015-05-27 Thread Paul Tan
of code and make the die() messages consistent. Signed-off-by: Paul Tan pyoka...@gmail.com --- git-compat-util.h | 1 + wrapper.c | 19 +++ 2 files changed, 20 insertions(+) diff --git a/git-compat-util.h b/git-compat-util.h index 9745962..914d450 100644 --- a/git-compat

[PATCH/WIP 1/8] wrapper: implement xopen()

2015-05-27 Thread Paul Tan
that we can save a few lines of code, and make the die() messages consistent. Signed-off-by: Paul Tan pyoka...@gmail.com --- git-compat-util.h | 1 + wrapper.c | 18 ++ 2 files changed, 19 insertions(+) diff --git a/git-compat-util.h b/git-compat-util.h index 17584ad

[PATCH/WIP 3/8] am: implement patch queue mechanism

2015-05-27 Thread Paul Tan
. The logic for applying and committing a patch is not implemented yet. * am_destroy(), which is finally called when we successfully applied all the patches in the queue, to clean up by removing the state directory and its contents. Signed-off-by: Paul Tan pyoka...@gmail.com --- Makefile | 2

[PATCH/WIP 4/8] am: split out mbox/maildir patches with git-mailsplit

2015-05-27 Thread Paul Tan
foreign patch support: introduce patch_format, 2009-05-27)) to allow the user to choose between the different patch formats. Signed-off-by: Paul Tan pyoka...@gmail.com --- builtin/am.c | 104 --- 1 file changed, 100 insertions(+), 4 deletions

[PATCH/WIP 7/8] am: apply patch with git-apply

2015-05-27 Thread Paul Tan
Implement applying the patch to the index using git-apply. Signed-off-by: Paul Tan pyoka...@gmail.com --- builtin/am.c | 50 +- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/builtin/am.c b/builtin/am.c index 0b8a42d..7126df3 100644

[PATCH/WIP 8/8] am: commit applied patch

2015-05-27 Thread Paul Tan
Implement do_commit(), which commits the index which contains the results of applying the patch, along with the extracted commit message and authorship information. Signed-off-by: Paul Tan pyoka...@gmail.com --- builtin/am.c | 46 ++ 1 file changed, 46

[PATCH/WIP 5/8] am: detect mbox patches

2015-05-27 Thread Paul Tan
Since 15ced75 (git-am foreign patch support: autodetect some patch formats, 2009-05-27), git-am.sh is able to autodetect mbox, stgit and mercurial patches through heuristics. Re-implement support for autodetecting mbox/maildir files. Signed-off-by: Paul Tan pyoka...@gmail.com --- builtin/am.c

[PATCH/WIP 6/8] am: extract patch, message and authorship with git-mailinfo

2015-05-27 Thread Paul Tan
directly without spawning a new process. Signed-off-by: Paul Tan pyoka...@gmail.com --- builtin/am.c | 231 +++ 1 file changed, 231 insertions(+) diff --git a/builtin/am.c b/builtin/am.c index d589ec5..0b8a42d 100644 --- a/builtin/am.c +++ b

Implementing git-am -3 with git-apply -3?

2015-05-25 Thread Paul Tan
Hi Junio, I noticed that you implemented a 3-way merge fallback[1] in git-apply that is meant to be similar to git-am's. I wonder if it is possible to implement the 3-way merge in git-am using git-apply. Are there any issues/deficiencies that I need to be aware of? So far, I noticed that: *

Re: [PATCH 02/14] pull: pass verbosity, --progress flags to fetch and merge

2015-05-22 Thread Paul Tan
Hi Johannes, On Thu, May 21, 2015 at 11:59 PM, Johannes Schindelin johannes.schinde...@gmx.de wrote: Hi Paul, On 2015-05-21 11:48, Paul Tan wrote: Unfortunately, the usage of strbuf means that we lose the ability to know if an option was not provided at all (the value is NULL

Re: [PATCH v3] pull: handle --log=n

2015-05-22 Thread Paul Tan
Hi Junio, On Fri, May 22, 2015 at 5:24 AM, Junio C Hamano gits...@pobox.com wrote: Paul Tan pyoka...@gmail.com writes: So, here's the re-rolled patch. Sigh, too late. I thought the previous round was good enough and the patch is already on 'next'. If the incremental change is still

Re: [PATCH 14/14] pull --rebase: error on no merge candidate cases

2015-05-22 Thread Paul Tan
On Wed, May 20, 2015 at 12:27 AM, Junio C Hamano gits...@pobox.com wrote: Johannes Schindelin johannes.schinde...@gmx.de writes: - fprintf(stderr, - _(There are no candidates for merging among the refs that you just fetched.\n -

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: [PATCH 10/14] pull: set reflog message

2015-05-21 Thread Paul Tan
On Tue, May 19, 2015 at 5:53 AM, Junio C Hamano gits...@pobox.com wrote: Yeah, either that, or insert separator only before adding to something else pattern, i.e. for (i = 0; i argc; i++) { if (i) addch(msg, ' '); addstr(msg,

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

2015-05-21 Thread Paul Tan
On Mon, May 18, 2015 at 10:53 PM, Johannes Schindelin johannes.schinde...@gmx.de wrote: On 2015-05-18 15:39, Paul Tan wrote: diff --git a/t/t5524-pull-msg.sh b/t/t5524-pull-msg.sh index 8cccecc..eebb8c9 100755 --- a/t/t5524-pull-msg.sh +++ b/t/t5524-pull-msg.sh @@ -17,6 +17,9

Re: [PATCH 06/14] pull: support pull.ff config

2015-05-21 Thread Paul Tan
Hi, On Tue, May 19, 2015 at 3:02 AM, Johannes Schindelin johannes.schinde...@gmx.de wrote: Hi Paul, On 2015-05-18 17:06, Paul Tan wrote: diff --git a/builtin/pull.c b/builtin/pull.c index 8982fdf..b305a47 100644 --- a/builtin/pull.c +++ b/builtin/pull.c @@ -209,6 +209,28 @@ static void

Re: [PATCH 02/14] pull: pass verbosity, --progress flags to fetch and merge

2015-05-21 Thread Paul Tan
Hi, On Tue, May 19, 2015 at 1:41 AM, Johannes Schindelin johannes.schinde...@gmx.de wrote: On 2015-05-18 17:05, Paul Tan wrote: diff --git a/builtin/pull.c b/builtin/pull.c index 0b771b9..a4d9c92 100644 --- a/builtin/pull.c +++ b/builtin/pull.c @@ -11,16 +11,64 @@ #include argv-array.h

[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 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

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 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

[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 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

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 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: [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

[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

[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

[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

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

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

[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: [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

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

[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/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

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/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 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-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

[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 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

[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: [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

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

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

[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 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

[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: [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

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: [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

[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

<    1   2   3   4   5   6   7   >