All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Sverre Rabbelier <srabbelier@gmail.com>
Cc: "Jonathan Nieder" <jrnieder@gmail.com>,
	"Jeff King" <peff@peff.net>, "Git List" <git@vger.kernel.org>,
	"Daniel Barkalow" <barkalow@iabervon.org>,
	"Ramkumar Ramachandra" <artagnon@gmail.com>,
	"Dmitry Ivankov" <divanorama@gmail.com>,
	"Johannes Schindelin" <Johannes.Schindelin@gmx.de>,
	"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
	"Eric Herman" <eric@freesa.org>,
	"Fernando Vezzosi" <buccia@repnz.net>
Subject: Re: [PATCH 3/3] fast-export: output reset command for commandline revs
Date: Sun, 06 Nov 2011 21:52:33 -0800	[thread overview]
Message-ID: <7v1utk4gym.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <1320535407-4933-4-git-send-email-srabbelier@gmail.com> (Sverre Rabbelier's message of "Sun, 6 Nov 2011 00:23:27 +0100")

Sverre Rabbelier <srabbelier@gmail.com> writes:

>   Additionally, the elem->whence != REV_CMD_RIGHT case should really
>   check if REV_CMD_RIGHT_REF, but as this is not provided by the
>   ref_info structure this is left as is.

I am not sure what you mean by REV_CMD_RIGHT_REF here. Do you mean "We are
only interested in the RHS endpoint of A...B syntax (i.e. B) but only when
it is a refname and not an arbitrary SHA-1 expression (e.g. even though
next~4 in "master...next~4" is a RHS endpoint, it is not a ref, and we do
not want it)"?

I think the distinction you are trying to express ("is it a ref and if so
what exact refname resolve_ref() would produce, or is it just the name of
a random commit?") is a very useful thing in general, but it is orthogonal
to what existing REV_CMD_* are trying to express, which is "where did they
come from", that you can read from the name of the field "whence".

Perhaps we would want to add a new field "const char *ref" to "struct
rev_cmdline_entry" to record the additional information you want perhaps
by storing the result of resolve_ref() if it is a ref and NULL otherwise.
Would it be too much work to add it to perfect this series?

By the way, REV_CMD_REF is meant to mean "the user did not explicitly name
this but it came as a result of iterating over refs/something/ namespace",
and does not mean "this is a tip of some ref" (they happen to be all refs,
but "obtained by iteration, not by explicit naming" is the more important
reason for marking them as such). As they are numerous, if you are going
to add that "const char *ref" field to rev_cmdline_entry, we may want to
either leave it NULL for REV_CMD_REF entries (the name field already has
that information anyway), or have it point at its name field (we need to
audit the codepath to free the name and ref fields if we go that route).

  parent reply	other threads:[~2011-11-07  5:52 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-05 23:23 [PATCH 0/3] fast-export fixes Sverre Rabbelier
2011-11-05 23:23 ` [PATCH 1/3] t9350: point out that refs are not updated correctly Sverre Rabbelier
2011-11-06  4:31   ` Jonathan Nieder
2011-11-06 19:38     ` Sverre Rabbelier
2011-11-07  9:32       ` Jonathan Nieder
2012-10-24 17:52   ` Felipe Contreras
2012-10-24 18:08     ` Jonathan Nieder
2012-10-24 19:09       ` Felipe Contreras
2012-10-24 19:11         ` Jonathan Nieder
2012-10-25  4:19           ` Felipe Contreras
2012-10-25  4:27             ` Jonathan Nieder
2012-10-25  5:18               ` Felipe Contreras
2012-10-25  5:28                 ` Jonathan Nieder
2012-10-25  5:39                   ` Sverre Rabbelier
2012-10-25  5:50                     ` Felipe Contreras
2012-10-25  6:07                       ` Sverre Rabbelier
2012-10-25  6:19                         ` Felipe Contreras
2012-10-25  7:06                           ` Sverre Rabbelier
2012-10-25  7:34                             ` Jonathan Nieder
2012-10-25  7:43                               ` Sverre Rabbelier
2012-10-25  7:48                                 ` Jonathan Nieder
2012-10-25  7:50                                   ` Sverre Rabbelier
2012-10-25 13:33                                     ` Felipe Contreras
2012-10-25  5:40                   ` Felipe Contreras
2012-10-25  5:53                     ` Jonathan Nieder
2012-10-25  6:39                       ` Felipe Contreras
2012-10-25  7:18                         ` Jonathan Nieder
2012-10-25 16:43                           ` Felipe Contreras
2012-10-24 21:41     ` Johannes Schindelin
2012-10-25  5:13       ` Felipe Contreras
2011-11-05 23:23 ` [PATCH 2/3] fast-export: do not refer to non-existing marks Sverre Rabbelier
2011-11-06  4:45   ` Jonathan Nieder
2011-11-06 19:40     ` Sverre Rabbelier
2019-01-29 19:41       ` Johannes Schindelin
2011-11-05 23:23 ` [PATCH 3/3] fast-export: output reset command for commandline revs Sverre Rabbelier
2011-11-06  5:01   ` Jonathan Nieder
2011-11-06 19:48     ` Sverre Rabbelier
2011-11-07  8:58       ` Jonathan Nieder
2011-11-07  5:52   ` Junio C Hamano [this message]
2011-11-07  5:53   ` Junio C Hamano
2011-11-30 16:56   ` Thomas Rast
2012-10-24 18:02   ` Felipe Contreras

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=7v1utk4gym.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=artagnon@gmail.com \
    --cc=avarab@gmail.com \
    --cc=barkalow@iabervon.org \
    --cc=buccia@repnz.net \
    --cc=divanorama@gmail.com \
    --cc=eric@freesa.org \
    --cc=git@vger.kernel.org \
    --cc=jrnieder@gmail.com \
    --cc=peff@peff.net \
    --cc=srabbelier@gmail.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 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.