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

Re: [StGit PATCH] Test that we can add a new file to a non-topmost patch with refresh -p

From
Karl Hasselström <kha@treskal.com>
Date
Jul 18, 2008, 18:01 UTC
Message-ID
<20080718180109.GA14825@diana.vm.bytemark.co.uk>
In-Reply-To
<20080718170225.10086.17504.stgit@yoghurt>
On 2008-07-18 19:03:06 +0200, Karl Hasselström wrote:
> We currently can't -- this is bug 12038, found by Jon Smirl. See
>
>   https://gna.org/bugs/index.php?12038

OK, the problem is that to pop the patches on top of the one we are to refresh, we call pop_patch(keep = True). This in turn calls git.switch(keep = True), which resets the index (but is careful to not touch the worktree).

I'm not quite sure how to fix this in a simple way -- the code simply assumes that the index contains nothing of interest. And since I already have a rewrite of refresh that handles this and a handful of other cases that the old code does not, I'm kind of disinclined to undertake a larger restructuring of the code.

Catalin, what do you think?
-- 
Karl Hasselström, kha@treskal.com
      www.treskal.com/kalle
Previous: Karl HasselströmNext: Jon Smirl
Message 4 of 9 in “stgit: bug with refresh and -p”
  1. Jon SmirlJul 18, 2008
  2. Karl HasselströmJul 18, 2008
  3. Test that we can add a new file to a non-topmost patch with refresh -pKarl Hasselström, Jul 18, 2008
  4. Karl HasselströmJul 18, 2008
  5. Jon SmirlJul 18, 2008
  6. Karl HasselströmJul 18, 2008
  7. Catalin MarinasJul 21, 2008
  8. Karl HasselströmJul 22, 2008
  9. Catalin MarinasJul 25, 2008

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.