From: Jakub Narebski <jnareb@gmail.com>
To: git@vger.kernel.org
Subject: Re: [PATCH 0/7] gitweb: Cleanups, fixes and small improvements
Date: Sat, 26 Aug 2006 23:18:23 +0200 [thread overview]
Message-ID: <ecqdqt$rcl$1@sea.gmane.org> (raw)
In-Reply-To: 7vd5an1afz.fsf@assigned-by-dhcp.cox.net
Junio C Hamano wrote:
> Jakub Narebski <jnareb@gmail.com> writes:
>
> * gitweb: Restore old git_blame using git-annotate under "annotate"
>
> I actually was hoping to see a patch to remove the git_blame
> which is not used as far as I can see.
>
> Although we carried annotate and blame in git.git tree for
> quite a while, the intention was always to deprecate one over
> the other once pros-and-cons of each implementation become
> clear (and I think people would not miss annotate if we remove
> annotate and make it an alias for blame -c anymore). What's
> the reason we would want to have both?
Well, removing it completely might be not a best idea for now,
as git_annotate has for example two more columns ("Age" and "Author")
which might be usefull.
I guess the intention is to provide patch for those who want
to improve git_blame, to have comparison with git_annotate,
i.e. patch not applied but available.
> * gitweb: Use 'local $/ = undef;' before 'print <$fd>;'
>
> You changed:
>
> $/ = undef;
> print <$fd>;
> ... hope that nobody depends on standard value of $/
> ... around here, which may still break if you did sub
> ... calls, the sub did not localize $/ (who would?),
> ... and depended to have a sane $/.
> $/ = "\n";
>
> to
>
> local $/ = undef;
> print <$fd>;
> ... hope that nobody depends on standard value of $/
> ... until the end of scope, and whoever changes this
> ... sub is careful enough in the future
>
> which I think is worse. Introducing an extra scope explicitly
> delimit the part you want to use localized $/ like this
>
> { local $/; print <$fd>; }
>
> might have been more palatable. Am I guessing the reason of
> your change wrong?
Actually only one change was from '$/ = undef; print <$fd>; $/ = "\n"',
namely at the end of git_blob_plain. I think nobody will print anything
to the end of the sub.
Two other chunks actually _introduced_ 'local $/ = undef', both in the
fairly short 'if' body. First to read $home_text (there change is not that
important, as $home_text should be fairly short), next more important in
git_snapshot.
IMVHO 'local $/ = undef' in all commands that get the rest of the output
from filehandle (and outputting nothing later), like all 'plain' outputs
should be the idiom to use.
--
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
next prev parent reply other threads:[~2006-08-26 21:18 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-26 17:13 [PATCH 0/7] gitweb: Cleanups, fixes and small improvements Jakub Narebski
2006-08-26 17:14 ` [PATCH 1/7] gitweb: Restore old git_blame using git-annotate under "annotate" Jakub Narebski
2006-08-26 17:14 ` [PATCH 2/7] gitweb: Remove workaround for git-diff bug fixed in f82cd3c Jakub Narebski
2006-08-26 17:14 ` [PATCH 3/7] gitweb: Improve comments about gitweb features configuration Jakub Narebski
2006-08-26 17:14 ` [PATCH 4/7] gitweb: Fix typo in git_patchset_body Jakub Narebski
2006-08-26 17:14 ` [PATCH 5/7] gitweb: Use 'local $/ = undef;' before 'print <$fd>;' Jakub Narebski
2006-08-26 17:14 ` [PATCH 6/7] gitweb: blobs defined by non-textual hash ids can be cached Jakub Narebski
2006-08-26 17:14 ` [PATCH 7/7] gitweb: Always link to plain version of the blob in git_blob Jakub Narebski
2006-08-26 20:58 ` [PATCH 0/7] gitweb: Cleanups, fixes and small improvements Junio C Hamano
2006-08-26 21:18 ` Jakub Narebski [this message]
2006-08-27 20:21 ` Jakub Narebski
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='ecqdqt$rcl$1@sea.gmane.org' \
--to=jnareb@gmail.com \
--cc=git@vger.kernel.org \
/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.