Git development
 help / color / mirror / Atom feed
* Re: [PATCH 0/3] fixup remaining cvsimport tests
From: Chris Rorvick @ 2013-01-20 15:22 UTC (permalink / raw)
  To: John Keeping; +Cc: git
In-Reply-To: <20130120125838.GK31172@serenity.lan>

On Sun, Jan 20, 2013 at 6:58 AM, John Keeping <john@keeping.me.uk> wrote:
> Hi Chris,
>
> On Thu, Jan 10, 2013 at 10:27:16PM -0600, Chris Rorvick wrote:
>> These patchs apply on top of of Eric Raymond's cvsimport patch.  7 of 15
>> tests in t9600 fail, one of which is fixed w/ a cvsps patch I've sent
>> to Eric (fixes revision map.)
>
> Did you post the fix for the revision map publicly anywhere?

It's in Eric's repo and included in version 3.8:

https://gitorious.org/cvsps/cvsps/commit/abe81e1775a8959291f629029513d1b7160bbde6

Chris

^ permalink raw reply

* Re: [PATCH 0/3] fixup remaining cvsimport tests
From: John Keeping @ 2013-01-20 15:28 UTC (permalink / raw)
  To: Chris Rorvick; +Cc: git
In-Reply-To: <CAEUsAPZKd+mw2iK7nd6rTtB8N+B99ud19FkuSx0HVitNxrxxZA@mail.gmail.com>

On Sun, Jan 20, 2013 at 09:22:03AM -0600, Chris Rorvick wrote:
> On Sun, Jan 20, 2013 at 6:58 AM, John Keeping <john@keeping.me.uk> wrote:
>> On Thu, Jan 10, 2013 at 10:27:16PM -0600, Chris Rorvick wrote:
>>> These patchs apply on top of of Eric Raymond's cvsimport patch.  7 of 15
>>> tests in t9600 fail, one of which is fixed w/ a cvsps patch I've sent
>>> to Eric (fixes revision map.)
>>
>> Did you post the fix for the revision map publicly anywhere?
> 
> It's in Eric's repo and included in version 3.8:
> 
> https://gitorious.org/cvsps/cvsps/commit/abe81e1775a8959291f629029513d1b7160bbde6

Thanks.  For some reason I thought the fix would be to
git-cvsimport-3.py.  Obviously I should have read more carefully.

Sorry for the noise.


John

^ permalink raw reply

* Re: [PATCH v3] am: invoke perl's strftime in C locale
From: Junio C Hamano @ 2013-01-20 17:47 UTC (permalink / raw)
  To: Dmitry V. Levin; +Cc: Jeff King, Antoine Pelisse, git
In-Reply-To: <20130119202853.GD1652@altlinux.org>

"Dmitry V. Levin" <ldv@altlinux.org> writes:

> Personally I prefer 2nd edition that is simpler and does the right thing
> (not that LC_ALL=C is necessary and sufficient, you neither need to add
> things like LANG=C nor can relax it to LC_TIME=C).

I guess everybody involved is in agreement, then.

Just FYI, "LC_ALL=C LANG=C" comes from the inertia dating back when
not everybody understood LC_*; I do not personally know of a system
that will be helped by the extra LANG=C these days, but I know it
will not hurt anybody, so...

^ permalink raw reply

* Re: [PATCH 0/2] Hiding some refs in ls-remote
From: Junio C Hamano @ 2013-01-20 18:06 UTC (permalink / raw)
  To: Jeff King; +Cc: git, spearce, mfick
In-Reply-To: <20130119165042.GB12307@sigill.intra.peff.net>

Jeff King <peff@peff.net> writes:

>> 	[uploadPack]
>> 		hiderefs = refs/changes
>
> Would you want to do the same thing on receive-pack? It could benefit
> from the same reduction in network cost (although it tends to be invoked
> less frequently than upload-pack).

Do *I* want to do?  Not when there already is a patch exists; I'd
rather take existing and tested patch ;-)

As I said, I view this primarily as solving the cluttering issue.
The use of hiderefs to hide these refs that point at objects I do
not consider belong to my repository from the pushers equally makes
sense as such, I think.

^ permalink raw reply

* Re: [PATCH 0/2] Hiding some refs in ls-remote
From: Junio C Hamano @ 2013-01-20 18:19 UTC (permalink / raw)
  To: Duy Nguyen; +Cc: git, spearce, mfick
In-Reply-To: <7v38xxnfv3.fsf@alter.siamese.dyndns.org>

Junio C Hamano <gitster@pobox.com> writes:

> Duy Nguyen <pclouds@gmail.com> writes:
>
>> Should the client side learn how to list hidden refs too? I'm thinking
>> of an extreme case where upload-pack advertises nothing (or maybe just
>> refs/heads/master) and it's up to the client to ask for the ref
>> selection it's interested in. upload-pack may need more updates to do
>> that, I think.
>
> What you are talking about is a different goal.
>
> Look at this as a mechanism for the repository owner to control the
> clutter in what is shown to the intended audience of what s/he
> publishes in the repository.  Network bandwidth reduction of
> advertisement is a side effect of clutter reduction, and not
> necessarily the primary goal.

As a separate and follow-up topic, I can see a future where we also
have .delayref (in addition to .hideref) configuration, that causes
the upload-pack to:

 * omit refs that are marked as "delayed";

 * advertise "allow-expand-ref=<value>" where the value is the
   pattern used to specify which refs are omitted via this mechanism
   (e.g. "refs/*" in your extreme example, or perhaps "refs/tags/"
   if you only advertise branches in order to limit the bandwidth);

and then a fetch-pack that is interested in fetching "refs/foo/bar",
after seeing that it matches one of the "allow-expand-ref" patterns,
to ask "expand-ref refs/foo/bar", expect the upload-pack to respond
with "refs/foo/bar <value of that ref>" (or "refs/foo/bar does not
exist"), before going into the usual "want" exchange ("ls-remote"
would of course do the same, and pattern-less "ls-remote" may even
ask to expand everything by saying "expand-ref refs/*" (where the
capability said "allow-expand-ref=refs/*" in your extreme example)
to grab everything discoverable).

That is _primarily_ for trading network bandwidth with initial
latency; as far as the end-result is concerned, delayed ones to be
expanded on demand are just as discoverable as the ones advertised
initially.

I think we'd want to have both in the end.  It just happens I just
posted the beginning of clutter-reduction one, as I think developing
both in parallel would be messy and hideref is probably less
involved than the delayref.

^ permalink raw reply

* Re: [PATCH 1/2] Change old system name 'GIT' to 'Git'
From: Junio C Hamano @ 2013-01-20 18:33 UTC (permalink / raw)
  To: David Aguilar; +Cc: Thomas Ackermann, git
In-Reply-To: <CAJDDKr5_AWFF6MR2Kwt5FzA0vaSE-wx8xFO3xcRnKZ168hXBrg@mail.gmail.com>

David Aguilar <davvid@gmail.com> writes:

> On Sat, Jan 19, 2013 at 1:59 AM, Thomas Ackermann <th.acker@arcor.de> wrote:
>> @@ -55,7 +55,7 @@ History Viewers
>>
>>     - *gitweb* (shipped with git-core)
>>
>> -   GITweb provides full-fledged web interface for GIT repositories.
>> +   GITweb provides full-fledged web interface for Git repositories.
>
> What about GITweb?
>
>> diff --git a/Documentation/git-update-ref.txt b/Documentation/git-update-ref.txt
>> index d377a35..0df13ff 100644
>> --- a/Documentation/git-update-ref.txt
>> +++ b/Documentation/git-update-ref.txt
>> @@ -73,7 +73,7 @@ in ref value.  Log lines are formatted as:
>>  Where "oldsha1" is the 40 character hexadecimal value previously
>>  stored in <ref>, "newsha1" is the 40 character hexadecimal value of
>>  <newvalue> and "committer" is the committer's name, email address
>> -and date in the standard GIT committer ident format.
>> +and date in the standard Git committer ident format.
>
> IMO some of these look nicer when everything is lowercase.
> e.g. "standard git committer ident format".

I do not think we ever intended to change the *name* of the
software.

In the early days, we wrote GIT in places where, if we were doing a
fancier typography, we would have used drop-caps for the latter two
(i.e. it is "Git" spelled in a font whose lower case alphabets have
the same shape as upper case ones but are smaller).  So there were
only "git" vs "Git".

If I were to decide today to change the spellings, with an explicit
purpose of making things more consistent across documentation, it
may make sense to use even a simpler rule that is less error-prone
for people who write new sentences that has to have the word.  How
about treating it just like any other ordinary word?  That is, we
say "git" (without double-quotes, of course), unless it comes at the
beginning of a sentence?

^ permalink raw reply

* Re: [PATCH] unpack-trees: do not abort when overwriting an existing file with the same content
From: Junio C Hamano @ 2013-01-20 18:35 UTC (permalink / raw)
  To: Nguyễn Thái Ngọc Duy; +Cc: git
In-Reply-To: <1358594648-26851-1-git-send-email-pclouds@gmail.com>

Nguyễn Thái Ngọc Duy  <pclouds@gmail.com> writes:

> +	/*
> +	 * If it has the same content that we are going to write down,

write down???

> +	 * there's no point in complaining. We still overwrite it in the
> +	 * end though. Permission is not checked so it may be lost.
> +	 */

That is a regression, isn't it?  Is it too cumbersome to avoid
losing the permission bits by stopping in that case?

> +	if (ce &&
> +	    S_ISREG(st->st_mode) && S_ISREG(ce->ce_mode) &&
> +	    st->st_size < 1024 * 1024 && /* should be configurable */
> +	    sha1_object_info(ce->sha1, &ce_size) == OBJ_BLOB &&
> +	    ce_size == st->st_size) {
> +		void *buffer = NULL;
> +		unsigned long size;
> +		enum object_type type;
> +		struct strbuf sb = STRBUF_INIT;
> +		int matched =
> +			strbuf_read_file(&sb, ce->name, ce_size) == ce_size &&
> +			(buffer = read_sha1_file(ce->sha1, &type, &size)) != NULL &&
> +			type == OBJ_BLOB &&
> +			size == ce_size &&
> +			!memcmp(buffer, sb.buf, size);
> +		free(buffer);
> +		strbuf_release(&sb);
> +		if (matched)
> +			return 0;
> +	}
> +
>  	return o->gently ? -1 :
>  		add_rejected_path(o, error_type, name);
>  }

^ permalink raw reply

* Re: [RFC] git rm -u
From: Junio C Hamano @ 2013-01-20 18:42 UTC (permalink / raw)
  To: Matthieu Moy
  Cc: Jonathan Nieder, Eric James Michael Ritz, git, Tomas Carnecky
In-Reply-To: <vpq622s9jk1.fsf@grenoble-inp.fr>

Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:

> "git add -u" is one of the only exceptions (with "git grep"). I consider
> this as a bug, and think this should be changed. This has been discussed
> several times here, but no one took the time to actually do the change

Did we ever agree that it is a good change to begin with?  Pointers?

^ permalink raw reply

* Re: [RFC] git rm -u
From: Junio C Hamano @ 2013-01-20 18:53 UTC (permalink / raw)
  To: Matthieu Moy
  Cc: Jonathan Nieder, Eric James Michael Ritz, git, Tomas Carnecky
In-Reply-To: <vpq622s9jk1.fsf@grenoble-inp.fr>

Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:

> Implementing "git rm -u" as a tree-wide command would create a
> discrepancy with "git add -u". Implementing it as a "current directory"
> command would make the migration harder if we eventually try to change
> "git add -u". Perhaps "git rm -u" should be forbidden from a
> subdirectory (with an error message pointing to "git rm -u :/" and "git
> rm -u ."), waiting for a possible "git add -u" change.

Yeah, that sounds sensible.  Start with a "'git rm -u' is forbidden
without arguments", give advise to use either "." or ":/".  And stop
there.

The first step of "git add -u" migration plan would be to warn when
no argument is given and update all the existing index entries, and
give the same advise to use either "." or ":/".  Keep this for three
cycles: 3 * (8 to 10 weeks per cycle) = 27 weeks ~ 1/2 year.

The second step would be to forbid "git add -u", and keep the
advise.  That will make it in-line with "git rm -u".

^ permalink raw reply

* Re: [PATCH 1/2] Change old system name 'GIT' to 'Git'
From: Joachim Schmitz @ 2013-01-20 18:53 UTC (permalink / raw)
  To: git
In-Reply-To: <7vehhfn1r0.fsf@alter.siamese.dyndns.org>

Junio C Hamano wrote:
> David Aguilar <davvid@gmail.com> writes:
>
>> On Sat, Jan 19, 2013 at 1:59 AM, Thomas Ackermann
>> <th.acker@arcor.de> wrote:
>>> @@ -55,7 +55,7 @@ History Viewers
>>>
>>>     - *gitweb* (shipped with git-core)
>>>
>>> -   GITweb provides full-fledged web interface for GIT repositories.
>>> +   GITweb provides full-fledged web interface for Git repositories.
>>
>> What about GITweb?
>>
>>> diff --git a/Documentation/git-update-ref.txt
>>> b/Documentation/git-update-ref.txt index d377a35..0df13ff 100644
>>> --- a/Documentation/git-update-ref.txt
>>> +++ b/Documentation/git-update-ref.txt
>>> @@ -73,7 +73,7 @@ in ref value.  Log lines are formatted as:
>>>  Where "oldsha1" is the 40 character hexadecimal value previously
>>>  stored in <ref>, "newsha1" is the 40 character hexadecimal value of
>>>  <newvalue> and "committer" is the committer's name, email address
>>> -and date in the standard GIT committer ident format.
>>> +and date in the standard Git committer ident format.
>>
>> IMO some of these look nicer when everything is lowercase.
>> e.g. "standard git committer ident format".
>
> I do not think we ever intended to change the *name* of the
> software.
>
> In the early days, we wrote GIT in places where, if we were doing a
> fancier typography, we would have used drop-caps for the latter two
> (i.e. it is "Git" spelled in a font whose lower case alphabets have
> the same shape as upper case ones but are smaller).  So there were
> only "git" vs "Git".
>
> If I were to decide today to change the spellings, with an explicit
> purpose of making things more consistent across documentation, it
> may make sense to use even a simpler rule that is less error-prone
> for people who write new sentences that has to have the word.  How
> about treating it just like any other ordinary word?  That is, we
> say "git" (without double-quotes, of course), unless it comes at the
> beginning of a sentence?

Because then it could get confused with "git", the command? That would be 
lower case even at the beginning of a sentence, wouldn't it?

Bye, Jojo 

^ permalink raw reply

* Re: [PATCH v2] INSTALL: git-p4 doesn't support Python 3
From: Junio C Hamano @ 2013-01-20 18:54 UTC (permalink / raw)
  To: John Keeping; +Cc: git, Pete Wyckoff
In-Reply-To: <20130120110620.GJ31172@serenity.lan>

John Keeping <john@keeping.me.uk> writes:

> git-p4 supports Python 2.6 and later versions of Python 2.  Since Python
> 2.8 will never exist [1], it is most concise to just list the supported
> versions.

Thanks; Eric's patch recently updated git-p4.py to require 2.4 I
think. Shouldn't it also be updated?

>
> [1] http://www.python.org/dev/peps/pep-0404/
>
> Signed-off-by: John Keeping <john@keeping.me.uk>
> Acked-by: Pete Wyckoff <pw@padd.com>
> ---
> Since v1:
>  - Fixed a typo in the commit message.
>
>  INSTALL | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/INSTALL b/INSTALL
> index 28f34bd..c456d1c 100644
> --- a/INSTALL
> +++ b/INSTALL
> @@ -131,7 +131,7 @@ Issues of note:
>  	  use English. Under autoconf the configure script will do this
>  	  automatically if it can't find libintl on the system.
>  
> -	- Python version 2.6 or later is needed to use the git-p4
> +	- Python version 2.6 or 2.7 is needed to use the git-p4
>  	  interface to Perforce.
>  
>   - Some platform specific issues are dealt with Makefile rules,

^ permalink raw reply

* Re: [PATCH 0/3] fixup remaining cvsimport tests
From: Junio C Hamano @ 2013-01-20 18:57 UTC (permalink / raw)
  To: John Keeping; +Cc: Chris Rorvick, git
In-Reply-To: <20130120152857.GM31172@serenity.lan>

John Keeping <john@keeping.me.uk> writes:

> On Sun, Jan 20, 2013 at 09:22:03AM -0600, Chris Rorvick wrote:
>> On Sun, Jan 20, 2013 at 6:58 AM, John Keeping <john@keeping.me.uk> wrote:
>>> On Thu, Jan 10, 2013 at 10:27:16PM -0600, Chris Rorvick wrote:
>>>> These patchs apply on top of of Eric Raymond's cvsimport patch.  7 of 15
>>>> tests in t9600 fail, one of which is fixed w/ a cvsps patch I've sent
>>>> to Eric (fixes revision map.)
>>>
>>> Did you post the fix for the revision map publicly anywhere?
>> 
>> It's in Eric's repo and included in version 3.8:
>> 
>> https://gitorious.org/cvsps/cvsps/commit/abe81e1775a8959291f629029513d1b7160bbde6
>
> Thanks.  For some reason I thought the fix would be to
> git-cvsimport-3.py.  Obviously I should have read more carefully.
>
> Sorry for the noise.

This is not a noise, though.

Chris, how would we want to proceed?  I'd prefer at some point to
see cvsimport-3 to be in sync when the one patched and tested in
Eric's repository is proven enough.  Will Eric be the gatekeeper, or
will you be sending patches this way as well?

^ permalink raw reply

* Re: [PATCH 1/2] Change old system name 'GIT' to 'Git'
From: Junio C Hamano @ 2013-01-20 19:02 UTC (permalink / raw)
  To: Joachim Schmitz; +Cc: git
In-Reply-To: <kdheeh$ntf$1@ger.gmane.org>

"Joachim Schmitz" <jojo@schmitz-digital.de> writes:

> Because then it could get confused with "git", the command? That would
> be lower case even at the beginning of a sentence, wouldn't it?

Is it a real-world problem?

I think in a prose when you refer to "git" the command, you would
say something like

	The `git` command started as a thin wrapper to many
	subcommand of the `git-subcmd` form.

^ permalink raw reply

* Re: git interactive rebase 'consume' command
From: Junio C Hamano @ 2013-01-20 19:05 UTC (permalink / raw)
  To: Stephen Kelly; +Cc: git
In-Reply-To: <kdgtir$apt$1@ger.gmane.org>

Stephen Kelly <steveire@gmail.com> writes:

> Hi there,
>
> I find the fixup command during an interactive rebase useful.
>
> Sometimes when cleaning up a branch, I end up in a situation like this:
>
>  pick 07bc3c9 Good commit.
>  pick 1313a5e Commit to fixup into c2f62a3.
>  pick c2f62a3 Another commit.
>
>
> So, I have to reorder the commits, and change 1313a5e to 'f'. An alternative 
> would be to squash 's' c2f62a3 into 1313a5e and clean up the commit message. 
> The problem with that is it ends up with the wrong author time information.
>
> So, I usually reorder and then fixup, but that can also be problematic if I 
> get a conflict during the re-order (which is quite likely).
>
> I would prefer to be able to mark a commit as 'should be consumed', so that:
>
>  pick 07bc3c9 Good commit.
>  consume 1313a5e Commit to fixup into c2f62a3.
>  pick c2f62a3 Another commit.
>
> will result in 
>
>  pick 07bc3c9 Good commit.
>  pick 62a3c2f Another commit.
>
> directly.
>
> Any thoughts on that? 

Sorry, but I do not understand what you are trying to solve.

How can 1313a5e, which fixes misakes made in c2f62a3, come before
that commit in the first place?

^ permalink raw reply

* Re: git interactive rebase 'consume' command
From: Stephen Kelly @ 2013-01-20 19:13 UTC (permalink / raw)
  To: git
In-Reply-To: <7vk3r7llod.fsf@alter.siamese.dyndns.org>

Junio C Hamano wrote:
> Sorry, but I do not understand what you are trying to solve.
> 
> How can 1313a5e, which fixes misakes made in c2f62a3, come before
> that commit in the first place?

One scenario is something like this:

 Start with a clean HEAD (always a good idea :) )
 hack hack hack
 make multiple commits
 realize that a hunk you committed in an early patch belongs in a later one.
 use git rebase -i to fix it.


Is that more clear?

Thanks,

Steve.

^ permalink raw reply

* Re: [RFC] git rm -u
From: Eric James Michael Ritz @ 2013-01-20 19:21 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Matthieu Moy, Jonathan Nieder, git, Tomas Carnecky
In-Reply-To: <7v1udfn0tm.fsf@alter.siamese.dyndns.org>

On 01/20/2013 01:53 PM, Junio C Hamano wrote:
 > Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:
 >
 >> Implementing "git rm -u" as a tree-wide command would create a
 >> discrepancy with "git add -u". Implementing it as a "current
 >> directory" command would make the migration harder if we eventually
 >> try to change "git add -u". Perhaps "git rm -u" should be forbidden
 >> from a subdirectory (with an error message pointing to "git rm -u
 >> :/" and "git rm -u ."), waiting for a possible "git add -u" change.
 >
 > Yeah, that sounds sensible.  Start with a "'git rm -u' is forbidden
 > without arguments", give advise to use either "." or ":/".  And stop
 > there.

I was unaware of any plan to change `git add -u`, but the above makes
sense to me.  I will use those suggestions as guidelines for the
initial implementation of `git rm -u`.  In particular, it will require
an argument like `.` or `:/`.  It sounds like the future direction of
`git add -u` will play a role in how `git rm -u` should behave so that
there is consistency between the two, so I will try to take a
conservative approach in my implementation.  Thank you both for the
advice and insight.

--
ejmr
南無妙法蓮華經

^ permalink raw reply

* Re: [PATCH 0/3] fixup remaining cvsimport tests
From: John Keeping @ 2013-01-20 19:24 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Chris Rorvick, git
In-Reply-To: <7vsj5vlm1d.fsf@alter.siamese.dyndns.org>

On Sun, Jan 20, 2013 at 10:57:50AM -0800, Junio C Hamano wrote:
> John Keeping <john@keeping.me.uk> writes:
>> On Sun, Jan 20, 2013 at 09:22:03AM -0600, Chris Rorvick wrote:
>>> On Sun, Jan 20, 2013 at 6:58 AM, John Keeping <john@keeping.me.uk> wrote:
>>>> On Thu, Jan 10, 2013 at 10:27:16PM -0600, Chris Rorvick wrote:
>>>>> These patchs apply on top of of Eric Raymond's cvsimport patch.  7 of 15
>>>>> tests in t9600 fail, one of which is fixed w/ a cvsps patch I've sent
>>>>> to Eric (fixes revision map.)
>>>>
>>>> Did you post the fix for the revision map publicly anywhere?
>>> 
>>> It's in Eric's repo and included in version 3.8:
>>> 
>>> https://gitorious.org/cvsps/cvsps/commit/abe81e1775a8959291f629029513d1b7160bbde6
>>
>> Thanks.  For some reason I thought the fix would be to
>> git-cvsimport-3.py.  Obviously I should have read more carefully.
>>
>> Sorry for the noise.
> 
> This is not a noise, though.
> 
> Chris, how would we want to proceed?  I'd prefer at some point to
> see cvsimport-3 to be in sync when the one patched and tested in
> Eric's repository is proven enough.  Will Eric be the gatekeeper, or
> will you be sending patches this way as well?

In this case the patch was to the C portion of cvsps, not the Python
cvs-import, so not relevant for this particular case.

I currently have a set of patches on top of jc/cvsimport-upgrade, which
is slightly out-of-sync with git-cvsimport.py in Eric's cvsps
repository, because I hadn't realised that the latter existed until
about an hour ago.

I haven't decided yet whether to rebase those onto the git-cvsimport.py
in the cvsps repository or send them here to apply on top of
jc/cvsimport-upgrade.  Given that git-cvsimport is a command which has
been around for a while and (although this is a complete re-write) the
aim of these changes is to keep it working as the upstream project
changes, I have a slight preference for keeping git-cvsimport here and
recommending that the copy in the cvsps repository is removed.


John

^ permalink raw reply

* Re: [PATCH v2] INSTALL: git-p4 doesn't support Python 3
From: John Keeping @ 2013-01-20 19:28 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, Pete Wyckoff
In-Reply-To: <7vwqv7lm6b.fsf@alter.siamese.dyndns.org>

On Sun, Jan 20, 2013 at 10:54:52AM -0800, Junio C Hamano wrote:
> John Keeping <john@keeping.me.uk> writes:
> 
>> git-p4 supports Python 2.6 and later versions of Python 2.  Since Python
>> 2.8 will never exist [1], it is most concise to just list the supported
>> versions.
> 
> Thanks; Eric's patch recently updated git-p4.py to require 2.4 I
> think. Shouldn't it also be updated?

I haven't done a thorough audit to check what the actual minimum
supported version is, this is just the minimal change to say "not
Python 3".

Personally, I'm not sure of the value of having version checks at the
top of the Python scripts, I would rather set a project-wide minimum
supported version (as in my recent CodingGuidelines patch) and check it
once in the Makefile.


John

^ permalink raw reply

* Re: [PATCH v2] Make git selectively and conditionally ignore certain stat fields
From: Robin Rosenberg @ 2013-01-20 19:51 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, j sixt, Shawn Pearce
In-Reply-To: <7va9sa6f0h.fsf@alter.siamese.dyndns.org>



----- Ursprungligt meddelande -----

> That configurability is a slipperly slope to drag us into giving
> users
> more complexity that does not help them very much, I suspect.
> 
> Earlier somebody mentioned "size and mtime is often enough", so I
> think a single option core.looseStatInfo (substitute "loose" with
> short, minimum or whatever adjective that is more appropriate---I am
> not good at picking phrases, it sounds to me a way to more loosely
> define stat info cleanliness than we usually do) that makes us
> ignore all fields (regardless of their zero-ness) other than those
> two fields might not be a bad way to go.

Would something like this be good?

core.statinfo = 
default = all fields
minimal = whole seconds of mtime and size
medium = seconds, nanos of mtime and size
nonzero = all non-zero fields

-- robin

^ permalink raw reply

* Re: [PATCH v2] INSTALL: git-p4 doesn't support Python 3
From: Junio C Hamano @ 2013-01-20 19:54 UTC (permalink / raw)
  To: John Keeping; +Cc: Eric S. Raymond, git, Pete Wyckoff
In-Reply-To: <20130120192831.GB7498@serenity.lan>

John Keeping <john@keeping.me.uk> writes:

> On Sun, Jan 20, 2013 at 10:54:52AM -0800, Junio C Hamano wrote:
>> John Keeping <john@keeping.me.uk> writes:
>> 
>>> git-p4 supports Python 2.6 and later versions of Python 2.  Since Python
>>> 2.8 will never exist [1], it is most concise to just list the supported
>>> versions.
>> 
>> Thanks; Eric's patch recently updated git-p4.py to require 2.4 I
>> think. Shouldn't it also be updated?
>
> I haven't done a thorough audit to check what the actual minimum
> supported version is, this is just the minimal change to say "not
> Python 3".
>
> Personally, I'm not sure of the value of having version checks at the
> top of the Python scripts, I would rather set a project-wide minimum
> supported version (as in my recent CodingGuidelines patch) and check it
> once in the Makefile.

OK; I'll leave that for later a day (Cc'ed Eric but stakeholders of
other Python scripts may want to express their opinions), and will
apply this patch as is.

If we end up deciding to rip out the "prerequisite per file", that
will be a tree-wide change that is independent from your patch we
are discussing in this thread.  If we end up not doing that, then we
would instead be updating git-p4.py to set a higher floor to the
prerequiste but that can come as a separate patch.

Thanks.

^ permalink raw reply

* Re: [PATCH 2/3] Allow Git::get_tz_offset to properly handle DST boundary times
From: Ben Walton @ 2013-01-20 20:06 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Eric Raymond, git
In-Reply-To: <7vy5frtymt.fsf@alter.siamese.dyndns.org>

On Thu, Jan 17, 2013 at 7:09 PM, Junio C Hamano <gitster@pobox.com> wrote:
> Ben Walton <bdwalton@gmail.com> writes:
>
>> The Git::get_tz_offset is meant to provide a workalike replacement for
>> the GNU strftime %z format specifier.  The algorithm used failed to
>> properly handle DST boundary cases.
>>
>> For example, the unix time 1162105199 in CST6CDT saw set_tz_offset
>> improperly return -0600 instead of -0500.
>>
>> TZ=CST6CDT date -d @1162105199 +"%c %z"
>> Sun 29 Oct 2006 01:59:59 AM CDT -0500
>>
>> $ zdump -v /usr/share/zoneinfo/CST6CDT | grep 2006
>> /usr/share/zoneinfo/CST6CDT  Sun Apr  2 07:59:59 2006 UTC = Sun Apr  2
>> 01:59:59 2006 CST isdst=0 gmtoff=-21600
>> /usr/share/zoneinfo/CST6CDT  Sun Apr  2 08:00:00 2006 UTC = Sun Apr  2
>> 03:00:00 2006 CDT isdst=1 gmtoff=-18000
>> /usr/share/zoneinfo/CST6CDT  Sun Oct 29 06:59:59 2006 UTC = Sun Oct 29
>> 01:59:59 2006 CDT isdst=1 gmtoff=-18000
>> /usr/share/zoneinfo/CST6CDT  Sun Oct 29 07:00:00 2006 UTC = Sun Oct 29
>> 01:00:00 2006 CST isdst=0 gmtoff=-21600
>>
>> To determine how many hours/minutes away from GMT a particular time
>> was, we calculated the gmtime() of the requested time value and then
>> used Time::Local's timelocal() function to turn the GMT-based time
>> back into a scalar value representing seconds from the epoch.  Because
>> GMT has no daylight savings time, timelocal() cannot handle the
>> ambiguous times that occur at DST boundaries since there are two
>> possible correct results.
>>
>> To work around the ambiguity at these boundaries, we must take into
>> account the pre and post conversion values for is_dst as provided by
>> both the original time value and the value that has been run through
>> timelocal().  If the is_dst field of the two times disagree then we
>> must modify the value returned from timelocal() by an hour in the
>> correct direction.
>
> It seems to me that it is a very roundabout way.  It may be correct,
> but it is unclear why the magic +/-3600 shift is the right solution
> and I suspect even you wouldn't notice if I sent you back your patch
> with a slight change to swap $gm += 3600 and $gm -= 3600 lines ;-).
>
> For that timestamp in question, the human-readable representation of
> gmtime($t) and localtime($t) look like these two strings:
>
>         my $t = 1162105199;
>         print gmtime($t), "\n";    # Sun Oct 29 06:59:59 2006
>         print localtime($t), "\n"; # Sun Oct 29 01:59:59 2006
>
> As a human, you can easily see that these two stringified timestamps
> look 5 hours apart.  Think how you managed to do so.
>
> If we convert these back to the seconds-since-epoch, as if these
> broken-down times were both in a single timezone that does not have
> any DST issues, you can get the offset (in seconds) by subtraction,
> and that is essentially the same as the way in which your eyes saw
> they are 5 hours apart, no?  In other words, why do you need to run
> timelocal() at all?
>
>         my $t = 1162105199;
>         my $lct = timegm(localtime($t));
>         # of course, timegm(gmtime($t)) == $t
>
>         my $minutes = int(($lct - $t)/60);
>         my $sign "+";
>         if ($minutes < 0) {
>                 $sign = "-";
>                 $minutes = -$minutes;
>         }
>         my $hours = int($minutes/60);
>         $minutes -= $hours * 60;
>         sprintf("%s%02d%02d", $sign, $hours, $minutes);
>
> Confused...
>
>>
>> Signed-off-by: Ben Walton <bdwalton@gmail.com>
>> ---
>>  perl/Git.pm |   20 ++++++++++++++++++++
>>  1 file changed, 20 insertions(+)
>>
>> diff --git a/perl/Git.pm b/perl/Git.pm
>> index 5649bcc..788b9b4 100644
>> --- a/perl/Git.pm
>> +++ b/perl/Git.pm
>> @@ -528,7 +528,27 @@ If TIME is not supplied, the current local time is used.
>>  sub get_tz_offset {
>>       # some systmes don't handle or mishandle %z, so be creative.
>>       my $t = shift || time;
>> +     # timelocal() has a problem when it comes to DST ambiguity so
>> +     # times that are on a DST boundary cannot be properly converted
>> +     # using it.  we will possibly adjust its result depending on whehter
>> +     # pre and post conversions agree on DST
>>       my $gm = timelocal(gmtime($t));
>> +
>> +     # we need to know whether we were originally in DST or not
>> +     my $orig_dst = (localtime($t))[8];
>> +     # and also whether timelocal thinks we're in DST
>> +     my $conv_dst = (localtime($gm))[8];
>> +
>> +     # re-adjust $gm based on the DST value for the two times we're
>> +     # handling.
>> +     if ($orig_dst != $conv_dst) {
>> +             if ($orig_dst == 1) {
>> +                     $gm -= 3600;
>> +             } else {
>> +                     $gm += 3600;
>> +             }
>> +     }
>> +
>>       my $sign = qw( + + - )[ $t <=> $gm ];
>>       return sprintf("%s%02d%02d", $sign, (gmtime(abs($t - $gm)))[2,1]);
>>  }


Sorry for the slow response, I didn't have a good chance to look at
this until now.  You are correct; your solution appears simpler and
also avoids the oddball 1/2 hour DST shift.  I can re-roll the series
with your code (and credit for it) or you can apply you change on top
of my series...whichever is easiest for you.

Thanks
-Ben
--
---------------------------------------------------------------------------------------------------------------------------
Take the risk of thinking for yourself.  Much more happiness,
truth, beauty and wisdom will come to you that way.

-Christopher Hitchens
---------------------------------------------------------------------------------------------------------------------------

^ permalink raw reply

* git-cvsimport-3 and incremental imports
From: John Keeping @ 2013-01-20 20:09 UTC (permalink / raw)
  To: git; +Cc: Eric S. Raymond

I've now spent some time looking at git-cvsimport-3.py from
jc/cvsimport-upgrade and made some progress in making it pass more of
the Git test suite (my work in progress is at [1]).

However, I think there is a fundamental problem with the way it handles
incremental imports and I'm hoping someone with more git-fast-import
experience can point me in the right direction.

Currently, cvsps-3 never writes a "from ..." line in the first commit it
outputs for a branch, even when the output is restricted by date (i.e. a
continuation of a previously imported branch), which results in failure
to update branches since git-fast-import is run without "--force".  If I
make a simple modification so that it does this, it can end up
outputting an empty commit (a duplicate of the current tip commit on the
branch).

Given that the start date for the import is currently just read from
HEAD there is probably scope for this being worse on other branches if
they have more recent commits than the current branch.

I don't think there is any way to solve this without giving cvsps more
information, probably the last commit time for all git branches, but
perhaps I'm missing a fast-import feature that can help solve this
problem.


[1] https://github.com/johnkeeping/git/tree/cvsimport-3


John

^ permalink raw reply

* Re: [PATCH 0/3] fixup remaining cvsimport tests
From: Chris Rorvick @ 2013-01-20 20:17 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: John Keeping, git
In-Reply-To: <7vsj5vlm1d.fsf@alter.siamese.dyndns.org>

On Sun, Jan 20, 2013 at 12:57 PM, Junio C Hamano <gitster@pobox.com> wrote:
> John Keeping <john@keeping.me.uk> writes:
>
>> On Sun, Jan 20, 2013 at 09:22:03AM -0600, Chris Rorvick wrote:
>>> On Sun, Jan 20, 2013 at 6:58 AM, John Keeping <john@keeping.me.uk> wrote:
>>>> On Thu, Jan 10, 2013 at 10:27:16PM -0600, Chris Rorvick wrote:
>>>>> These patchs apply on top of of Eric Raymond's cvsimport patch.  7 of 15
>>>>> tests in t9600 fail, one of which is fixed w/ a cvsps patch I've sent
>>>>> to Eric (fixes revision map.)
>>>>
>>>> Did you post the fix for the revision map publicly anywhere?
>>>
>>> It's in Eric's repo and included in version 3.8:
>>>
>>> https://gitorious.org/cvsps/cvsps/commit/abe81e1775a8959291f629029513d1b7160bbde6
>>
>> Thanks.  For some reason I thought the fix would be to
>> git-cvsimport-3.py.  Obviously I should have read more carefully.
>>
>> Sorry for the noise.
>
> This is not a noise, though.
>
> Chris, how would we want to proceed?  I'd prefer at some point to
> see cvsimport-3 to be in sync when the one patched and tested in
> Eric's repository is proven enough.  Will Eric be the gatekeeper, or
> will you be sending patches this way as well?

I probably won't be sending any more patches on this.  My hope was to
get cvsimport-3 (w/ cvsps as the engine) in a state such that one
could transition from the previous version seamlessly.  But the break
in t9605 has convinced me this is not worth the effort--even in this
trivial case cvsps is broken.  The fuzzing logic aggregates commits
into patch sets that have timestamps within a specified window and
otherwise matching attributes.  This aggregation causes file-level
commit timestamps to be lost and we are left with a single timestamp
for the patch set: the minimum for all contained CVS commits.  When
all commits have been processed, the patch sets are ordered
chronologically and printed.

The problem is that is that a CVS commit is rolled into a patch set
regardless of whether the patch set's timestamp falls within the
adjacent CVS file-level commits.  Even worse, since the patch set
timestamp changes as subsequent commits are added (i.e., it's always
picking the earliest) it is potentially indeterminate at the time a
commit is added.  The result is that file revisions can be reordered
in resulting Git import (see t9605.)  I spent some time last week
trying to solve this but I coudln't think of anything that wasn't a
substantial re-work of the code.

I have never used cvs2git, but I suspect Eric's efforts in making it a
potential backend for cvsimport are a better use of time.

Chris

^ permalink raw reply

* Aw: Re: [PATCH 1/2] Change old system name 'GIT' to 'Git'
From: Thomas Ackermann @ 2013-01-20 20:16 UTC (permalink / raw)
  To: gitster, davvid; +Cc: th.acker, git

> 
> If I were to decide today to change the spellings, with an explicit
> purpose of making things more consistent across documentation, it
> may make sense to use even a simpler rule that is less error-prone
> for people who write new sentences that has to have the word.  How
> about treating it just like any other ordinary word?  That is, we
> say "git" (without double-quotes, of course), unless it comes at the
> beginning of a sentence?
> 

The widely used books on Git by Scott Chacon or Jon Loeliger (and
many others) are using 'Git' instead of 'git' when talking about the 
whole system. So IMHO it would not be wise to change our internal 
documentation from using 'GIT'/'Git' to using 'git'. The internal 
documentation should be a natural continuation of these books 
by content and style.

- Just my thoughts.


---
Thomas

^ permalink raw reply

* Re: git interactive rebase 'consume' command
From: Junio C Hamano @ 2013-01-20 20:23 UTC (permalink / raw)
  To: Stephen Kelly; +Cc: git
In-Reply-To: <kdhfk6$von$1@ger.gmane.org>

Stephen Kelly <steveire@gmail.com> writes:

> Junio C Hamano wrote:
>> Sorry, but I do not understand what you are trying to solve.
>> 
>> How can 1313a5e, which fixes misakes made in c2f62a3, come before
>> that commit in the first place?
>
> One scenario is something like this:
>
>  Start with a clean HEAD (always a good idea :) )
>  hack hack hack
>  make multiple commits
>  realize that a hunk you committed in an early patch belongs in a later one.
>  use git rebase -i to fix it.
>
> Is that more clear?

Not really.

If you think that the author timestamp is the time the author
finished working on the commit, shouldn't the squashed result get
the timestamp when you finished squashing, not the timestamp of
either of the commits that were squashed?  Unlike "fixup" and
"reword", the change you are making is very different from any of
the original constituent commmits, and you finished working on that
change when you squashed these commits into one.  Propagating the
timestamp from the later ones sounds equally wrong for that purpose.

In any case, the intent of the author timestamp is to record the
time the author _started_ working on the change and came up with an
initial, possibly a partial, draft.  It does not record the time
when the commit was finalized.  "git commit --amend" preserves the
original timestamp, doesn't it?

In your example:

>  pick 07bc3c9 Good commit.
>  pick 1313a5e Commit to fixup into c2f62a3.
>  pick c2f62a3 Another commit.

you can view 1313a5e as a "preparatory clean-up for the real change
in c2f62a3", which could be a separate commit in the final history.
If you choose to squash them together into one, the time you
recorded 1313a5e was when you started working on the combined
change, so it does not sound so wrong to take that author timestamp
for the result.

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox