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

2016-04-04 Thread Matthieu Moy
Eric Sunshine writes: > Although I'm the one who brought up the idea of "automating" these > tests, I'm not convinced that it's an improvement in this case, but I > don't feel so strongly that I'd forbid it. Another option is to define helper functions to shorten the "manual" tests, e.g. define:

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

2016-04-04 Thread Matthieu Moy
Mehul Jain writes: > 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

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

2016-04-04 Thread Eric Sunshine
On Mon, Apr 4, 2016 at 1:36 PM, Mehul Jain wrote: > 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 () { >

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

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

2016-04-04 Thread Matthieu Moy
Mehul Jain writes: > 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_cmp_rev HEAD^ copy && >>>

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_cmp_rev HEAD^ copy && >> >> but this raise following error

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

2016-04-03 Thread Eric Sunshine
On Fri, Apr 1, 2016 at 6:27 AM, Mehul Jain wrote: > I tried out this method also. Below is the script that I wrote for this: > > test_autostash () { > OLDIFS=$IFS > IFS=',=' > while read -r expect cmd config_variable value > do > test_expect_success "$cmd, $config_varia

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

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

2016-03-30 Thread Eric Sunshine
On Wed, Mar 30, 2016 at 3:00 PM, Mehul Jain wrote: > 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 ni

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-03-29 Thread Eric Sunshine
On Tue, Mar 29, 2016 at 9:30 AM, Mehul Jain wrote: > "--[no-]autostash" option for git-pull is only valid in rebase mode. > That is, either --rebase is used or pull.rebase=true. Existing tests > already check the cases when --rebase is used but fails to check for > pull.rebase=true case. > > Add t

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

2016-03-29 Thread Mehul Jain
"--[no-]autostash" option for git-pull is only valid in rebase mode. That is, either --rebase is used or pull.rebase=true. Existing tests already check the cases when --rebase is used but fails to check for pull.rebase=true case. Add two new tests to check that --[no-]autostash option works with p