All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Heidelberg <markus.heidelberg@web.de>
To: Marco Costalba <mcostalba@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH QGit RFC] Fix "Save patch..." on a commit range
Date: Tue, 16 Jun 2009 20:48:00 +0200	[thread overview]
Message-ID: <200906162048.00849.markus.heidelberg@web.de> (raw)
In-Reply-To: <e5bfff550906152310m1dc92bf7vf73fdb8f925e2fb7@mail.gmail.com>

Marco Costalba, 16.06.2009:
> 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?

> 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.

> > 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

  reply	other threads:[~2009-06-16 18:48 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-12 23:29 [PATCH QGit RFC] Fix "Save patch..." on a commit range Markus Heidelberg
2009-06-13  7:13 ` Marco Costalba
2009-06-13 10:11   ` Markus Heidelberg
2009-06-13 11:02   ` Markus Heidelberg
2009-06-13 11:12     ` Marco Costalba
2009-06-13 11:33       ` Markus Heidelberg
2009-06-13 12:23         ` Marco Costalba
2009-06-15 21:13         ` Markus Heidelberg
2009-06-15 21:25           ` Marco Costalba
2009-06-15 21:45             ` Marco Costalba
2009-06-15 22:07               ` Marco Costalba
2009-06-15 23:53                 ` Markus Heidelberg
2009-06-16  6:10                   ` Marco Costalba
2009-06-16 18:48                     ` Markus Heidelberg [this message]
2009-06-15 23:44               ` Markus Heidelberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200906162048.00849.markus.heidelberg@web.de \
    --to=markus.heidelberg@web.de \
    --cc=git@vger.kernel.org \
    --cc=mcostalba@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.