git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 0/3] gitweb: Simplify some gitweb URLs generation
Date: Fri, 2 Nov 2007 01:18:43 +0100	[thread overview]
Message-ID: <200711020118.44015.jnareb@gmail.com> (raw)
In-Reply-To: <7v1wb98twi.fsf@gitster.siamese.dyndns.org>

Junio C Hamano wrote:
> Jakub Narebski <jnareb@gmail.com> writes:
> 
>> This series of patches simplifies some gitweb URLs generation by
>> providing -replay option to href() subroutine, and then using this
>> feature in gitweb code.
>>
>> Shortlog:
>>  gitweb: Easier adding/changing parameters to current URL
>>  gitweb: Use href(-replay=>1, page=>...) to generate pagination links
>>  gitweb: Use href(-replay=>1, action=>...) to generate alternate views
>>
>> Diffstat:
>>  gitweb/gitweb.perl |   82 ++++++++++++++++++++++-----------------------------
>>  1 files changed, 35 insertions(+), 47 deletions(-)
> 
> If this "-replay" is used carelessly, it could add parameters
> that were passed to the page that the original code stripped
> away from passing on purpose.  Have you checked if the
> conversion done with 2/3 and 3/3 are correct (I haven't)?

First, I guess that I should have marked this series of patches as
an RFC, but not for the reason you mentioned. This series changes
somewhat gitweb behaviour (patches 2/3 and 3/3 to be more exact) in
a way that before gitweb passed 'expanded' hashes to page / alternate
view links. For example before this series link to second page for
shortlog view starting from 'HEAD' passed literal sha1 for 'h' parameter,
ans second page started where first page ended. After this patch, if
refs have changed between viewing first page and clicking on the link
to second page, the resulting view would be second page of _new_ 'HEAD',
not of old (shown) 'HEAD'.

Second, you do not need to worry about adding parameters, because in 2/3
and 3/3 -replay is used to change view to the one which differs from
current by one parameter. Please take into account that some parameters
are just not important.

-- 
Jakub Narebski
Poland

      reply	other threads:[~2007-11-02  0:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-01 12:06 [PATCH 0/3] gitweb: Simplify some gitweb URLs generation Jakub Narebski
2007-11-01 12:06 ` Jakub Narebski
2007-11-01 12:06 ` [PATCH 1/3] gitweb: Easier adding/changing parameters to current URL Jakub Narebski
2007-11-01 12:06 ` [PATCH 2/3] gitweb: Use href(-replay=>1, page=>...) to generate pagination links Jakub Narebski
2007-11-01 12:06 ` [PATCH 3/3] gitweb: Use href(-replay=>1, action=>...) to generate alternate views Jakub Narebski
2007-11-01 22:47 ` [PATCH 0/3] gitweb: Simplify some gitweb URLs generation Junio C Hamano
2007-11-02  0:18   ` Jakub Narebski [this message]

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=200711020118.44015.jnareb@gmail.com \
    --to=jnareb@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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).