From: cgit at cryptocrack.de (Lukas Fleischer)
Subject: RFE: download patch between arbitrary revisions
Date: Tue, 6 Aug 2013 23:40:35 +0200 [thread overview]
Message-ID: <20130806214035.GA30240@blizzard> (raw)
In-Reply-To: <52014D31.1060907@kernel.org>
On Tue, Aug 06, 2013 at 03:23:29PM -0400, Konstantin Ryabitsev wrote:
> On 16/06/13 03:18 PM, Lukas Fleischer wrote:
> >>>>>>> There is currently a way to render a diff between two arbitrary objects,
> >>>>>>> e.g.:
> >>>>>>>
> >>>>>>> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/diff/?id=v3.10-rc4&id2=v3.10-rc3
> >>>>>>>
> >>>>>>> However, there doesn't appear to be a way to download a patch in the
> >>>>>>> same way -- it will only make patch against id's parent. E.g.:
> >>>>>>>
> >>>>>>> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/patch/?id=v3.10-rc4&id2=v3.10-rc3
> >>>>>>>
> >>>>>>> Any way we can make the behaviour of patch match that of diff?
> >>>>>>
> >>>> [...]
> >>>>
> >>>> So:
> >>>>
> >>>> /patch/?id=v1.8.3.1&id2=v1.8.3
> >>>>
> >>>> generates something like "git format-patch v1.8.3..v1.8.3.1". And
> >>>>
> >>>> /rawdiff/?id=v1.8.3.1&id2=v1.8.3
> >>>>
> >>>> generates the diff with no HTML around it.
> >>>>
> >>>> The latter could be a query parameter instead ("raw=1"?). Having not
> >>>> investigated the impact on the code, I have no preference for one over
> >>>> the other.
> >>>
> >>> Sounds good to me either way. Jason?
> >>>
> >>> Also, I just wondered whether this could be used to DoS servers when
> >>> requesting a series of patches for a huge range of revisions... Maybe
> >>> there should be some kind of limit?
> >>
> >> The "diff" version costs about the same regardless of how many revisions
> >> are between the endpoints - it's purely a function of the size of the
> >> tree (and the number of changed files which probably is affected by how
> >> far apart the commits are, but it's still bounded by the size of the
> >> tree).
> >>
> >> I can see it potentially being a problem in the "format-patch" case, so
> >> perhaps we want to add a "max-patches-per-request" variable if we do
> >> implement that.
> >
> > Yeah, the `git format-patch` case is what I meant with "requesting a
> > series of patches". Limiting the number of patches also sounds good to
> > me.
> >
> > I will go ahead and implement this if Jason likes the idea :)
>
> Hi, all:
>
> We keep getting requests for this feature, so I'm going to bump this in
> hopes that this gets implemented in the next release. :)
Yeah, I already started writing a patch -- just waiting for Jason's
approval since it might take some time to polish it and make it ready
for submission.
>
> Best,
> --
> Konstantin Ryabitsev
> Senior Systems Administrator
> Linux Foundation Collab Projects
> Montr?al, Qu?bec
>
next prev parent reply other threads:[~2013-08-06 21:40 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-03 1:19 mricon
2013-06-03 18:49 ` john
2013-06-13 21:58 ` cgit
2013-06-13 22:21 ` john
2013-06-16 7:56 ` cgit
2013-06-16 10:11 ` john
2013-06-16 19:18 ` cgit
2013-08-06 19:23 ` mricon
2013-08-06 21:40 ` cgit [this message]
2013-08-12 19:05 ` Jason
2013-08-14 8:56 ` cgit
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=20130806214035.GA30240@blizzard \
--to=cgit@lists.zx2c4.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).