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

Re: git-rebase --abort eats files

From
Ramkumar Ramachandra <artagnon@gmail.com>
Date
Jun 28, 2010, 09:05 UTC
Message-ID
<20100628090517.GA8091@debian>
In-Reply-To
<201006262009.30380.j6t@kdbg.org>
Hi Madhu,
Johannes Sixt wrote:
Show 14 quoted lines
> On Samstag, 26. Juni 2010, Madhu wrote:
> > +++ b/git-rebase--interactive.sh
> > @@ -749,6 +749,7 @@ first and then run 'git rebase --continue' again."
> >                         git symbolic-ref HEAD $HEADNAME
> >                         ;;
> >                 esac &&
> > +               git-reset &&
> >                 output git reset --hard $HEAD &&
> >                 rm -rf "$DOTEST"
> >                 exit
> 
> No, it can't be that simple. If rebase stopped due to a conflict on a commit 
> that added new files, then your version of rebase --abort will leave these 
> new files behind as untracked.

Right. The interactive rebase has to be able to differentiate between files that you added to resolve a conflict and files that you added to retain at the end of the rebase -- and the interactive rebase has no information about this. Hence, this problem can't be fixed without explicitly finding out the intent of the user. In my opinion, you should simply stash your changes before aborting the rebase instead of adding files and figuring out some complex way of expressing intent.

-- Ram
Previous: Johannes SixtNext: Madhu
Message 3 of 6 in “git-rebase --abort eats files”
  1. MadhuJun 26, 2010
  2. Johannes SixtJun 26, 2010
  3. Ramkumar RamachandraJun 28, 2010
  4. MadhuJun 29, 2010
  5. Pete HarlanJun 29, 2010
  6. git-rebase --continue eats commitsMadhu, Aug 31, 2013

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.