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

Re: [PATCH 2/3] Implement --dirty for git-rebase--interactive.

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 12, 2007, 19:51 UTC
Message-ID
<7vpryf2qed.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<1193952624-608-3-git-send-email-Simon.Sasburg@gmail.com>
Simon Sasburg <simon.sasburg@gmail.com> writes:
Show 14 quoted lines
> +restore_dirty_state () {
> +	lastmsg=$(git-rev-list HEAD^..HEAD --pretty=oneline | sed "s:[^ ]* ::")
> +	if test "$lastmsg" = "REBASE--dirty: store index..workingtree diff"
> +	then
> +		echo "Restoring dirty index state"
> +		git reset --mixed HEAD^
> +	fi
> +	lastmsg=$(git-rev-list HEAD^..HEAD --pretty=oneline | sed "s:[^ ]* ::")
> +	if test "$lastmsg" = "REBASE--dirty: store HEAD..index diff"
> +	then
> +		echo "Restoring dirty working dir state"
> +		git reset --soft HEAD^
> +	fi
> +}

This forces the user to pay the two rev-list overhead, even when running rebase without --dirty option. Can we avoid paying any, when not giving the option?

Also it pollutes the reflog of the branch, but that won't be a huge issue with Dscho's "detach HEAD while rebasing" patch.

Previous: Simon SasburgNext: Junio C Hamano
Message 5 of 8 in “Starting rebase from dirty tree”
  1. 0/3 Starting rebase from dirty treeSimon Sasburg, Nov 1, 2007
  2. 1/3 Introduce --dirty option to git-rebase, allowing you to start from a dirty state.Simon Sasburg, Nov 1, 2007
  3. 2/3 Implement --dirty for git-rebase--interactive.Simon Sasburg, Nov 1, 2007
  4. 3/3 Make git-svn rebase --dirty pass along --dirty to git-rebase.Simon Sasburg, Nov 1, 2007
  5. Junio C HamanoNov 12, 2007
  6. Junio C HamanoNov 1, 2007
  7. Junio C HamanoNov 1, 2007
  8. Shawn O. PearceNov 2, 2007

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.