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

Re: [PATCH QGit RFC] Fix "Save patch..." on a commit range

From
Markus Heidelberg <markus.heidelberg@web.de>
Date
Jun 16, 2009, 18:48 UTC
Message-ID
<200906162048.00849.markus.heidelberg@web.de>
In-Reply-To
<e5bfff550906152310m1dc92bf7vf73fdb8f925e2fb7@mail.gmail.com>
Marco Costalba, 16.06.2009:
Show 8 quoted lines
> On Tue, Jun 16, 2009 at 00:53, Markus
> Heidelberg<markus.heidelberg@web.de> wrote:
> >
> > Yes, it works. Thanks. Would it make sense and be possible to fix it
> > directly in ListView::getSelectedItems()?
> 
> Another reason is that is Git::formatPatch() that needs the rows to be
> ordered, so has a sense to do it there where is needed.

ListView::mouseMoveEvent() needs it as well, I just tested cherry-picking revisions per drag-and-drop and it was applied in the wrong order.

I have never used stgit, but isn't MainImpl::ActPush_activated() and MainImpl::ActPop_activated() affected in the same way?

Show 17 quoted lines
> Of corse if
> other places of QGit requires that the rows returned by
> ListView::getSelectedItems() should be ordered then we can move the
> ordering in ListView::getSelectedItems() as you suggest, or, even
> better, move the ordering in ListView::getSelectedItems() but from
> there call a new helper function Git::sortShaByIndex() that does the
> work and is defined in git.cpp because should use internal information
> like the index and call directly the sha database.
> 
> Yes, a possible cleanup / reformat job could be to:
> 
> - Add a new public helper function Git::sortShaByIndex() defined in git.cpp
> 
> - Call from ListView::getSelectedItems() when we get the list of sha
> user as select
> 
> - Document ListView::getSelectedItems() always returns a list of ordered sha's
I guess this is the right solution.
Show 9 quoted lines
> > BTW, a nice way to see the created git-format-patch command without
> > modifying the sources is to use a directory with spaces, which is not
> > handled correctly by qgit.
> >
> 
> 
> ????
> 
> I cannot test now, but this seems a bug.
I was not clear enough, but yes, it's a bug - with a usable side effect :)
Markus
Previous: Marco CostalbaNext: Markus Heidelberg
Message 14 of 15 in “Fix "Save patch..." on a commit range”
  1. Fix "Save patch..." on a commit rangeMarkus Heidelberg, Jun 12, 2009
  2. Marco CostalbaJun 13, 2009
  3. Markus HeidelbergJun 13, 2009
  4. Markus HeidelbergJun 13, 2009
  5. Marco CostalbaJun 13, 2009
  6. Markus HeidelbergJun 13, 2009
  7. Marco CostalbaJun 13, 2009
  8. Markus HeidelbergJun 15, 2009
  9. Marco CostalbaJun 15, 2009
  10. Marco CostalbaJun 15, 2009
  11. Marco CostalbaJun 15, 2009
  12. Markus HeidelbergJun 15, 2009
  13. Marco CostalbaJun 16, 2009
  14. Markus HeidelbergJun 16, 2009
  15. Markus HeidelbergJun 15, 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.