git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: git@vger.kernel.org
Subject: Re: [PATCH 2/8] gitweb: We do longer need the --parents flag in rev-list.
Date: Mon, 25 Dec 2006 23:49:27 +0100	[thread overview]
Message-ID: <empkcf$qp$1@sea.gmane.org> (raw)
In-Reply-To: 11669707094097-git-send-email-robfitz@273k.net

Robert Fitzsimons wrote:

> We only want to know the direct parents of a given commit object,
> these parents are available in the --header output of rev-list.  If
> --parents is supplied with --full-history the output includes merge
> commits that aren't relevant.

Actually --header output gives us original parents. Rewritten parents
(available with --parents) include also grafts and shallow clone grafts.
For parse_commit we want --parents, for parse_commits we don't want it
because --parents affects --full-history.

The problem is that we cannot detect if git-rev-list was called with
--parents and commit is root commit (parentless), or we didn't use
--parents option.

In few other places we pass options specifying subroutine behavior
as hash after all other requred parameters, e.g. 
  esc_html($line, -nbsp=>1),
  parse_ls_tree_line($line, -z=>1), 
  git_print_log($co{'comment'}, -final_empty_line=> 1, -remove_title => 1);
In this case it wouldn't work (unless we pass reference to array,
via parse_commit_text( [ <$fd> ], -parents=>1);

Perhaps it would be better to use reference to hash of options as _first_
parameter, e.g. parse_commit_text({-parents=>1}, <$fd>);, and use something
like if (ref($[0]) == 'HASH') { $opts = shift @_; } to get options.

So for now gitweb might not show what we want in very rare cases of
repositories with grafts or shallow clones.


But apart from this small matter, this series is excellent work. Thanks! 
-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git

  parent reply	other threads:[~2006-12-25 22:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-24 14:31 [PATCH 1/8] gitweb: Add parse_commits, used to bulk load commit objects Robert Fitzsimons
2006-12-24 14:31 ` [PATCH 2/8] gitweb: We do longer need the --parents flag in rev-list Robert Fitzsimons
2006-12-24 14:31   ` [PATCH 3/8] gitweb: Change summary, shortlog actions to use parse_commits Robert Fitzsimons
2006-12-24 14:31     ` [PATCH 4/8] gitweb: Change log action " Robert Fitzsimons
2006-12-24 14:31       ` [PATCH 5/8] gitweb: Change header search " Robert Fitzsimons
2006-12-24 14:31         ` [PATCH 6/8] gitweb: Change atom, rss actions " Robert Fitzsimons
2006-12-24 14:31           ` [PATCH 7/8] gitweb: Change history action " Robert Fitzsimons
2006-12-24 14:31             ` [PATCH 8/8] gitweb: Use rev-list --skip option Robert Fitzsimons
2006-12-25 22:49   ` Jakub Narebski [this message]
2006-12-27 14:22     ` [PATCH] gitweb: Re-enable rev-list --parents for parse_commit Robert Fitzsimons

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='empkcf$qp$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 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).