Re: Please add a git config option to make --show-signature the default

2016-05-25 Thread Mehul Jain
Hi, On Wed, May 25, 2016 at 9:28 AM, Austin English wrote: > I'll try > to submit my own patch. In the meantime, it seems appropriate to file > a bug so that others can have the opportunity to solve the problem if > they're interested. If you haven't started working on it and if no one else has

[RFC/PATCH 0/2] Introduce "log.showSignature" config variable

2016-05-26 Thread Mehul Jain
the problem: what if user wants to disable the setting of "log.showSignature=true" using a command line switch. Previous discussion on this: http://thread.gmane.org/gmane.comp.version-control.git/295405 Mehul Jain (2): log: add "log.showsignature" conf

[RFC/PATCH 1/2] log: add "log.showsignature" configuration variable

2016-05-26 Thread Mehul Jain
People may want to always use "--show-signature" while using "git log" or "git show". When log.showsignature set true, "git log" and "git show" will behave as "--show-signature" was given to them. Signed-off-by: Mehul Jain --- Documen

[RFC/PATCH 2/2] log: add "--no-show-signature" command line option

2016-05-26 Thread Mehul Jain
If "log.showsignature=true", then there is no way to override it using command line switch. Teach "git log" and "git show" about "--no-show-signature" command line option. Signed-off-by: Mehul Jain --- revision.c | 2 ++ t/t4202-log.sh | 7 +++

Re: [RFC/PATCH 1/2] log: add "log.showsignature" configuration variable

2016-05-26 Thread Mehul Jain
Hi Remi, Thanks for your input. On Thu, May 26, 2016 at 7:12 PM, Remi Galan Alfonso wrote: > Hi Mehul, > > Mehul Jain writes: >> When log.showsignature set true, "git log" and "git show" will behave > > 'When log.showsignature is set to true'

Re: [RFC/PATCH 1/2] log: add "log.showsignature" configuration variable

2016-05-26 Thread Mehul Jain
On Thu, May 26, 2016 at 9:13 PM, Remi Galan Alfonso wrote: > Sorry, I should have made explicit what went through my mind. > "When log.showsignature set true" doesn't sound right to me, while > "When log.showsignature is set to true" sounds better, however not > being a native english speaker mayb

Re: [RFC/PATCH 2/2] log: add "--no-show-signature" command line option

2016-05-26 Thread Mehul Jain
Hi, Thanks for your input. On Thu, May 26, 2016 at 10:02 PM, Jeff King wrote: > On Thu, May 26, 2016 at 06:36:47PM +0530, Mehul Jain wrote: >> diff --git a/t/t4202-log.sh b/t/t4202-log.sh >> index 36be9a1..ea24259 100755 >> --- a/t/t4202-log.sh >> +++ b/t/t4202-

Re: [RFC/PATCH 1/2] log: add "log.showsignature" configuration variable

2016-05-26 Thread Mehul Jain
On Thu, May 26, 2016 at 10:29 PM, Jeff King wrote: > On Thu, May 26, 2016 at 06:36:46PM +0530, Mehul Jain wrote: > The documentation here mentions "log" and "show". But I think this will > affect other programs, too, including "whatchanged" and "refl

Re: [RFC/PATCH 2/2] log: add "--no-show-signature" command line option

2016-05-26 Thread Mehul Jain
On Thu, May 26, 2016 at 10:52 PM, Junio C Hamano wrote: > Jeff King writes: > >> On Thu, May 26, 2016 at 06:36:47PM +0530, Mehul Jain wrote: >> >>> If "log.showsignature=true", then there is no way to override it using >>> command line switch. >

[PATCH 0/2] Introduce "log.showSignature" config variable

2016-06-05 Thread Mehul Jain
r wants to disable the setting of "log.showSignature=true" using a command line switch. * Thanks Junio, Jeff and Remi for helping in reference patch. Previous reference patch: http://thread.gmane.org/gmane.comp.version-control.git/295649 Mehul Jain (2): log: ad

[PATCH 1/2] log: add "log.showsignature" configuration variable

2016-06-05 Thread Mehul Jain
People may want to always use "--show-signature" while using "git log" and related commands. When log.showSignature is set to true, "git log" and related commands will behave as if "--show-signature" was given to them. Signed-off-by: Mehul Jain --- Docu

[PATCH 2/2] log: "--no-show-signature" commmand-line option

2016-06-05 Thread Mehul Jain
lem for the following commands: git-log, git-show, git-whatchanged and git-reflog. It does not suggest that we need "log.showSignature" config variable to affect other git commands, as currently "log.showSignature" is only meant to affect git-log, git-show, git-what

Re: [PATCH 2/2] log: "--no-show-signature" commmand-line option

2016-06-07 Thread Mehul Jain
On Tue, Jun 7, 2016 at 12:20 AM, Junio C Hamano wrote: > Mehul Jain writes: > >> If "log.showSignature=true", then there is no way to override it using >> command line switch. >> >> Teach git-log and related commands about "--no-showSignature"

[PATCH v2 0/2] Introduce log.showSignature config variable

2016-06-18 Thread Mehul Jain
* A new test has been introduced for "--no-show-signature" option. Previous patch: http://thread.gmane.org/gmane.comp.version-control.git/296474 [1]: http://thread.gmane.org/gmane.comp.version-control.git/296474/focus=296476 Mehul Jain (2): log: add "--no-show-signat

[PATCH v2 2/2] log: add log.showSignature configuration variable

2016-06-18 Thread Mehul Jain
t-log, git-show, git-whatchanged and git-reflog. Other commands like git-format-patch, git-rev-list are not to be affected by this config variable. Signed-off-by: Mehul Jain --- Documentation/git-log.txt | 4 builtin/log.c | 6 ++ t/t4202-log.sh| 25 +

[PATCH v2 1/2] log: add "--no-show-signature" command line option

2016-06-18 Thread Mehul Jain
make "git logss --no-show-signature" run without showing GPG signature. Signed-off-by: Mehul Jain --- revision.c | 2 ++ t/t4202-log.sh | 10 ++ 2 files changed, 12 insertions(+) diff --git a/revision.c b/revision.c index d30d1c4..3546ff9 100644 --- a/revision.c +++ b

Re: [PATCH v2 2/2] log: add log.showSignature configuration variable

2016-06-19 Thread Mehul Jain
Hi Eric, Thanks for your review. On Sun, Jun 19, 2016 at 12:29 PM, Eric Sunshine wrote: > On Sat, Jun 18, 2016 at 8:25 AM, Mehul Jain wrote: >> diff --git a/t/t4202-log.sh b/t/t4202-log.sh >> @@ -900,6 +900,31 @@ test_expect_success GPG '--no-show-signature overrides

[PATCH v3 0/3] Introduce log.showSignature config variable

2016-06-22 Thread Mehul Jain
n previous series [1]. [1]: http://thread.gmane.org/gmane.comp.version-control.git/297648 Mehul Jain (3): t4202: refactoring of test log: add "--no-show-signature" command line option log: add log.showSignature configuration variable Documentation/git-log.txt | 4

[PATCH v3 2/3] log: add "--no-show-signature" command line option

2016-06-22 Thread Mehul Jain
will make "git logss --no-show-signature" run without showing GPG signature. Signed-off-by: Mehul Jain --- revision.c | 2 ++ t/t4202-log.sh | 5 + 2 files changed, 7 insertions(+) diff --git a/revision.c b/revision.c index d30d1c4..3546ff9 100644 --- a/revision.c +++ b

[PATCH v3 3/3] log: add log.showSignature configuration variable

2016-06-22 Thread Mehul Jain
t-log, git-show, git-whatchanged and git-reflog. Other commands like git-format-patch, git-rev-list are not to be affected by this config variable. Signed-off-by: Mehul Jain --- Documentation/git-log.txt | 4 builtin/log.c | 6 ++ t/t4202-log.sh| 20

[PATCH v3 1/3] t4202: refactor test

2016-06-22 Thread Mehul Jain
Separate the creation of 'signed' branch so that other tests can take advantage of this branch. Signed-off-by: Mehul Jain --- t/t4202-log.sh | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/t/t4202-log.sh b/t/t4202-log.sh index 128ba93..ab66ee0 100755 ---

Re: [PATCH v3 0/3] Introduce log.showSignature config variable

2016-06-22 Thread Mehul Jain
On Thu, Jun 23, 2016 at 2:01 AM, Junio C Hamano wrote: > Mehul Jain writes: > >> Add a new configuratation variable "log.showSignature" for git-log >> and related commands. "log.showSignature=true" will enable user to >> see GPG signature

Re: [PATCH v3 0/3] Introduce log.showSignature config variable

2016-06-24 Thread Mehul Jain
On Thu, Jun 23, 2016 at 12:02 PM, Junio C Hamano wrote: > Mehul Jain writes: > >> In patch 2/3 and 3/3, there are many tests which requires a branch >> similar to that of "signed" branch, i.e. a branch with a commit having >> GPG signature. So previously

[PATCH v3 1/3] t4202: refactor test

2016-06-24 Thread Mehul Jain
. This way, it becomes clearer that tests added by subsequent patches reuse the 'signed' branch in the same way. Signed-off-by: Mehul Jain --- t/t4202-log.sh | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/t/t4202-log.sh b/t/t4202-log.sh index 128ba93..ab6

Re: [PATCH v7 2/2] pull --rebase: add --[no-]autostash flag

2016-03-11 Thread Mehul Jain
On Fri, Mar 11, 2016 at 10:21 AM, Paul Tan wrote: >> static int config_autostash = -1; > > Hmm, why can't config_autostash just default to 0? Previously Junio recommended not to explicitly initialize a static to 0 (or NULL). http://thread.gmane.org/gmane.comp.version-control.git/287709/focus=287

Re: [PATCH v7 2/2] pull --rebase: add --[no-]autostash flag

2016-03-11 Thread Mehul Jain
On Fri, Mar 11, 2016 at 7:00 PM, Matthieu Moy wrote: > What Junio says is that you don't need to write > > static int config_autostash = 0; > > since it is equivalent to > > static int config_autostash; > > But there's nothing wrong with having a static variable defaulting to 0. My bad. I should

Re: [PATCH v7 2/2] pull --rebase: add --[no-]autostash flag

2016-03-11 Thread Mehul Jain
On Fri, Mar 11, 2016 at 10:21 AM, Paul Tan wrote: > Stepping back a bit, the only reason why we introduced opt_autostash = > -1 as a possible value is because we need to detect if > --[no-]autostash is being used with git-merge. I consider that a > kludge, because if git-merge supports --autostash

[PATCH 1/2] git-pull.c: introduce git_pull_config()

2016-03-15 Thread Mehul Jain
Helped-by: Junio C Hamano Helped-by: Paul Tan Signed-off-by: Mehul Jain --- Previous patches: http://thread.gmane.org/gmane.comp.version-control.git/287709 Change: config_autostash initialized with 0 instead of -1 builtin/pull.c | 18 ++ 1 file changed, 14 insertions(+), 4 dele

[PATCH 2/2] pull --rebase: add --[no-]autostash flag

2016-03-15 Thread Mehul Jain
se" understands the --[no-]autostash option, it's just a matter of passing the option to underlying "git rebase" when "git pull --rebase" is called. Helped-by: Matthieu Moy Helped-by: Junio C Hamano Helped-by: Paul Tan Helped-by: Eric Sunshine Signed-off-by: Me

Re: [PATCH 2/2] pull --rebase: add --[no-]autostash flag

2016-03-15 Thread Mehul Jain
On Wed, Mar 16, 2016 at 3:13 AM, Eric Sunshine wrote: >> diff --git a/Documentation/git-pull.txt b/Documentation/git-pull.txt >> @@ -128,6 +128,15 @@ unless you have read linkgit:git-rebase[1] carefully. >> +--autostash:: >> +--no-autostash:: >> + Before starting rebase, stash local modifica

Re: [PATCH 2/2] pull --rebase: add --[no-]autostash flag

2016-03-19 Thread Mehul Jain
Hello Eric, I tried out this approach and here's the result. --- diff --git a/builtin/pull.c b/builtin/pull.c index b5b0255..0ce007d 100644 --- a/builtin/pull.c +++ b/builtin/pull.c @@ -86,6 +86,7 @@ static char *opt_commit; static char *opt_edit; static char *opt_ff; static char *opt_verify_

Re: [PATCH v9 2/2] pull --rebase: add --[no-]autostash flag

2016-03-19 Thread Mehul Jain
On Fri, Mar 18, 2016 at 10:09 AM, Eric Sunshine wrote: > On Fri, Mar 18, 2016 at 12:24 AM, Eric Sunshine > wrote: >> On Thu, Mar 17, 2016 at 12:49 PM, Mehul Jain >> wrote: >>> @@ -801,6 +804,7 @@ static int run_rebase(const unsigned char *curr_head, >>

[PATCH v9 2/2] pull --rebase: add --[no-]autostash flag

2016-03-19 Thread Mehul Jain
se" understands the --[no-]autostash option, it's just a matter of passing the option to underlying "git rebase" when "git pull --rebase" is called. Helped-by: Matthieu Moy Helped-by: Junio C Hamano Helped-by: Paul Tan Helped-by: Eric Sunshine Signed-off-by: Me

[PATCH v9 1/2] git-pull.c: introduce git_pull_config()

2016-03-19 Thread Mehul Jain
Helped-by: Junio C Hamano Helped-by: Paul Tan Signed-off-by: Mehul Jain --- previous patches: http://thread.gmane.org/gmane.comp.version-control.git/287709 builtin/pull.c | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/builtin/pull.c b/builtin/pull.c in

Re: [PATCH v9 2/2] pull --rebase: add --[no-]autostash flag

2016-03-19 Thread Mehul Jain
On Fri, Mar 18, 2016 at 9:54 AM, Eric Sunshine wrote: > Since this is now a patch series rather than a single patch, another > way to help reviewers is to use a cover letter (see git-format-patch > --cover-letter) where you'd explain the changes, and, importantly, > include an interdiff between th

[PATCH v10 1/2] git-pull.c: introduce git_pull_config()

2016-03-21 Thread Mehul Jain
Helped-by: Junio C Hamano Helped-by: Paul Tan Helped-by: Eric Sunshine Signed-off-by: Mehul Jain --- builtin/pull.c | 18 +++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/builtin/pull.c b/builtin/pull.c index 10eff03..c21897d 100644 --- a/builtin/pull.c

[PATCH v10 2/2] pull --rebase: add --[no-]autostash flag

2016-03-21 Thread Mehul Jain
se" understands the --[no-]autostash option, it's just a matter of passing the option to underlying "git rebase" when "git pull --rebase" is called. Helped-by: Matthieu Moy Helped-by: Junio C Hamano Helped-by: Paul Tan Helped-by: Eric Sunshine Signed-off-by: Mehul Jai

[PATCH v10 0/2] introduce --[no-]autostash command line flag

2016-03-21 Thread Mehul Jain
autostash & rebase.autostash unset' ' + git reset --hard before-rebase && + echo dirty >new_file && + git add new_file && + test_must_fail git pull --rebase --no-autostash . copy 2>err && + test_i18ngrep "Cannot p

[PATCH v10 2/2] pull --rebase: add --[no-]autostash flag

2016-03-21 Thread Mehul Jain
se" understands the --[no-]autostash option, it's just a matter of passing the option to underlying "git rebase" when "git pull --rebase" is called. Helped-by: Matthieu Moy Helped-by: Junio C Hamano Helped-by: Paul Tan Helped-by: Eric Sunshine Signed-off-by: Mehul Jai

git-apply does not work in a sub-directory of a Git repository

2016-03-22 Thread Mehul Jain
Hello everyone, Recently while using git-apply, I observed that if git-apply is used in a sub-directory of a Git repository then it silently dies without doing anything. Here's what I did ~ $mkdir example ~ $cd example example $git init Initialized empty Git repository in /home/mj/example/.git/

Re: git-apply does not work in a sub-directory of a Git repository

2016-03-23 Thread Mehul Jain
On Wed, Mar 23, 2016 at 8:51 PM, Junio C Hamano wrote: > I think we do have --no-index (which is why I am largely ignoring > the rest of your message as uninformed speculation for now). --no-index command line flag is there for git-apply but unfortunately not documented. Also *auto-completion* f

Re: Regarding GSoC 2016

2016-03-24 Thread Mehul Jain
On Thu, Mar 24, 2016 at 11:13 PM, Saurabh Jain wrote: > The proposal can be accessed here. > 5mWF_cqoZS6IUvGr6CVu5SmkbZk/edit?usp=sharing> It's broken I guess. Also Cc Carlos Martín Nieto . He is one of the possible mentor on this one. >

Re: [PATCH v10 0/2] introduce --[no-]autostash command line flag

2016-03-25 Thread Mehul Jain
On Fri, Mar 25, 2016 at 12:53 PM, Eric Sunshine wrote: > On Mon, Mar 21, 2016 at 2:18 PM, Mehul Jain wrote: >> Changes introduced w.r.t. previous patch: >> [...] >> * Two more tests are added to checkout for error when "git pull >> --[no-]autostash&qu

Re: [PATCH v10 2/2] pull --rebase: add --[no-]autostash flag

2016-03-25 Thread Mehul Jain
On Fri, Mar 25, 2016 at 2:01 PM, Eric Sunshine wrote: >> +test_expect_success 'pull --rebase --autostash & rebase.autostash=true' ' > > Nit: Some of the test titles spell this as "rebase.autostash" while > others use "rebase.autoStash". That's a mistake. All test titles must spell "rebase.autoSta

Re: [PATCH v10 2/2] pull --rebase: add --[no-]autostash flag

2016-03-25 Thread Mehul Jain
On Fri, Mar 25, 2016 at 2:35 PM, Matthieu Moy wrote: > Mehul Jain writes: > >> +--autostash:: >> +--no-autostash:: >> + Before starting rebase, stash local modifications away (see >> + linkgit:git-stash[1]) if needed, and apply the stash when >> +

Re: [PATCH v10 2/2] pull --rebase: add --[no-]autostash flag

2016-03-25 Thread Mehul Jain
On Sat, Mar 26, 2016 at 12:07 AM, Matthieu Moy wrote: > I think you should also change one of the tests to use pull.resbase=true > so that this behavior is properly tested. Sure. I will add this test in the re-roll. Thanks, Mehul -- To unsubscribe from this list: send the line "unsubscribe git"

[PATCH 2/5] t/t5520: explicitly unset rebase.autostash

2016-03-29 Thread Mehul Jain
Tests title suggest that tests are done with rebase.autostash unset, but doesn not take any action to make sure that it is indeed unset. Make sure that rebase.autostash is unset by explicitly setting it. Signed-off-by: Mehul Jain --- t/t5520-pull.sh | 2 ++ 1 file changed, 2 insertions

[PATCH 3/5] t/t5520: use test_i18ngrep instead of test_cmp

2016-03-29 Thread Mehul Jain
test_cmp is used for error checking when test_i18ngrep could be used. Use test_i18ngrep to check for the valid error. Signed-off-by: Mehul Jain --- t/t5520-pull.sh | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/t/t5520-pull.sh b/t/t5520-pull.sh index 9ee2218

[PATCH 0/5] modify tests for --[no-]autostash option

2016-03-29 Thread Mehul Jain
when "git pull --[no-]autostash" is called with pull.rebase=true. Mehul Jain (5): t/t5520: change rebase.autoStash to rebase.autostash t/t5520: explicitly unset rebase.autostash t/t5520: use test_i18ngrep instead of test_cmp t/t5520: modify tests to reduce common code

[PATCH 1/5] t/t5520: change rebase.autoStash to rebase.autostash

2016-03-29 Thread Mehul Jain
Signed-off-by: Mehul Jain --- t/t5520-pull.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/t5520-pull.sh b/t/t5520-pull.sh index 745e59e..5be39df 100755 --- a/t/t5520-pull.sh +++ b/t/t5520-pull.sh @@ -267,7 +267,7 @@ test_expect_success 'pull --rebase --auto

[PATCH 4/5] t/t5520: modify tests to reduce common code

2016-03-29 Thread Mehul Jain
There exist three groups of tests which have repetitive lines of code. Introduce two functions test_rebase_autostash() and test_rebase_no_autostash() to reduce the number of lines. Also introduce loops to futher reduce the current implementation. Helped-by: Eric Sunshine Signed-off-by: Mehul

[PATCH 5/5] t/t5520: test --[no-]autostash with pull.rebase=true

2016-03-29 Thread Mehul Jain
works with pull.rebase=true. Signed-off-by: Mehul Jain --- t/t5520-pull.sh | 20 1 file changed, 20 insertions(+) diff --git a/t/t5520-pull.sh b/t/t5520-pull.sh index 2611170..4da9e52 100755 --- a/t/t5520-pull.sh +++ b/t/t5520-pull.sh @@ -316,6 +316,26 @@ test_expe

Re: [PATCH 5/5] t/t5520: test --[no-]autostash with pull.rebase=true

2016-03-30 Thread Mehul Jain
Hi Eric, Thanks for the reviews on this series. On Wed, Mar 30, 2016 at 2:46 AM, Eric Sunshine wrote: > With the exception of the missing --rebase argument, this is exactly > the same code as in test_rebase_autostash(), right? Rather than > repeating this code yet again, it might be nice to augm

Re: [PATCH 5/5] t/t5520: test --[no-]autostash with pull.rebase=true

2016-04-01 Thread Mehul Jain
Hi Eric, On Thu, Mar 31, 2016 at 2:01 AM, Eric Sunshine wrote: > One other possibility would be to make this all table-driven by > collecting all of the above state information into a table and then > feeding that into a function (either as its argument list or via > stdin). For instance: > >

[PATCH v2 0/7] t5520: tests for --[no-]autostash option

2016-04-02 Thread Mehul Jain
se true && - git reset --hard before-rebase && - echo dirty >new_file && - git add new_file && - git pull --autostash . copy && - test_cmp_rev HEAD^ copy && - test "$(cat new_file)" = dirty &&

[PATCH v2 2/7] t5520: ensure consistent test conditions

2016-04-02 Thread Mehul Jain
rebase.autostash. Signed-off-by: Mehul Jain --- t/t5520-pull.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/t/t5520-pull.sh b/t/t5520-pull.sh index 5be39df..9ee2218 100755 --- a/t/t5520-pull.sh +++ b/t/t5520-pull.sh @@ -279,6 +279,7 @@ test_expect_success 'pull --rebase --auto

[PATCH v2 1/7] t5520: use consistent capitalization in test titles

2016-04-02 Thread Mehul Jain
Signed-off-by: Mehul Jain --- t/t5520-pull.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/t5520-pull.sh b/t/t5520-pull.sh index 745e59e..5be39df 100755 --- a/t/t5520-pull.sh +++ b/t/t5520-pull.sh @@ -267,7 +267,7 @@ test_expect_success 'pull --rebase --auto

[PATCH v2 3/7] t5520: use better test to check stderr output

2016-04-02 Thread Mehul Jain
Checking stderr output using test_i18ncmp may lead to test failure as some shells write trace output to stderr when run under 'set -x'. Use test_i18ngrep instead of test_i18ncmp. Signed-off-by: Mehul Jain --- t/t5520-pull.sh | 10 -- 1 file changed, 4 insertions(+), 6

[PATCH v2 4/7] t5520: factor out common code

2016-04-02 Thread Mehul Jain
Four tests contains repetitive lines of code. Factor out common code into test_pull_autostash() and then call it in these tests. Helped-by: Eric Sunshine Signed-off-by: Mehul Jain --- t/t5520-pull.sh | 44 +++- 1 file changed, 15 insertions(+), 29

[PATCH v2 6/7] t5520: reduce commom lines of code

2016-04-02 Thread Mehul Jain
These two tests are almost similar and thus can be folded in a for-loop. Helped-by: Eric Sunshine Signed-off-by: Mehul Jain --- t/t5520-pull.sh | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/t/t5520-pull.sh b/t/t5520-pull.sh index fb9f845..e12af96 100755

[PATCH v2 7/7] t5520: test --[no-]autostash with pull.rebase=true

2016-04-02 Thread Mehul Jain
tion works with pull.rebase=true. Signed-off-by: Mehul Jain --- t/t5520-pull.sh | 10 ++ 1 file changed, 10 insertions(+) diff --git a/t/t5520-pull.sh b/t/t5520-pull.sh index e12af96..bed75f5 100755 --- a/t/t5520-pull.sh +++ b/t/t5520-pull.sh @@ -314,6 +314,16 @@ test_expect_success &#

[PATCH v2 5/7] t5520: factor out common code

2016-04-02 Thread Mehul Jain
Three tests contains repetitive lines of code. Factor out common code into test_pull_autostash_fail() and then call it in these tests. Helped-by: Eric Sunshine Signed-off-by: Mehul Jain --- t/t5520-pull.sh | 26 +++--- 1 file changed, 11 insertions(+), 15 deletions

Re: [PATCH v2 6/7] t5520: reduce commom lines of code

2016-04-02 Thread Mehul Jain
On Sun, Apr 3, 2016 at 12:20 AM, Johannes Sixt wrote: > Am 02.04.2016 um 19:58 schrieb Mehul Jain: >> +for i in --autostash --no-autostash >> +do >> + test_expect_success "pull $i (without --rebase) is illegal" ' >> +

[PATCH v2 6/7] t5520: reduce commom lines of code

2016-04-03 Thread Mehul Jain
These two tests are almost similar and thus can be folded in a for-loop. Helped-by: Eric Sunshine Signed-off-by: Mehul Jain --- t/t5520-pull.sh | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/t/t5520-pull.sh b/t/t5520-pull.sh index fb9f845..e12af96 100755

Re: [PATCH 5/5] t/t5520: test --[no-]autostash with pull.rebase=true

2016-04-04 Thread Mehul Jain
On Mon, Apr 4, 2016 at 12:58 AM, Eric Sunshine wrote: > On Fri, Apr 1, 2016 at 6:27 AM, Mehul Jain wrote: >> In test_autostash() there's a line >> >> echo test_cmp_rev HEAD^ copy && >> >> Originally it should have been >> >> test_

Re: [PATCH v2 0/7] t5520: tests for --[no-]autostash option

2016-04-04 Thread Mehul Jain
On Mon, Apr 4, 2016 at 1:01 PM, Matthieu Moy wrote: > Mehul Jain writes: > >> -test_rebase_autostash () { >> +test_pull_autostash () { >> git reset --hard before-rebase && >> echo dirty >new_file && >> git add ne

Re: [PATCH v2 0/7] t5520: tests for --[no-]autostash option

2016-04-04 Thread Mehul Jain
On Mon, Apr 4, 2016 at 10:30 PM, Junio C Hamano wrote: > Matthieu Moy writes: > >> Mehul Jain writes: >> >>> -test_rebase_autostash () { >>> +test_pull_autostash () { >>> git reset --hard before-rebase && >>> echo dir

Re: [PATCH 5/5] t/t5520: test --[no-]autostash with pull.rebase=true

2016-04-04 Thread Mehul Jain
On Mon, Apr 4, 2016 at 10:22 PM, Matthieu Moy wrote: > I think it would be much simpler to drop the loop, and write instead > something like (untested): I tested it (with few minor changes), and worked fine. test_autostash () { OLDIFS=$IFS IFS='=' set -- $* IFS=$O

GSoC 2016

2016-02-18 Thread Mehul Jain
Hello everyone, I'm Mehul Jain. I'm looking for participating in GSoC 2016. I've started work on a Microproject" Teach git pull --rebase the --no-autostash" option. While looking at Git's source code I have made following observation: In the pull.c file 1. git_conf

GSoC 2016: Microproject

2016-02-19 Thread Mehul Jain
Hello everyone, I'm Mehul Jain. I'm looking for participating in GSoC 2016. I've started work on a Microproject" Teach git pull --rebase the --no-autostash" option. While looking at Git's source code I have made following observation: In the pull.c file 1. git_conf

Re: GSoC 2016: Microproject

2016-02-19 Thread Mehul Jain
]autostash" means "rebase.autostash" should be set false for current execution of command "git pull --rebase". So do I have to write a test for this new option? Mehul Jain -- 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: GSoC 2016: Microproject

2016-02-19 Thread Mehul Jain
st for this case. Mehul Jain -- 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: GSoC 2016: Microproject

2016-02-20 Thread Mehul Jain
]: *** [t5539-fetch-http-shallow.sh] Error 1 make[1]: Leaving directory `/home/mj/git/t' make: *** [test] Error 2 Is this test failure usual with linux based system or just happened with me. I'm running Ubuntu 14.04. thanks, Mehul Jain On Fri, Feb 19, 2016 at 11:20 PM, Stefan Beller wrot

Re: GSoC 2016: Microproject

2016-02-21 Thread Mehul Jain
ase --[no-]autostash fails with dirty working tree and rebase.autostash set" should be added to t/t5520-pull.sh. Have I made the right observation? Thanks, Mehul Jain -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vge

Re: GSoC 2016: Microproject

2016-02-21 Thread Mehul Jain
t_path_is_file possible_sub1/hello.world && # test_path_is_missing to_clean # I haven't made any commits/changes in the master branch. Can you please suggest where things are going wrong. Thanks Mehul Jain -- 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: GSoC 2016: Microproject

2016-02-22 Thread Mehul Jain
ports except 80 and 443. Also my .gitconfig file is properly configured for proxy. Can these tests failure be triggered because of proxy server? Thanks, Mehul Jain -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kerne

Re: GSoC 2016: Microproject

2016-02-22 Thread Mehul Jain
On Mon, Feb 22, 2016 at 3:50 PM, Duy Nguyen wrote: > You may have an http server installed but not suitable for these > tests. Try running one test file alone with -v -i, e.g. > ./t5539-fetch-http-shallow.sh -v -i and post the output. Here's the output :- expecting success: git clone --bare

Re: GSoC 2016: Microproject

2016-02-22 Thread Mehul Jain
All tests passed. I configured apache server to listen to the ports tests were trying to access. Thanks Lars. I tested on Traivs-CI, worked fine. :) Mehul Jain -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majo

[GSoC] Microproject :- Teaching git pull --rebase the --no-autostash flag

2016-02-26 Thread Mehul Jain
would like to know your opinion on this option. Thanks! Mehul Jain (1): Add --no-autostash flag to git pull --rebase builtin/pull.c | 12 t/t5520-pull.sh | 8 t/t5521-pull-options.sh | 24 3 files changed, 40 insertions(+), 4 de

[PATCH] Add --no-autostash flag to git pull --rebase

2016-02-26 Thread Mehul Jain
e.autostash"(if "rebase.autostash" is not set then git pull --rebase will die if directory is dirty). Signed-off-by: Mehul Jain --- builtin/pull.c | 12 t/t5520-pull.sh | 8 t/t5521-pull-options.sh | 24 3 files changed, 40 inser

Re: [GSoC] Microproject :- Teaching git pull --rebase the --no-autostash flag

2016-02-26 Thread Mehul Jain
On Fri, Feb 26, 2016 at 5:21 PM, Paul Tan wrote: > That was the point of the microproject ;-). --[no-]autostash means > both --autostash and --no-autostash. Oops, my bad. I will add the necessary changes :-). Thanks, Mehul -- To unsubscribe from this list: send the line "unsubscribe git" in the

Re: [PATCH] Add --no-autostash flag to git pull --rebase

2016-02-26 Thread Mehul Jain
pull -q --rebase --no-autostash "../parent" >out 2>err && >> + test_must_be_empty err && >> + test_must_be_empty out) >> +' >> + >> +test_expect_success 'git pull -v --rebase --no-autostash' ' >> +

[PATCH v2 2/2] Documentation/git-pull.txt: teach 'git pull --rebase' the --[no-]autostash option.

2016-02-27 Thread Mehul Jain
rebase on a dirty worktree. With "--no-autostash" option, the command will die if the worktree is dirty, before calling rebase. Signed-off-by: Mehul Jain --- Documentation/git-pull.txt | 16 1 file changed, 16 insertions(+) diff --git a/Documentation/git-p

[PATCH v2 1/2] pull --rebase: add --[no-]autostash flag

2016-02-27 Thread Mehul Jain
rebase on a dirty worktree. With "--no-autostash" option, the command will die if the worktree is dirty, before calling rebase. Signed-off-by: Mehul Jain --- Thanks to Paul and Matthieu for comments on previous round. Changes: - --autostash flag added - OPT_COLOR_FL

Re: [PATCH v2 1/2] pull --rebase: add --[no-]autostash flag

2016-02-28 Thread Mehul Jain
On Sun, Feb 28, 2016 at 12:56 AM, Junio C Hamano wrote: > Mehul Jain writes: > >> git pull --rebase understands --[no-]autostash flag. >> >> This flag overrides config variable "rebase.autoStash" >> if set (default is false). > > Is that a state

[PATCH v3 1/3] pull --rebase: add --[no-]autostash flag

2016-03-03 Thread Mehul Jain
se" understands the --[no]autostash option, it's just a matter of passing the option to underlying "git rebase" when "git pull --rebase" is called. Helped-by: Matthieu Moy Helped-by: Junio C Hamano Helped-by: Paul Tan Signed-off-by: Mehul Jain --- Sorry for a lat

[PATCH v3 2/3] test: add test for --[no-]autostash flag

2016-03-03 Thread Mehul Jain
Signed-off-by: Mehul Jain --- t/t5520-pull.sh | 19 +++ t/t5521-pull-options.sh | 16 2 files changed, 35 insertions(+) diff --git a/t/t5520-pull.sh b/t/t5520-pull.sh index c952d5e..f5d1d31 100755 --- a/t/t5520-pull.sh +++ b/t/t5520-pull.sh @@ -245,6

[PATCH v3 3/3] Documentation/git-pull: document --[no-]autostash option

2016-03-03 Thread Mehul Jain
Signed-off-by: Mehul Jain --- Documentation/git-pull.txt | 15 +++ 1 file changed, 15 insertions(+) diff --git a/Documentation/git-pull.txt b/Documentation/git-pull.txt index a62a2a6..a593972 100644 --- a/Documentation/git-pull.txt +++ b/Documentation/git-pull.txt @@ -128,6 +128,21

Re: [PATCH v3 3/3] Documentation/git-pull: document --[no-]autostash option

2016-03-03 Thread Mehul Jain
On Thu, Mar 3, 2016 at 10:44 PM, Junio C Hamano wrote: > Should this entry this verbose? > > - Is there a non-temporary stash? > > - I think "This means that ..." is totally unnecessary. > > - It probably makes sense to have "This option is only valid..." as >a separate second paragraph as

Re: [PATCH v3 1/3] pull --rebase: add --[no-]autostash flag

2016-03-03 Thread Mehul Jain
On Thu, Mar 3, 2016 at 10:54 PM, Matthieu Moy wrote: > Mehul Jain writes: > >> If rebase.autoStash configuration variable is >> set, there is no way to override it for >> "git pull --rebase" from the command line. >> >> Teach "git pull --reb

Re: [PATCH v3 2/3] test: add test for --[no-]autostash flag

2016-03-03 Thread Mehul Jain
On Thu, Mar 3, 2016 at 11:01 PM, Matthieu Moy wrote: > There's no need to split code/test/doc into separate patches, except if > your patches are getting really huge. As a reviewer, I like having tests > and doc in the same patch because they describe the intention of the > programmer. > > We try

[PATCH v4] pull --rebase: add --[no-]autostash flag

2016-03-05 Thread Mehul Jain
se" understands the --[no-]autostash option, it's just a matter of passing the option to underlying "git rebase" when "git pull --rebase" is called. Helped-by: Matthieu Moy Helped-by: Junio C Hamano Helped-by: Paul Tan Helped-by: Eric Sunshine Signed-off-by: M

Re: [PATCH v4] pull --rebase: add --[no-]autostash flag

2016-03-05 Thread Mehul Jain
On Sat, Mar 5, 2016 at 3:22 PM, Mehul Jain wrote: > Changes: > * --no-autostash is passed to git-rebase (suggested by Paul) > > * Error message changed when "git pull --[no-]autostash" is called. > > * If rebase.autoStash is unset and user

Re: [PATCH v4] pull --rebase: add --[no-]autostash flag

2016-03-07 Thread Mehul Jain
Hi Junio, Thanks for the thorough review. On Sat, Mar 5, 2016 at 10:34 PM, Junio C Hamano wrote: > Is it worth checking the case where autostash kicks in, rebase > itself is completed successfully, but the final "stash pop" fails in > conflict? I am thinking aloud and just wondering, not sugges

[PATCH v5] pull --rebase: add --[no-]autostash flag

2016-03-07 Thread Mehul Jain
d-by: Paul Tan Helped-by: Eric Sunshine Signed-off-by: Mehul Jain --- Previous patches: $gname287709 Changes: * Documentation modified * Introduced a callback function to read config variables. * Introduce two new tests * Modified previous tests because: if worktree is dirty and --

[PATCH v6 1/2] git-pull.c: introduce git_pull_config()

2016-03-08 Thread Mehul Jain
Helped-by: Junio C Hamano Signed-off-by: Mehul Jain --- previous patches: $gname287709 This is a clean-up patch to add --[no-]autostash option to "git pull --rebase". builtin/pull.c | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/builtin

[PATCH v6 2/2] pull --rebase: add --[no-]autostash flag

2016-03-08 Thread Mehul Jain
se" understands the --[no-]autostash option, it's just a matter of passing the option to underlying "git rebase" when "git pull --rebase" is called. Helped-by: Matthieu Moy Helped-by: Junio C Hamano Helped-by: Paul Tan Helped-by: Eric Sunshine Signed-off-by:

[PATCH v7 2/2] pull --rebase: add --[no-]autostash flag

2016-03-08 Thread Mehul Jain
se" understands the --[no-]autostash option, it's just a matter of passing the option to underlying "git rebase" when "git pull --rebase" is called. Helped-by: Matthieu Moy Helped-by: Junio C Hamano Helped-by: Paul Tan Helped-by: Eric Sunshine Signed-off-by:

[PATCH v7 1/2] git-pull.c: introduce git_pull_config()

2016-03-08 Thread Mehul Jain
Helped-by: Junio C Hamano Signed-off-by: Mehul Jain --- previous patches: $gname287709 This is a clean-up patch to add --[no-]autostash option to "git pull --rebase". builtin/pull.c | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/builtin