Re-sending, but this time in plain text (why doesn't gmail for android
support that...)
On Mon, Apr 30, 2018 at 7:35 AM, Joel Teichroeb wrote:
> Hi Paul,
>
> That sounds great to me!
>
> Thanks,
> Joel
>
>
> On Sat, Apr 28, 2018, 3:06 PM Paul-Sebastian Ungu
simply be renamed and
the shell script deleted.
Delete the contents of the apply_stash shell function and replace
it with a call to stash--helper apply until pop is also
converted.
Signed-off-by: Joel Teichroeb
---
.gitignore | 1 +
Makefile| 1 +
builtin.h
Add stash pop to the helper and delete the pop_stash, drop_stash,
assert_stash_ref and pop_stash functions from the shell script
now that they are no longer needed.
Signed-off-by: Joel Teichroeb
---
builtin/stash--helper.c | 41
git-stash.sh
commands are called externally. Once
pop is converted they can both be removed.
Signed-off-by: Joel Teichroeb
---
builtin/stash--helper.c | 107
git-stash.sh| 4 +-
2 files changed, 109 insertions(+), 2 deletions(-)
diff --git a
hen forking/cmd_* is used
Joel Teichroeb (5):
stash: improve option parsing test coverage
stash: convert apply to builtin
stash: convert drop and clear to builtin
stash: convert branch to builtin
stash: convert pop to builtin
.gitignore | 1 +
Makefile
In preparation for converting the stash command incrementally to
a builtin command, this patch improves test coverage of the option
parsing. Both for having too many parameters, or too few.
Signed-off-by: Joel Teichroeb
---
t/t3903-stash.sh | 35 +++
1 file
Add stash branch to the helper and delete the apply_to_branch
function from the shell script.
Signed-off-by: Joel Teichroeb
---
builtin/stash--helper.c | 51 +
git-stash.sh| 17 ++---
2 files changed, 53 insertions(+), 15
On Thu, Mar 29, 2018 at 1:07 PM, Junio C Hamano wrote:
> Joel Teichroeb writes:
>
>> +static int get_stash_info(struct stash_info *info, int argc, const char
>> **argv)
>> +{
>
> So, this roughly corresponds to parse_flags_and_rev function, it seems.
>
&g
Add stash branch to the helper and delete the apply_to_branch
function from the shell script.
Signed-off-by: Joel Teichroeb
---
builtin/stash--helper.c | 47 +++
git-stash.sh| 17 ++---
2 files changed, 49 insertions(+), 15
Add stash pop to the helper and delete the pop_stash, drop_stash,
assert_stash_ref and pop_stash functions from the shell script
now that they are no longer needed.
Signed-off-by: Joel Teichroeb
---
builtin/stash--helper.c | 41
git-stash.sh
s://public-inbox.org/git/20180327054432.26419-1-j...@teichroeb.net/
Changes from v3:
- Fix the Windows build
- Fix a use after free in the error handling
Joel Teichroeb (5):
stash: improve option parsing test coverage
stash: convert apply to builtin
stash: convert drop and clear to buil
In preparation for converting the stash command incrementally to
a builtin command, this patch improves test coverage of the option
parsing. Both for having too many paramerters, or too few.
Signed-off-by: Joel Teichroeb
---
t/t3903-stash.sh | 16
1 file changed, 16 insertions
simply be renamed and
the shell script deleted.
Delete the contents of the apply_stash shell function and replace
it with a call to stash--helper apply until pop is also
converted.
Signed-off-by: Joel Teichroeb
---
.gitignore | 1 +
Makefile| 1 +
builtin.h
commands are called externally. Once
pop is converted they can both be removed.
Signed-off-by: Joel Teichroeb
---
builtin/stash--helper.c | 101
git-stash.sh| 4 +-
2 files changed, 103 insertions(+), 2 deletions(-)
diff --git a
On Mon, Mar 26, 2018 at 12:05 AM, Christian Couder
wrote:
> On Mon, Mar 26, 2018 at 3:14 AM, Joel Teichroeb wrote:
>> Signed-off-by: Joel Teichroeb
>
> The commit message in this patch and the following ones could be a bit
> more verbose. It could at least tell that the end
On Sun, Mar 25, 2018 at 9:43 AM, Thomas Gummerer wrote:
> On 03/24, Joel Teichroeb wrote:
>> ---
>
> Missing sign-off? I saw it's missing in the other patches as well.
>
Thanks! I always forget to add a sign-off.
>> [...]
>> +
>> + if (info->ha
On Tue, Mar 27, 2018 at 9:02 AM, Johannes Schindelin
wrote:
> Hi Joel,
>
> [...]
>> +
>> +static int do_apply_stash(const char *prefix, struct stash_info *info, int
>> index)
>> +{
>> + struct merge_options o;
>> + struct object_id c_tree;
>> + struct object_id index_tree;
>> + co
Add stash pop to the helper and delete the pop_stash, drop_stash,
assert_stash_ref and pop_stash functions from the shell script
now that they are no longer needed.
Signed-off-by: Joel Teichroeb
---
builtin/stash--helper.c | 41
git-stash.sh
Add stash branch to the helper and delete the apply_to_branch
function from the shell script.
Signed-off-by: Joel Teichroeb
---
builtin/stash--helper.c | 47 +++
git-stash.sh| 17 ++---
2 files changed, 49 insertions(+), 15
commands are called externally. Once
pop is converted they can both be removed.
Signed-off-by: Joel Teichroeb
---
builtin/stash--helper.c | 101
git-stash.sh| 4 +-
2 files changed, 103 insertions(+), 2 deletions(-)
diff --git a
simply be renamed and
the shell script deleted.
Delete the contents of the apply_stash shell function and replace
it with a call to stash--helper apply until pop is also
converted.
Signed-off-by: Joel Teichroeb
---
.gitignore | 1 +
Makefile| 1 +
builtin.h
1-j...@teichroeb.net/
Changes from v2:
- Fixed formatting (I keep forgetting to set vim to tabs)
- Renamed destroy to free
- Redid my tests to validate more (Thanks Johannes)
- Deleted more shell code that isn't needed anymore
Joel Teichroeb (5):
stash: improve option parsing test
In preparation for converting the stash command incrementally to
a builtin command, this patch improves test coverage of the option
parsing. Both for having too many paramerters, or too few.
Signed-off-by: Joel Teichroeb
---
t/t3903-stash.sh | 16
1 file changed, 16 insertions
Signed-off-by: Joel Teichroeb
---
builtin/stash--helper.c | 101
git-stash.sh| 4 +-
2 files changed, 103 insertions(+), 2 deletions(-)
diff --git a/builtin/stash--helper.c b/builtin/stash--helper.c
index 050de415b4..640de6d0aa
Signed-off-by: Joel Teichroeb
---
builtin/stash--helper.c | 41 +
git-stash.sh| 39 ---
2 files changed, 45 insertions(+), 35 deletions(-)
diff --git a/builtin/stash--helper.c b/builtin/stash--helper.c
index
Signed-off-by: Joel Teichroeb
---
t/t3903-stash.sh | 22 ++
1 file changed, 22 insertions(+)
diff --git a/t/t3903-stash.sh b/t/t3903-stash.sh
index aefde7b172..7146e27bb5 100755
--- a/t/t3903-stash.sh
+++ b/t/t3903-stash.sh
@@ -45,6 +45,12 @@ test_expect_success 'app
tting
- Fixed typos
- Removed old .sh code that has been replaced
- Fix differences in error messages
- Added tests to ensure argument handling work when specifiying
multiple refs, or no arguments for branch
- Refactored the code a bit
- Reordered the patches so they compile and tes
Signed-off-by: Joel Teichroeb
---
.gitignore | 1 +
Makefile| 1 +
builtin.h | 1 +
builtin/stash--helper.c | 431
git-stash.sh| 75 +
git.c | 1 +
6 files
Signed-off-by: Joel Teichroeb
---
builtin/stash--helper.c | 47 +++
git-stash.sh| 17 ++---
2 files changed, 49 insertions(+), 15 deletions(-)
diff --git a/builtin/stash--helper.c b/builtin/stash--helper.c
index 640de6d0aa
Signed-off-by: Joel Teichroeb
---
t/t3903-stash.sh | 4
1 file changed, 4 insertions(+)
diff --git a/t/t3903-stash.sh b/t/t3903-stash.sh
index 7146e27bb5..261571d02a 100755
--- a/t/t3903-stash.sh
+++ b/t/t3903-stash.sh
@@ -497,6 +497,10 @@ test_expect_success 'stash branch complains
On Sun, Mar 25, 2018 at 1:09 AM, Christian Couder
wrote:
> It seems to me that the apply_stash() shell function is also used in
> pop_stash() and in apply_to_branch(). Can the new helper be used there
> too instead of apply_stash()? And then could apply_stash() be remove?
I wasn't really sure if
---
builtin/stash--helper.c | 44
git-stash.sh| 3 ++-
2 files changed, 46 insertions(+), 1 deletion(-)
diff --git a/builtin/stash--helper.c b/builtin/stash--helper.c
index e9a9574f40..18c4aba665 100644
--- a/builtin/stash--helper.c
+++ b/
to be interest from GSOC students who want to
work on converting builtins, I figured I should finish what I
have that works now so they could build on top of it.
Joel Teichroeb (4):
stash: convert apply to builtin
stash: convert branch to builtin
stash: convert drop and clear to builtin
s
---
builtin/stash--helper.c | 93 +
git-stash.sh| 4 +--
2 files changed, 95 insertions(+), 2 deletions(-)
diff --git a/builtin/stash--helper.c b/builtin/stash--helper.c
index 18c4aba665..1598b82ac2 100644
--- a/builtin/stash--helper.c
---
builtin/stash--helper.c | 38 ++
git-stash.sh| 3 ++-
2 files changed, 40 insertions(+), 1 deletion(-)
diff --git a/builtin/stash--helper.c b/builtin/stash--helper.c
index 1598b82ac2..b912f84c97 100644
--- a/builtin/stash--helper.c
+++ b/builti
---
.gitignore | 1 +
Makefile| 1 +
builtin.h | 1 +
builtin/stash--helper.c | 339
git-stash.sh| 3 +-
git.c | 1 +
6 files changed, 345 insertions(+), 1 deletion(-
Thanks for your comments! I've incorporated them all for the next patch set.
Start moving stash functions over to builtin c code and call
them in the shell script, instead of converting it all at
once.
Signed-off-by: Joel Teichroeb
---
Makefile| 1 +
builtin.h | 1 +
builtin/stash--helper.c | 516
If the merge does not have anything to do, it does not unlock the index,
causing any further index operations to fail. Thus, always unlock the index
regardless of outcome.
Signed-off-by: Joel Teichroeb
---
merge-recursive.c | 9 ++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff
ld be easier to convert
the rest of the commands one at a time without breaking
anything.
I've sent most of this code before, but that was targetting a
full replacement of stash. The code is overall the same, but
with some code review changes and updates for internal api
changes.
Joel Teichroeb
at 4:09 AM, Johannes Schindelin
wrote:
> Hi Joel,
>
> On Sun, 28 May 2017, Joel Teichroeb wrote:
>
>> I've rewritten git stash as a builtin c command. All tests pass,
>> and I've added two new tests. Test coverage is around 95% with the
>> only thin
Hi Junio,
I was just too lazy to write a cover letter, and thought these would
make sense on their own. I'll make sure to include a cover letter next
time.
I just ripped them out of my patch series on implementing stash as a
builtin[1]. Since I haven't had time, I figured I could at least get
the
All that we are really testing here is that the message is
correct when we are not on any branch. All other functionality is
already tested elsewhere.
Signed-off-by: Joel Teichroeb
---
t/t3903-stash.sh | 12
1 file changed, 12 insertions(+)
diff --git a/t/t3903-stash.sh b/t/t3903
Ensure the command suceeds and outputs nothing
Signed-off-by: Joel Teichroeb
---
t/t3903-stash.sh | 8
1 file changed, 8 insertions(+)
diff --git a/t/t3903-stash.sh b/t/t3903-stash.sh
index 4046817d70..f0708ced27 100755
--- a/t/t3903-stash.sh
+++ b/t/t3903-stash.sh
@@ -444,6 +444,14
If the return value of merge recursive is not checked, the stash could end
up being dropped even though it was not applied properly
Signed-off-by: Joel Teichroeb
---
t/t3903-stash.sh | 14 ++
1 file changed, 14 insertions(+)
diff --git a/t/t3903-stash.sh b/t/t3903-stash.sh
index
On Sun, Jun 11, 2017 at 2:27 PM, Thomas Gummerer wrote:
>> +
>> +int cmd_stash(int argc, const char **argv, const char *prefix)
>> +{
>> + int result = 0;
>> + pid_t pid = getpid();
>> +
>> + struct option options[] = {
>> + OPT_END()
>> + };
>> +
>> + git_config(gi
On Fri, Jun 16, 2017 at 3:47 PM, Junio C Hamano wrote:
> Joel Teichroeb writes:
>> +/*
>> + * Untracked files are stored by themselves in a parentless commit, for
>> + * ease of unpacking later.
>> + */
>> +static int save_untracked(struct stas
On Tue, Jun 13, 2017 at 12:40 PM, Junio C Hamano wrote:
> Joel Teichroeb writes:
>
>> If the return value of merge recurisve is not checked, the stash could end
>> up being dropped even though it was not applied properly
>
> s/recurisve/recursive/
>
>> Signed-off
On Tue, Jun 13, 2017 at 12:45 PM, Junio C Hamano wrote:
> Joel Teichroeb writes:
>
>> Signed-off-by: Joel Teichroeb
>> ---
>> t/t3903-stash.sh | 12
>> 1 file changed, 12 insertions(+)
>>
>> diff --git a/t/t3903-stash.sh b/t/t3903-stash
I haven't seen any response. Would it be possible for anyone to review?
Thanks,
Joel
On 6/7/2017 5:55 PM, Joel Teichroeb wrote:
I've rewritten git stash as a builtin c command. All tests pass,
and I've added two new tests. Test coverage is around 95% with the
only things missing
Looks like that series was merged last week, fixing this issue.
Marc, the fix will probably be in git 2.14.
Joel
It looks like it's an issue with git clean, as that's what stash uses
internally. You can try your same test, but replace git stash with "git
clean -df" and it will delete Data. Maybe clean should check if there
are any ignored files in an untracked directory and only remove it if -x
is specifi
Ensure the command gives the correct return code
Signed-off-by: Joel Teichroeb
---
t/t3903-stash.sh | 8
1 file changed, 8 insertions(+)
diff --git a/t/t3903-stash.sh b/t/t3903-stash.sh
index 3b4bed5c9a..cc923e6335 100755
--- a/t/t3903-stash.sh
+++ b/t/t3903-stash.sh
@@ -444,6 +444,14
If the merge does not have anything to do, it does not unlock the index,
causing any further index operations to fail. Thus, always unlock the index
regardless of outcome.
Signed-off-by: Joel Teichroeb
---
merge-recursive.c | 9 ++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff
If the return value of merge recurisve is not checked, the stash could end
up being dropped even though it was not applied properly
Signed-off-by: Joel Teichroeb
---
t/t3903-stash.sh | 14 ++
1 file changed, 14 insertions(+)
diff --git a/t/t3903-stash.sh b/t/t3903-stash.sh
index
Signed-off-by: Joel Teichroeb
---
t/t3903-stash.sh | 12
1 file changed, 12 insertions(+)
diff --git a/t/t3903-stash.sh b/t/t3903-stash.sh
index 5399fb05ca..ce4c8fe3d6 100755
--- a/t/t3903-stash.sh
+++ b/t/t3903-stash.sh
@@ -822,6 +822,18 @@ test_expect_success 'create
t
* Fixed review comments
Outstanding issue:
* Not all argv array memory is cleaned up
Joel Teichroeb (5):
stash: add test for stash create with no files
stash: Add a test for when apply fails during stash branch
stash: add test for stashing in a detached state
merge: close the index loc
Implement all git stash functionality as a builtin command
Signed-off-by: Joel Teichroeb
---
Makefile |2 +-
builtin.h |1 +
builtin/stash.c | 1224 +
git
I'm running into a lot of trouble using argv_array_clear. It seems
that some of the builtin git cmd functions move the parameters around,
and write new pointers to argv. There's three options I have now, and
I'm not sure which is the best one.
1. Fix all the builtin cmd functions that I use to not
Once I have all those leaks fixed, is there a way to make sure I'm not
missing any? I tried using valgrind with leak-check enabled, but there
are too many leaks from other git commands.
Joel
On Sun, May 28, 2017 at 11:26 AM, Ævar Arnfjörð Bjarmason
wrote:
> On Sun, May 28, 2017 at 6:56 PM, Joel Teichroeb wrote:
>> Implement all git stash functionality as a builtin command
>
> First thanks for working on this, it's great. Applied it locally,
> passes all te
Signed-off-by: Joel Teichroeb
---
builtin/add.c | 3 ++-
builtin/mv.c | 8 +---
builtin/rm.c | 3 ++-
merge-recursive.c | 8 +---
4 files changed, 14 insertions(+), 8 deletions(-)
diff --git a/builtin/add.c b/builtin/add.c
index 9f53f020d0..6b04eb2c71 100644
--- a/builtin
Signed-off-by: Joel Teichroeb
---
t/t3903-stash.sh | 11 +++
1 file changed, 11 insertions(+)
diff --git a/t/t3903-stash.sh b/t/t3903-stash.sh
index aaae221304..b86851ef46 100755
--- a/t/t3903-stash.sh
+++ b/t/t3903-stash.sh
@@ -808,6 +808,17 @@ test_expect_success 'create with mul
Implement all git stash functionality as a builtin command
Signed-off-by: Joel Teichroeb
---
Makefile |2 +-
builtin.h |1 +
builtin/stash.c | 1280 +
git
Ensure the command gives the correct return code
Signed-off-by: Joel Teichroeb
---
t/t3903-stash.sh | 8
1 file changed, 8 insertions(+)
diff --git a/t/t3903-stash.sh b/t/t3903-stash.sh
index 3b4bed5c9a..aaae221304 100755
--- a/t/t3903-stash.sh
+++ b/t/t3903-stash.sh
@@ -444,6 +444,14
I've rewritten git stash as a builtin c command. All tests pass,
and I've added two new tests. Test coverage is around 95% with the
only things missing coverage being error handlers.
Joel Teichroeb (4):
stash: add test for stash create with no files
stash: add test for stashing in
Implement all git stash functionality as a builtin command
Signed-off-by: Joel Teichroeb
---
I've been working on rewriting git stash as a c builtin and I have all
but three tests passing. I'm having a bit of trouble fixing them, as
well as a few other issues, so I'd really appre
I've been working on rewriting git stash as a c builtin and I have all
but three tests passing. I'm having a bit of trouble fixing them, as
well as a few other issues, so I'd really appreciate some help. Don't
bother commenting on the small details yet as I still need to go
though the code to make
I've been working on rewriting git stash as a c builtin and I have all
but three tests passing. I'm having a bit of trouble fixing them, as
well as a few other issues, so I'd really appreciate some help. Don't
bother commenting on the small details yet as I still need to go
though the code to make
69 matches
Mail list logo