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

Re: [RFC PATCH] am: do not do any reset on --abort

From
Junio C Hamano <gitster@pobox.com>
Date
May 25, 2009, 22:23 UTC
Message-ID
<7vvdnou8hx.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20090525104308.GA26775@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 9 quoted lines
> We really have no idea what state the tree is in at this
> point, and whether the user might have done useful work on
> top of it. So let's err on the side of keeping the user's
> data intact.
>
> The downside is that if they do have cruft to get rid of, or
> want to pretend as if earlier parts of the series that were
> applied did not exist, they must manually "git reset --hard"
> now.

I do not see it as a major downside, but not telling them that they may want to when we avoid doing it ourselves might be.

Show 26 quoted lines
> Signed-off-by: Jeff King <peff@peff.net>
> ---
> This is a followup to:
>
>   http://thread.gmane.org/gmane.comp.version-control.git/118373
>
>  git-am.sh |    4 ----
>  1 files changed, 0 insertions(+), 4 deletions(-)
>
> diff --git a/git-am.sh b/git-am.sh
> index 578780b..a7e24cf 100755
> --- a/git-am.sh
> +++ b/git-am.sh
> @@ -240,10 +240,6 @@ then
>  			exec git rebase --abort
>  		fi
>  		git rerere clear
> -		test -f "$dotest/dirtyindex" || {
> -			git read-tree --reset -u HEAD ORIG_HEAD
> -			git reset ORIG_HEAD
> -		}
>  		rm -fr "$dotest"
>  		exit ;;
>  	esac
> -- 
> 1.6.3.1.250.g01b8b.dirty
Previous: Avery Pennarun
Message 14 of 14 in “Bug: 'git am --abort' can silently reset the wrong branch”
  1. Eduardo HabkostMay 6, 2009
  2. Jeff KingMay 8, 2009
  3. Sverre RabbelierMay 8, 2009
  4. Junio C HamanoMay 8, 2009
  5. Jeff KingMay 8, 2009
  6. am: do not do any reset on --abortJeff King, May 25, 2009
  7. Johannes SchindelinMay 25, 2009
  8. Jeff KingMay 25, 2009
  9. Johannes SixtMay 25, 2009
  10. Avery PennarunMay 25, 2009
  11. Jeff KingMay 25, 2009
  12. Jeff KingMay 25, 2009
  13. Avery PennarunMay 25, 2009
  14. Junio C HamanoMay 25, 2009

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.