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

Re: [PATCH v3 17/19] merge: teach --autostash option

From
PWPhillip Wood <phillip.wood123@gmail.com>
Date
Apr 2, 2020, 15:24 UTC
Message-ID
<cd7cb5aa-0a08-29dc-e1cc-f65a4010622f@gmail.com>
In-Reply-To
<9e3d4393cae8813cc4718c6ffcc28231b1344fbe.1584782450.git.liu.denton@gmail.com>
Hi Denton
On 21/03/2020 09:21, Denton Liu wrote:
Show 52 quoted lines
> In rebase, one can pass the `--autostash` option to cause the worktree
> to be automatically stashed before continuing with the rebase. This
> option is missing in merge, however.
> 
> Implement the `--autostash` option and corresponding `merge.autoStash`
> option in merge which stashes before merging and then pops after.
> 
> This option is useful when a developer has some local changes on a topic
> branch but they realize that their work depends on another branch.
> Previously, they had to run something like
> 
> 	git fetch ...
> 	git stash push
> 	git merge FETCH_HEAD
> 	git stash pop
> 
> but now, that is reduced to
> 
> 	git fetch ...
> 	git merge --autostash FETCH_HEAD
> 
> When `git reset --hard` is run to abort a merge, the working tree will
> be left in a clean state, as expected, with the autostash pushed onto
> the stash stack.
> 
> Suggested-by: Alban Gruin <alban.gruin@gmail.com>
> Signed-off-by: Denton Liu <liu.denton@gmail.com>
> ---
>   Documentation/config/merge.txt  |  10 +++
>   Documentation/merge-options.txt |   8 +++
>   branch.c                        |   1 +
>   builtin/commit.c                |   2 +
>   builtin/merge.c                 |  17 ++++++
>   builtin/reset.c                 |   7 ++-
>   path.c                          |   1 +
>   path.h                          |   4 +-
>   t/t3033-merge-toplevel.sh       |  22 +++++++
>   t/t7600-merge.sh                | 104 ++++++++++++++++++++++++++++++++
>   10 files changed, 174 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/config/merge.txt b/Documentation/config/merge.txt
> index 6a313937f8..88b29127bf 100644
> --- a/Documentation/config/merge.txt
> +++ b/Documentation/config/merge.txt
> @@ -70,6 +70,16 @@ merge.stat::
>   	Whether to print the diffstat between ORIG_HEAD and the merge result
>   	at the end of the merge.  True by default.
>   
> +merge.autoStash::
> +	When set to true, automatically create a temporary stash entry
> +	before the operation begins, and apply it after the operation
> +	ends.  This means that you can run rebase
copy and paste error - s/rebase/merge/
Show 24 quoted lines
> on a dirty worktree.
> +	However, use with care: the final stash application after a
> +	successful rebase might result in non-trivial conflicts.
> +	This option can be overridden by the `--no-autostash` and
> +	`--autostash` options of linkgit:git-merge[1].
> +	Defaults to false.
> +
>   merge.tool::
>   	Controls which merge tool is used by linkgit:git-mergetool[1].
>   	The list below shows the valid built-in values.
> diff --git a/Documentation/merge-options.txt b/Documentation/merge-options.txt
> index 40dc4f5e8c..34493eb58b 100644
> --- a/Documentation/merge-options.txt
> +++ b/Documentation/merge-options.txt
> @@ -155,6 +155,14 @@ ifndef::git-pull[]
>   	Note that not all merge strategies may support progress
>   	reporting.
>   
> +--autostash::
> +--no-autostash::
> +	Automatically create a temporary stash entry before the operation
> +	begins, and apply it after the operation ends.  This means
> +	that you can run rebase on a dirty worktree.  However, use > +	with care: the final stash application after a successful
> +	rebase might result in non-trivial conflicts.
s/rebase/merge/
Show 26 quoted lines
> +
>   endif::git-pull[]
>   
>   --allow-unrelated-histories::
> diff --git a/branch.c b/branch.c
> index 579494738a..bf2536c70d 100644
> --- a/branch.c
> +++ b/branch.c
> @@ -344,6 +344,7 @@ void remove_merge_branch_state(struct repository *r)
>   	unlink(git_path_merge_rr(r));
>   	unlink(git_path_merge_msg(r));
>   	unlink(git_path_merge_mode(r));
> +	apply_autostash(git_path_merge_autostash(r));
>   }
>   
>   void remove_branch_state(struct repository *r, int verbose)
> diff --git a/builtin/commit.c b/builtin/commit.c
> index 7ba33a3bec..c11894423a 100644
> --- a/builtin/commit.c
> +++ b/builtin/commit.c
> @@ -1687,6 +1687,8 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
>   	unlink(git_path_merge_mode(the_repository));
>   	unlink(git_path_squash_msg(the_repository));
>   
> +	apply_autostash(git_path_merge_autostash(the_repository));
> +

It's hard to tell from the limited context but do we want to run commit_index_files() before applying the autostash? I wonder if this should be using remove_merge_branch_state() instead of duplicating it as well.

Show 21 quoted lines
>   	if (commit_index_files())
>   		die(_("repository has been updated, but unable to write\n"
>   		      "new_index file. Check that disk is not full and quota is\n"
> diff --git a/builtin/merge.c b/builtin/merge.c
> index d127d2225f..e038bef5ad 100644
> --- a/builtin/merge.c
> +++ b/builtin/merge.c
> @@ -82,6 +82,7 @@ static int show_progress = -1;
>   static int default_to_upstream = 1;
>   static int signoff;
>   static const char *sign_commit;
> +static int autostash;
>   static int no_verify;
>   
>   static struct strategy all_strategy[] = {
> @@ -286,6 +287,8 @@ static struct option builtin_merge_options[] = {
>   	OPT_SET_INT(0, "progress", &show_progress, N_("force progress reporting"), 1),
>   	{ OPTION_STRING, 'S', "gpg-sign", &sign_commit, N_("key-id"),
>   	  N_("GPG sign commit"), PARSE_OPT_OPTARG, NULL, (intptr_t) "" },
> +	OPT_BOOL(0, "autostash", &autostash,
> +	      N_("automatically stash/stash pop before and after")),

If we're adding this option to several commands (rebase, merge, pull) then it might be worth defining it in parse-options.h

Show 74 quoted lines
>   	OPT_BOOL(0, "overwrite-ignore", &overwrite_ignore, N_("update ignored files (default)")),
>   	OPT_BOOL(0, "signoff", &signoff, N_("add Signed-off-by:")),
>   	OPT_BOOL(0, "no-verify", &no_verify, N_("bypass pre-merge-commit and commit-msg hooks")),
> @@ -441,6 +444,7 @@ static void finish(struct commit *head_commit,
>   		strbuf_addf(&reflog_message, "%s: %s",
>   			getenv("GIT_REFLOG_ACTION"), msg);
>   	}
> +	apply_autostash(git_path_merge_autostash(the_repository));
>   	if (squash) {
>   		squash_message(head_commit, remoteheads);
>   	} else {
> @@ -634,6 +638,9 @@ static int git_merge_config(const char *k, const char *v, void *cb)
>   		return 0;
>   	} else if (!strcmp(k, "gpg.mintrustlevel")) {
>   		check_trust_level = 0;
> +	} else if (!strcmp(k, "merge.autostash")) {
> +		autostash = git_config_bool(k, v);
> +		return 0;
>   	}
>   
>   	status = fmt_merge_msg_config(k, v, cb);
> @@ -1291,6 +1298,7 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
>   
>   		/* Invoke 'git reset --merge' */
>   		ret = cmd_reset(nargc, nargv, prefix);
> +		apply_autostash(git_path_merge_autostash(the_repository));
>   		goto done;
>   	}
>   
> @@ -1513,6 +1521,10 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
>   			goto done;
>   		}
>   
> +		if (autostash)
> +			create_autostash(the_repository,
> +					 git_path_merge_autostash(the_repository),
> +					 "merge");
>   		if (checkout_fast_forward(the_repository,
>   					  &head_commit->object.oid,
>   					  &commit->object.oid,
> @@ -1579,6 +1591,11 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
>   	if (fast_forward == FF_ONLY)
>   		die(_("Not possible to fast-forward, aborting."));
>   
> +	if (autostash)
> +		create_autostash(the_repository,
> +				 git_path_merge_autostash(the_repository),
> +				 "merge");
> +
>   	/* We are going to make a new commit. */
>   	git_committer_info(IDENT_STRICT);
>   
> diff --git a/builtin/reset.c b/builtin/reset.c
> index 18228c312e..038c8532eb 100644
> --- a/builtin/reset.c
> +++ b/builtin/reset.c
> @@ -25,6 +25,7 @@
>   #include "cache-tree.h"
>   #include "submodule.h"
>   #include "submodule-config.h"
> +#include "sequencer.h"
>   
>   #define REFRESH_INDEX_DELAY_WARNING_IN_MS (2 * 1000)
>   
> @@ -437,8 +438,12 @@ int cmd_reset(int argc, const char **argv, const char *prefix)
>   		if (reset_type == HARD && !update_ref_status && !quiet)
>   			print_new_head_line(lookup_commit_reference(the_repository, &oid));
>   	}
> -	if (!pathspec.nr)
> +	if (!pathspec.nr) {
> +		if (reset_type == HARD)
> +			save_autostash(git_path_merge_autostash(the_repository));
> +
>   		remove_branch_state(the_repository, 0);

This removes the autostash file for all reset types but we only keep the stash in the case of 'reset --hard' which is confusing.

Best Wishes
Phillip
Show 209 quoted lines
> +	}
>   
>   	return update_ref_status;
>   }
> diff --git a/path.c b/path.c
> index 88cf593007..d764738146 100644
> --- a/path.c
> +++ b/path.c
> @@ -1535,5 +1535,6 @@ REPO_GIT_PATH_FUNC(merge_msg, "MERGE_MSG")
>   REPO_GIT_PATH_FUNC(merge_rr, "MERGE_RR")
>   REPO_GIT_PATH_FUNC(merge_mode, "MERGE_MODE")
>   REPO_GIT_PATH_FUNC(merge_head, "MERGE_HEAD")
> +REPO_GIT_PATH_FUNC(merge_autostash, "MERGE_AUTOSTASH")
>   REPO_GIT_PATH_FUNC(fetch_head, "FETCH_HEAD")
>   REPO_GIT_PATH_FUNC(shallow, "shallow")
> diff --git a/path.h b/path.h
> index 14d6dcad16..1f1bf8f87a 100644
> --- a/path.h
> +++ b/path.h
> @@ -177,11 +177,12 @@ struct path_cache {
>   	const char *merge_rr;
>   	const char *merge_mode;
>   	const char *merge_head;
> +	const char *merge_autostash;
>   	const char *fetch_head;
>   	const char *shallow;
>   };
>   
> -#define PATH_CACHE_INIT { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }
> +#define PATH_CACHE_INIT { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }
>   
>   const char *git_path_cherry_pick_head(struct repository *r);
>   const char *git_path_revert_head(struct repository *r);
> @@ -190,6 +191,7 @@ const char *git_path_merge_msg(struct repository *r);
>   const char *git_path_merge_rr(struct repository *r);
>   const char *git_path_merge_mode(struct repository *r);
>   const char *git_path_merge_head(struct repository *r);
> +const char *git_path_merge_autostash(struct repository *r);
>   const char *git_path_fetch_head(struct repository *r);
>   const char *git_path_shallow(struct repository *r);
>   
> diff --git a/t/t3033-merge-toplevel.sh b/t/t3033-merge-toplevel.sh
> index d314599428..e29c284b9b 100755
> --- a/t/t3033-merge-toplevel.sh
> +++ b/t/t3033-merge-toplevel.sh
> @@ -142,6 +142,17 @@ test_expect_success 'refuse two-project merge by default' '
>   	test_must_fail git merge five
>   '
>   
> +test_expect_success 'refuse two-project merge by default, quit before --autostash happens' '
> +	t3033_reset &&
> +	git reset --hard four &&
> +	echo change >>one.t &&
> +	git diff >expect &&
> +	test_must_fail git merge --autostash five 2>err &&
> +	test_i18ngrep ! "stash" err &&
> +	git diff >actual &&
> +	test_cmp expect actual
> +'
> +
>   test_expect_success 'two-project merge with --allow-unrelated-histories' '
>   	t3033_reset &&
>   	git reset --hard four &&
> @@ -149,4 +160,15 @@ test_expect_success 'two-project merge with --allow-unrelated-histories' '
>   	git diff --exit-code five
>   '
>   
> +test_expect_success 'two-project merge with --allow-unrelated-histories with --autostash' '
> +	t3033_reset &&
> +	git reset --hard four &&
> +	echo change >>one.t &&
> +	git diff one.t >expect &&
> +	git merge --allow-unrelated-histories --autostash five 2>err &&
> +	test_i18ngrep "Applied autostash." err &&
> +	git diff one.t >actual &&
> +	test_cmp expect actual
> +'
> +
>   test_done
> diff --git a/t/t7600-merge.sh b/t/t7600-merge.sh
> index 4fa0ef8e3b..c08e4315f4 100755
> --- a/t/t7600-merge.sh
> +++ b/t/t7600-merge.sh
> @@ -30,13 +30,17 @@ Testing basic merge operations/option parsing.
>   . "$TEST_DIRECTORY"/lib-gpg.sh
>   
>   test_write_lines 1 2 3 4 5 6 7 8 9 >file
> +cp file file.orig
>   test_write_lines '1 X' 2 3 4 5 6 7 8 9 >file.1
> +test_write_lines 1 2 '3 X' 4 5 6 7 8 9 >file.3
>   test_write_lines 1 2 3 4 '5 X' 6 7 8 9 >file.5
>   test_write_lines 1 2 3 4 5 6 7 8 '9 X' >file.9
>   test_write_lines 1 2 3 4 5 6 7 8 '9 Y' >file.9y
>   test_write_lines '1 X' 2 3 4 5 6 7 8 9 >result.1
>   test_write_lines '1 X' 2 3 4 '5 X' 6 7 8 9 >result.1-5
> +test_write_lines '1 X' 2 3 4 5 6 7 8 '9 X' >result.1-9
>   test_write_lines '1 X' 2 3 4 '5 X' 6 7 8 '9 X' >result.1-5-9
> +test_write_lines '1 X' 2 '3 X' 4 '5 X' 6 7 8 '9 X' >result.1-3-5-9
>   test_write_lines 1 2 3 4 5 6 7 8 '9 Z' >result.9z
>   
>   create_merge_msgs () {
> @@ -675,6 +679,106 @@ test_expect_success 'refresh the index before merging' '
>   	git merge c3
>   '
>   
> +test_expect_success 'merge with --autostash' '
> +	git reset --hard c1 &&
> +	git merge-file file file.orig file.9 &&
> +	git merge --autostash c2 2>err &&
> +	test_i18ngrep "Applied autostash." err &&
> +	git show HEAD:file >merge-result &&
> +	test_cmp result.1-5 merge-result &&
> +	test_cmp result.1-5-9 file
> +'
> +
> +test_expect_success 'merge with merge.autoStash' '
> +	test_config merge.autoStash true &&
> +	git reset --hard c1 &&
> +	git merge-file file file.orig file.9 &&
> +	git merge c2 2>err &&
> +	test_i18ngrep "Applied autostash." err &&
> +	git show HEAD:file >merge-result &&
> +	test_cmp result.1-5 merge-result &&
> +	test_cmp result.1-5-9 file
> +'
> +
> +test_expect_success 'fast-forward merge with --autostash' '
> +	git reset --hard c0 &&
> +	git merge-file file file.orig file.5 &&
> +	git merge --autostash c1 2>err &&
> +	test_i18ngrep "Applied autostash." err &&
> +	test_cmp result.1-5 file
> +'
> +
> +test_expect_success 'octopus merge with --autostash' '
> +	git reset --hard c1 &&
> +	git merge-file file file.orig file.3 &&
> +	git merge --autostash c2 c3 2>err &&
> +	test_i18ngrep "Applied autostash." err &&
> +	git show HEAD:file >merge-result &&
> +	test_cmp result.1-5-9 merge-result &&
> +	test_cmp result.1-3-5-9 file
> +'
> +
> +test_expect_success 'conflicted merge with --autostash, --abort restores stash' '
> +	git reset --hard c3 &&
> +	cp file.1 file &&
> +	test_must_fail git merge --autostash c7 &&
> +	git merge --abort 2>err &&
> +	test_i18ngrep "Applied autostash." err &&
> +	test_cmp file.1 file
> +'
> +
> +test_expect_success 'completed merge with --no-commit and --autostash' '
> +	git reset --hard c1 &&
> +	git merge-file file file.orig file.9 &&
> +	git diff >expect &&
> +	git merge --no-commit --autostash c2 &&
> +	git stash show -p MERGE_AUTOSTASH >actual &&
> +	test_cmp expect actual &&
> +	git commit 2>err &&
> +	test_i18ngrep "Applied autostash." err &&
> +	git show HEAD:file >merge-result &&
> +	test_cmp result.1-5 merge-result &&
> +	test_cmp result.1-5-9 file
> +'
> +
> +test_expect_success 'aborted merge (merge --abort) with --no-commit and --autostash' '
> +	git reset --hard c1 &&
> +	git merge-file file file.orig file.9 &&
> +	git diff >expect &&
> +	git merge --no-commit --autostash c2 &&
> +	git stash show -p MERGE_AUTOSTASH >actual &&
> +	test_cmp expect actual &&
> +	git merge --abort 2>err &&
> +	test_i18ngrep "Applied autostash." err &&
> +	git diff >actual &&
> +	test_cmp expect actual
> +'
> +
> +test_expect_success 'aborted merge (reset --hard) with --no-commit and --autostash' '
> +	git reset --hard c1 &&
> +	git merge-file file file.orig file.9 &&
> +	git diff >expect &&
> +	git merge --no-commit --autostash c2 &&
> +	git stash show -p MERGE_AUTOSTASH >actual &&
> +	test_cmp expect actual &&
> +	git reset --hard 2>err &&
> +	test_i18ngrep "Autostash exists; creating a new stash entry." err &&
> +	git diff --exit-code
> +'
> +
> +test_expect_success 'merge with conflicted --autostash changes' '
> +	git reset --hard c1 &&
> +	git merge-file file file.orig file.9y &&
> +	git diff >expect &&
> +	test_when_finished "test_might_fail git stash drop" &&
> +	git merge --autostash c3 2>err &&
> +	test_i18ngrep "Applying autostash resulted in conflicts." err &&
> +	git show HEAD:file >merge-result &&
> +	test_cmp result.1-9 merge-result &&
> +	git stash show -p >actual &&
> +	test_cmp expect actual
> +'
> +
>   cat >expected.branch <<\EOF
>   Merge branch 'c5-branch' (early part)
>   EOF
> 
Previous: Denton LiuNext: Denton Liu
Message 78 of 152 in “merge: learn --autostash”
  1. 0/7 merge: learn --autostashDenton Liu, Oct 16, 2019
  2. 1/7 Makefile: alphabetically sort += listsDenton Liu, Oct 16, 2019
  3. Junio C HamanoOct 17, 2019
  4. Johannes SchindelinOct 21, 2019
  5. Denton LiuOct 21, 2019
  6. Johannes SchindelinOct 22, 2019
  7. Junio C HamanoOct 21, 2019
  8. Jeff KingOct 21, 2019
  9. Junio C HamanoOct 22, 2019
  10. 2/7 autostash: extract read_one() from rebaseDenton Liu, Oct 16, 2019
  11. Phillip WoodOct 18, 2019
  12. Johannes SchindelinOct 21, 2019
  13. 3/7 autostash: extract apply_autostash() from rebaseDenton Liu, Oct 16, 2019
  14. 4/7 autostash: extract reset_head() from rebaseDenton Liu, Oct 16, 2019
  15. Phillip WoodOct 18, 2019
  16. Johannes SchindelinOct 21, 2019
  17. 5/7 autostash: extract perform_autostash() from rebaseDenton Liu, Oct 16, 2019
  18. Johannes SchindelinOct 21, 2019
  19. 6/7 autostash.c: undefine USE_THE_INDEX_COMPATIBILITY_MACROSDenton Liu, Oct 16, 2019
  20. Phillip WoodOct 18, 2019
  21. 7/7 merge: teach --autostash optionDenton Liu, Oct 16, 2019
  22. Phillip WoodOct 18, 2019
  23. Denton LiuDec 24, 2019
  24. Johannes SchindelinOct 21, 2019
  25. Denton LiuDec 24, 2019
  26. Denton LiuDec 24, 2019
  27. 00/17 merge: learn --autostashDenton Liu, Dec 24, 2019
  28. 03/17 sequencer: use file strbuf for read_oneliner()Denton Liu, Dec 24, 2019
  29. 02/17 t7600: use test_write_lines()Denton Liu, Dec 24, 2019
  30. 01/17 Makefile: alphabetically sort += listsDenton Liu, Dec 24, 2019
  31. Junio C HamanoDec 30, 2019
  32. 06/17 rebase: use read_oneliner()Denton Liu, Dec 24, 2019
  33. 04/17 sequencer: configurably warn on non-existent filesDenton Liu, Dec 24, 2019
  34. Junio C HamanoDec 26, 2019
  35. 07/17 sequencer: make apply_rebase() accept a pathDenton Liu, Dec 24, 2019
  36. 08/17 rebase: use apply_autostash() from sequencer.cDenton Liu, Dec 24, 2019
  37. 05/17 sequencer: make read_oneliner() externDenton Liu, Dec 24, 2019
  38. 10/17 reset: extract reset_head() from rebaseDenton Liu, Dec 24, 2019
  39. 12/17 rebase: generify create_autostash()Denton Liu, Dec 24, 2019
  40. 13/17 sequencer: extract perform_autostash() from rebaseDenton Liu, Dec 24, 2019
  41. 09/17 rebase: generify reset_head()Denton Liu, Dec 24, 2019
  42. 11/17 rebase: extract create_autostash()Denton Liu, Dec 24, 2019
  43. 17/17 pull: pass --autostash to mergeDenton Liu, Dec 24, 2019
  44. 14/17 sequencer: unlink autostash in apply_autostash()Denton Liu, Dec 24, 2019
  45. 16/17 t5520: make test_pull_autostash() accept expect_parent_numDenton Liu, Dec 24, 2019
  46. 15/17 merge: teach --autostash optionDenton Liu, Dec 24, 2019
  47. Junio C HamanoDec 30, 2019
  48. Phillip WoodDec 31, 2019
  49. Denton LiuJan 8, 2020
  50. Phillip WoodJan 10, 2020
  51. Denton LiuJan 15, 2020
  52. Denton LiuJan 1, 2020
  53. 00/19 merge: learn --autostashDenton Liu, Mar 21, 2020
  54. 02/19 t7600: use test_write_lines()Denton Liu, Mar 21, 2020
  55. 01/19 Makefile: ASCII-sort += listsDenton Liu, Mar 21, 2020
  56. 03/19 sequencer: use file strbuf for read_oneliner()Denton Liu, Mar 21, 2020
  57. Phillip WoodApr 2, 2020
  58. 04/19 sequencer: make read_oneliner() accept flagsDenton Liu, Mar 21, 2020
  59. 05/19 sequencer: configurably warn on non-existent filesDenton Liu, Mar 21, 2020
  60. Phillip WoodApr 2, 2020
  61. 07/19 rebase: use read_oneliner()Denton Liu, Mar 21, 2020
  62. Phillip WoodApr 2, 2020
  63. 06/19 sequencer: make read_oneliner() externDenton Liu, Mar 21, 2020
  64. 08/19 sequencer: make apply_rebase() accept a pathDenton Liu, Mar 21, 2020
  65. 09/19 rebase: use apply_autostash() from sequencer.cDenton Liu, Mar 21, 2020
  66. Phillip WoodApr 2, 2020
  67. 10/19 rebase: generify reset_head()Denton Liu, Mar 21, 2020
  68. 11/19 reset: extract reset_head() from rebaseDenton Liu, Mar 21, 2020
  69. Phillip WoodApr 2, 2020
  70. 12/19 rebase: extract create_autostash()Denton Liu, Mar 21, 2020
  71. 13/19 rebase: generify create_autostash()Denton Liu, Mar 21, 2020
  72. 14/19 sequencer: extract perform_autostash() from rebaseDenton Liu, Mar 21, 2020
  73. 15/19 sequencer: unlink autostash in apply_autostash()Denton Liu, Mar 21, 2020
  74. 16/19 sequencer: implement save_autostash()Denton Liu, Mar 21, 2020
  75. Phillip WoodApr 2, 2020
  76. 18/19 t5520: make test_pull_autostash() accept expect_parent_numDenton Liu, Mar 21, 2020
  77. 17/19 merge: teach --autostash optionDenton Liu, Mar 21, 2020
  78. Phillip WoodApr 2, 2020
  79. Denton LiuApr 3, 2020
  80. Denton LiuApr 3, 2020
  81. Phillip WoodApr 3, 2020
  82. Denton LiuApr 3, 2020
  83. Phillip WoodApr 3, 2020
  84. Denton LiuApr 3, 2020
  85. 19/19 pull: pass --autostash to mergeDenton Liu, Mar 21, 2020
  86. Phillip WoodApr 2, 2020
  87. 00/23 merge: learn --autostashDenton Liu, Apr 4, 2020
  88. 02/23 t7600: use test_write_lines()Denton Liu, Apr 4, 2020
  89. 03/23 sequencer: stop leaking bufDenton Liu, Apr 4, 2020
  90. Junio C HamanoApr 5, 2020
  91. Junio C HamanoApr 5, 2020
  92. Denton LiuApr 5, 2020
  93. 05/23 sequencer: make file exists check more efficientDenton Liu, Apr 4, 2020
  94. 04/23 sequencer: reuse strbuf_trim() in read_oneliner()Denton Liu, Apr 4, 2020
  95. Junio C HamanoApr 5, 2020
  96. Denton LiuApr 6, 2020
  97. Phillip WoodApr 6, 2020
  98. Phillip WoodApr 6, 2020
  99. Denton LiuApr 7, 2020
  100. 07/23 sequencer: configurably warn on non-existent filesDenton Liu, Apr 4, 2020
  101. Phillip WoodApr 6, 2020
  102. 09/23 rebase: use read_oneliner()Denton Liu, Apr 4, 2020
  103. 01/23 Makefile: ASCII-sort += listsDenton Liu, Apr 4, 2020
  104. 08/23 sequencer: make read_oneliner() externDenton Liu, Apr 4, 2020
  105. 12/23 rebase: use apply_autostash() from sequencer.cDenton Liu, Apr 4, 2020
  106. 11/23 sequencer: rename stash_sha1 to stash_oidDenton Liu, Apr 4, 2020
  107. 15/23 rebase: extract create_autostash()Denton Liu, Apr 4, 2020
  108. 13/23 rebase: generify reset_head()Denton Liu, Apr 4, 2020
  109. 16/23 rebase: generify create_autostash()Denton Liu, Apr 4, 2020
  110. 17/23 sequencer: extract perform_autostash() from rebaseDenton Liu, Apr 4, 2020
  111. 18/23 sequencer: unlink autostash in apply_autostash()Denton Liu, Apr 4, 2020
  112. 20/23 sequencer: implement apply_autostash_oid()Denton Liu, Apr 4, 2020
  113. 14/23 reset: extract reset_head() from rebaseDenton Liu, Apr 4, 2020
  114. 22/23 t5520: make test_pull_autostash() accept expect_parent_numDenton Liu, Apr 4, 2020
  115. 19/23 sequencer: implement save_autostash()Denton Liu, Apr 4, 2020
  116. Phillip WoodApr 6, 2020
  117. 23/23 pull: pass --autostash to mergeDenton Liu, Apr 4, 2020
  118. 10/23 sequencer: make apply_rebase() accept a pathDenton Liu, Apr 4, 2020
  119. Phillip WoodApr 6, 2020
  120. 21/23 merge: teach --autostash optionDenton Liu, Apr 4, 2020
  121. Phillip WoodApr 6, 2020
  122. Denton LiuApr 7, 2020
  123. Phillip WoodApr 7, 2020
  124. 06/23 sequencer: make read_oneliner() accept flagsDenton Liu, Apr 4, 2020
  125. 00/22 merge: learn --autostashDenton Liu, Apr 7, 2020
  126. 02/22 t7600: use test_write_lines()Denton Liu, Apr 7, 2020
  127. 01/22 Makefile: ASCII-sort += listsDenton Liu, Apr 7, 2020
  128. 04/22 sequencer: make file exists check more efficientDenton Liu, Apr 7, 2020
  129. Junio C HamanoApr 8, 2020
  130. 03/22 sequencer: stop leaking bufDenton Liu, Apr 7, 2020
  131. 05/22 sequencer: make read_oneliner() accept flagsDenton Liu, Apr 7, 2020
  132. Junio C HamanoApr 8, 2020
  133. 06/22 sequencer: configurably warn on non-existent filesDenton Liu, Apr 7, 2020
  134. 07/22 sequencer: make read_oneliner() externDenton Liu, Apr 7, 2020
  135. 08/22 rebase: use read_oneliner()Denton Liu, Apr 7, 2020
  136. Junio C HamanoApr 8, 2020
  137. 11/22 rebase: use apply_autostash() from sequencer.cDenton Liu, Apr 7, 2020
  138. 12/22 rebase: generify reset_head()Denton Liu, Apr 7, 2020
  139. 14/22 rebase: extract create_autostash()Denton Liu, Apr 7, 2020
  140. 15/22 rebase: generify create_autostash()Denton Liu, Apr 7, 2020
  141. 13/22 reset: extract reset_head() from rebaseDenton Liu, Apr 7, 2020
  142. 10/22 sequencer: rename stash_sha1 to stash_oidDenton Liu, Apr 7, 2020
  143. 09/22 sequencer: make apply_autostash() accept a pathDenton Liu, Apr 7, 2020
  144. 16/22 sequencer: extract perform_autostash() from rebaseDenton Liu, Apr 7, 2020
  145. 17/22 sequencer: unlink autostash in apply_autostash()Denton Liu, Apr 7, 2020
  146. 21/22 t5520: make test_pull_autostash() accept expect_parent_numDenton Liu, Apr 7, 2020
  147. 18/22 sequencer: implement save_autostash()Denton Liu, Apr 7, 2020
  148. 19/22 sequencer: implement apply_autostash_oid()Denton Liu, Apr 7, 2020
  149. 20/22 merge: teach --autostash optionDenton Liu, Apr 7, 2020
  150. 22/22 pull: pass --autostash to mergeDenton Liu, Apr 7, 2020
  151. Phillip WoodApr 10, 2020
  152. Junio C HamanoApr 10, 2020

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.