git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 2/2] stash: use "stash--helper"

From
Stefan Beller <sbeller@google.com>
Date
Jan 28, 2016, 20:59 UTC
Message-ID
<CAGZ79kaPQP+-LpW8ExM2wmfftW4_oa7tB5XdfsdC8XHwH4aFOA@mail.gmail.com>
In-Reply-To
<0000015289f33e85-713596a1-2718-4c3a-bf3c-4a0f1048d401-000000@eu-west-1.amazonses.com>
On Thu, Jan 28, 2016 at 12:36 PM, Matthias Asshauer <mha1993@live.de> wrote:
> From: Matthias Aßhauer <mha1993@live.de>
>
> Use the new "git stash--helper" builtin. It should be faster than the old shell code and is a first step to move
> more shell code to C.

You had some good measurements in the coverletter, which is not going to be recorded in the projects history. This part however would be part of the commit. So you could move the speed improvements here (as well as the other reasoning) on why this is a good idea. :)

Show 30 quoted lines
>
> Signed-off-by: Matthias Aßhauer <mha1993@live.de>
> ---
>  git-stash.sh | 10 +---------
>  1 file changed, 1 insertion(+), 9 deletions(-)
>
> diff --git a/git-stash.sh b/git-stash.sh
> index c7c65e2..973c77b 100755
> --- a/git-stash.sh
> +++ b/git-stash.sh
> @@ -112,15 +112,7 @@ create_stash () {
>         then
>
>                 # state of the working tree
> -               w_tree=$( (
> -                       git read-tree --index-output="$TMPindex" -m $i_tree &&
> -                       GIT_INDEX_FILE="$TMPindex" &&
> -                       export GIT_INDEX_FILE &&
> -                       git diff --name-only -z HEAD -- >"$TMP-stagenames" &&
> -                       git update-index -z --add --remove --stdin <"$TMP-stagenames" &&
> -                       git write-tree &&
> -                       rm -f "$TMPindex"
> -               ) ) ||
> +               w_tree=$(git stash--helper --non-patch "$TMPindex" $i_tree) ||
>                         die "$(gettext "Cannot save the current worktree state")"
>
>         else
>
> --
> https://github.com/git/git/pull/191
Oh I see you're using the pull-request to email translator, cool!
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous: Matthias AsshauerNext: Matthias Aßhauer
Message 3 of 14 in “stash--helper: implement "git stash--helper"”
  1. 1/2 stash--helper: implement "git stash--helper"Matthias Asshauer, Jan 28, 2016
  2. 2/2 stash: use "stash--helper"Matthias Asshauer, Jan 28, 2016
  3. Stefan BellerJan 28, 2016
  4. AW: [PATCH 2/2] stash: use "stash--helper"Matthias Aßhauer, Jan 28, 2016
  5. Stefan BellerJan 28, 2016
  6. Roberto TyleyJan 28, 2016
  7. AW: [PATCH 2/2] stash: use "stash--helper"Matthias Aßhauer, Jan 29, 2016
  8. Thomas GummererJan 29, 2016
  9. Junio C HamanoJan 29, 2016
  10. Junio C HamanoJan 28, 2016
  11. AW: [PATCH 1/2] stash--helper: implement "git stash--helper"Matthias Aßhauer, Jan 29, 2016
  12. Junio C HamanoJan 29, 2016
  13. Michael BlumeFeb 1, 2016
  14. Junio C HamanoFeb 1, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.