Re: [PATCH/RFC] gitweb: Create Gitweb::Git module

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jun 07, 2010, Petr Baudis wrote:
> On Mon, Jun 07, 2010 at 02:54:11AM +0530, Pavan Kumar Sunkara wrote:

> > @@ -1548,21 +1536,6 @@ sub get_feed_info {
> >  ## ----------------------------------------------------------------------
> >  ## git utility subroutines, invoking git commands
> 
> Is there any reason why didn't you move the rest of the commands from
> this section to Gitweb::Git as well?

Probably because they are less clear about being about running (git)
commands, I guess?

Let's examine those subroutines in more detail:

* git_cmd - requires $GIT and $git_dir, also $number_of_git_cmds

* quote_command - helper command, not exactly about running comands,
  but about shell escaping / shell quoting.  Should it be in Gitweb::Git
  or in Gitweb::Escape?

* evaluate_git_version - requires $GIT, sets $number_of_git_cmds
  and $git_version.  Does it belong to Gitweb::Git, or Gitweb::Config,
  or perhaps Gitweb::Request?

* git_get_hash (and wrappers: git_get_head_hash, git_get_full_hash,
  git_get_short_hash) - requires $projectroot, something which other
  commands do not require, and $git_dir.  Uses git_cmd().

* git_get_type - uses git_cmd().

* git_get_hash_by_path - uses git_cmd()
* git_get_path_by_hash - uses git_cmd()

Subroutines related to parsing per-repository configuration should be
either in Gitweb::Config, or in a separate module, e.g. Gitweb::Git::Config
(or something like that, like Gitweb::RepoConfig, etc.).

Next there are 'git utility functions, directly accessing git repository'

-- 
Jakub Narebski
Poland
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]