git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Simon 'corecode' Schubert <corecode@fs.ei.tum.de>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: Junio C Hamano <junkio@cox.net>, git@vger.kernel.org
Subject: Re: [PATCH] Lose perl dependency. (fwd)
Date: Sun, 21 Jan 2007 03:56:17 +0100	[thread overview]
Message-ID: <45B2D651.7010606@fs.ei.tum.de> (raw)
In-Reply-To: <Pine.LNX.4.63.0701202240210.22628@wbgn013.biozentrum.uni-wuerzburg.de>

[-- Attachment #1: Type: text/plain, Size: 1879 bytes --]

Johannes Schindelin wrote:
> @@ -1285,6 +1289,27 @@ struct commit *get_revision(struct rev_info *revs)
>  {
>  	struct commit *c = NULL;
>  
> +	if (revs->reverse) {
> +		struct commit_list *list;
> +
> +		if (revs->reverse == 1) {
> +			revs->reverse = 0;
> +			list = NULL;
> +			while ((c = get_revision(revs)))
> +				commit_list_insert(c, &list);
> +			revs->commits = list;
> +			revs->reverse = 2;
> +		}
> +
> +		if (!revs->commits)
> +			return NULL;
> +		c = revs->commits->item;
> +		list = revs->commits->next;
> +		free(revs->commits);
> +		revs->commits = list;
> +		return c;
> +	}
> +
>  	if (0 < revs->skip_count) {
>  		while ((c = get_revision_1(revs)) != NULL) {
>  			if (revs->skip_count-- <= 0)
> diff --git a/revision.h b/revision.h
> index d93481f..5fec184 100644
> --- a/revision.h
> +++ b/revision.h
> @@ -42,7 +42,8 @@ struct rev_info {
>  			unpacked:1, /* see also ignore_packed below */
>  			boundary:1,
>  			left_right:1,
> -			parents:1;
> +			parents:1,
> +			reverse:2;
>  
>  	/* Diff flags */
>  	unsigned int	diff:1,

I like this.  However, rev_info.reverse needs some documentation.  Or the block in get_revision does:

/*
 * rev_info.reverse is used to note the fact that we want to output the list
 * of revisions in reverse order.  To accomplish this goal, reverse can have
 * different values:
 *  0  do nothing
 *  1  reverse the list
 *  2  internal use:  we have already obtained and reversed the list,
 *     now we only need to yield its items.
 */

cheers
  simon

-- 
Serve - BSD     +++  RENT this banner advert  +++    ASCII Ribbon   /"\
Work - Mac      +++  space for low €€€ NOW!1  +++      Campaign     \ /
Party Enjoy Relax   |   http://dragonflybsd.org      Against  HTML   \
Dude 2c 2 the max   !   http://golden-apple.biz       Mail + News   / \


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]

  parent reply	other threads:[~2007-01-21  2:56 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-18 10:49 [PATCH] Lose perl dependency. (fwd) Johannes Schindelin
2007-01-18 11:52 ` Simon 'corecode' Schubert
2007-01-18 13:57   ` Johannes Schindelin
2007-01-18 14:03     ` Simon 'corecode' Schubert
2007-01-18 15:00     ` Andy Parkins
2007-01-18 15:08       ` Johannes Schindelin
2007-01-19 19:56     ` Junio C Hamano
2007-01-19 23:54       ` Johannes Schindelin
2007-01-20  0:35         ` Junio C Hamano
2007-01-20  1:18           ` Johannes Schindelin
2007-01-20  1:21             ` Junio C Hamano
2007-01-20  1:31               ` Johannes Schindelin
2007-01-20  3:30             ` Junio C Hamano
2007-01-20  4:02               ` Simon 'corecode' Schubert
2007-01-20  9:28               ` Johannes Schindelin
2007-01-20 18:31                 ` Junio C Hamano
2007-01-20 22:04                   ` Johannes Schindelin
2007-01-21  0:37                     ` Robin Rosenberg
2007-01-21  1:39                       ` Johannes Schindelin
2007-01-21  2:32                         ` Bill Lear
2007-01-21  3:17                           ` Junio C Hamano
2007-01-21 22:16                             ` David Kågedal
2007-01-21 22:35                               ` Johannes Schindelin
2007-01-23 13:18                               ` Krzysztof Halasa
2007-01-23 13:50                                 ` David Kågedal
2007-01-23 14:34                                   ` Krzysztof Halasa
2007-01-23 17:07                                     ` Randal L. Schwartz
2007-01-23 23:27                                       ` Krzysztof Halasa
2007-01-23 23:48                                         ` Krzysztof Halasa
2007-01-21  2:56                     ` Simon 'corecode' Schubert [this message]
2007-01-21 11:19                       ` [PATCH] Teach revision machinery about --reverse Johannes Schindelin

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=45B2D651.7010606@fs.ei.tum.de \
    --to=corecode@fs.ei.tum.de \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    /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).