Re: [PATCH v2] Fix fetch/pull when run without --update-head-ok

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Johannes Schindelin
Date: Monday, October 13, 2008 - 11:12 am

Hi,

thanks for doing the due diligence that I should have done (but I ran out 
of time).

On Mon, 13 Oct 2008, Junio C Hamano wrote:


This really wants to make sure that no objects are shared or hard-linked 
between the repository in "trash directory/" and the one in its 
subdirectory "another/".  It predates "test_must_fail", too, it seems.

It never touches the working directory "another/", so using 
--update-head-ok is okay.


This tests "git remote add"'s --mirror option.

It never touches the working directory either.


This test is actually not fixed, but contains two test cases for the issue 
the commit fixes.


This creates an empty repository for tests to fast-import, and fetches 
into the current (not yet existing) branch.

I actually understand now why the tests started failing: the change from 
resolve_ref() to get_branch() as requested by Daniel are at fault: 
get_branch() does not check if the branch has an initial commit.

I am actually regretting making this change.  Daniel, do you agree that it 
might be better to change back to resolve_ref(), so that the initial 
complaint (IIRC Han-Wen git pull'ed into a freshly initialized repository 
with that utterly bogus "git pull origin master:master" line) is not 
re-raised?


The only test that would need fixing after reverting back to resolve_ref() 
would be the "remote add --mirror" thing, which I think should be fine.

Ciao,
Dscho

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] fetch: refuse to fetch into the current branch in ..., Johannes Schindelin, (Sat Oct 11, 4:38 am)
Re: [PATCH] fetch: refuse to fetch into the current branch ..., Johannes Schindelin, (Mon Oct 13, 2:28 am)
[PATCH v2] Fix fetch/pull when run without --update-head-ok, Johannes Schindelin, (Mon Oct 13, 2:36 am)
Re: [PATCH v2] Fix fetch/pull when run without --update-he ..., Johannes Schindelin, (Mon Oct 13, 10:57 am)
Re: [PATCH v2] Fix fetch/pull when run without --update-he ..., Johannes Schindelin, (Mon Oct 13, 11:12 am)
Re: [PATCH v2] Fix fetch/pull when run without --update-he ..., Johannes Schindelin, (Tue Oct 14, 2:49 am)
Re: [PATCH v2] Fix fetch/pull when run without --update-he ..., Johannes Schindelin, (Tue Oct 14, 9:15 am)
Re: [PATCH v2] Fix fetch/pull when run without --update-he ..., Johannes Schindelin, (Tue Oct 14, 9:17 am)