Re: [PATCH 04/16] t/t5505-remote: remove dependency on $origin_url

2013-06-23 Thread Ramkumar Ramachandra
Junio C Hamano wrote:
 I do not think you are creating a quux repository to be pushed into
 and fetched from with this change. Placing 'quux' in the URL: field
 feels a lot more misleading to me.  What am I missing?

Dropped.

I'll send in a re-roll based on what you put up on pu.
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 04/16] t/t5505-remote: remove dependency on $origin_url

2013-06-22 Thread Ramkumar Ramachandra
Junio C Hamano wrote:
 Is there a reason why quux is better than another randomly chosen
 string $(pwd)/one?

$(pwd)/one is not randomly chosen: that configuration will work with
push/pull, and is therefore misleading.  I put in a deliberately bogus
value because I wanted to make it clear that we're only testing
anything config-parsing.
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 04/16] t/t5505-remote: remove dependency on $origin_url

2013-06-22 Thread Junio C Hamano
Ramkumar Ramachandra artag...@gmail.com writes:

 Junio C Hamano wrote:
 Is there a reason why quux is better than another randomly chosen
 string $(pwd)/one?

 $(pwd)/one is not randomly chosen: that configuration will work with
 push/pull, and is therefore misleading.

But isn't the URL: field in remotes file meant to be usable with
push and pull?  Why is it misleading to put a value that is more
plausible (I believe 'one' in the current directory is another
repository and the intent is that the old .git/remotes/origin setup
lets you fetch from and push to that repository) there?

I do not think you are creating a quux repository to be pushed into
and fetched from with this change. Placing 'quux' in the URL: field
feels a lot more misleading to me.  What am I missing?
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 04/16] t/t5505-remote: remove dependency on $origin_url

2013-06-21 Thread Ramkumar Ramachandra
In the tests migrate a remote from named file in
$GIT_DIR/{remotes,branches}, we are only checking that a configuration
is migrated successfully; it has no correspondence with whether or not
those values do something sensible with other git
operations (fetch/push).  Therefore, there is no need to determine
$origin_url: just substitute it with the constant value quux.

Signed-off-by: Ramkumar Ramachandra artag...@gmail.com
---
 t/t5505-remote.sh | 9 -
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/t/t5505-remote.sh b/t/t5505-remote.sh
index dcb6c2f..fd0a81e 100755
--- a/t/t5505-remote.sh
+++ b/t/t5505-remote.sh
@@ -669,21 +669,20 @@ test_expect_success 'rename a remote with name prefix of 
other remote' '
 '
 
 cat  remotes_origin  EOF
-URL: $(pwd)/one
+URL: quux
 Push: refs/heads/master:refs/heads/upstream
 Pull: refs/heads/master:refs/heads/origin
 EOF
 
 test_expect_success 'migrate a remote from named file in $GIT_DIR/remotes' '
git clone one five 
-   origin_url=$(pwd)/one 
(cd five 
 git remote remove origin 
 mkdir -p .git/remotes 
 cat ../remotes_origin  .git/remotes/origin 
 git remote rename origin origin 
 test_path_is_missing .git/remotes/origin 
-test $(git config remote.origin.url) = $origin_url 
+test $(git config remote.origin.url) = quux 
 test $(git config remote.origin.push) = 
refs/heads/master:refs/heads/upstream 
 test $(git config remote.origin.fetch) = 
refs/heads/master:refs/heads/origin)
 '
@@ -694,10 +693,10 @@ test_expect_success 'migrate a remote from named file in 
$GIT_DIR/branches' '
(
cd six 
git remote rm origin 
-   echo $origin_url  .git/branches/origin 
+   echo quux  .git/branches/origin 
git remote rename origin origin 
test_path_is_missing .git/branches/origin 
-   test $(git config remote.origin.url) = $origin_url 
+   test $(git config remote.origin.url) = quux 
test $(git config remote.origin.fetch) = 
refs/heads/master:refs/heads/origin 
test $(git config remote.origin.push) = 
HEAD:refs/heads/master
)
-- 
1.8.3.1.499.g7ad3486.dirty

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 04/16] t/t5505-remote: remove dependency on $origin_url

2013-06-21 Thread Junio C Hamano
Ramkumar Ramachandra artag...@gmail.com writes:

 In the tests migrate a remote from named file in
 $GIT_DIR/{remotes,branches}, we are only checking that a configuration
 is migrated successfully; it has no correspondence with whether or not
 those values do something sensible with other git
 operations (fetch/push).  Therefore, there is no need to determine
 $origin_url: just substitute it with the constant value quux.

Is there a reason why quux is better than another randomly chosen
string $(pwd)/one?




 Signed-off-by: Ramkumar Ramachandra artag...@gmail.com
 ---
  t/t5505-remote.sh | 9 -
  1 file changed, 4 insertions(+), 5 deletions(-)

 diff --git a/t/t5505-remote.sh b/t/t5505-remote.sh
 index dcb6c2f..fd0a81e 100755
 --- a/t/t5505-remote.sh
 +++ b/t/t5505-remote.sh
 @@ -669,21 +669,20 @@ test_expect_success 'rename a remote with name prefix 
 of other remote' '
  '
  
  cat  remotes_origin  EOF
 -URL: $(pwd)/one
 +URL: quux
  Push: refs/heads/master:refs/heads/upstream
  Pull: refs/heads/master:refs/heads/origin
  EOF
  
  test_expect_success 'migrate a remote from named file in $GIT_DIR/remotes' '
   git clone one five 
 - origin_url=$(pwd)/one 
   (cd five 
git remote remove origin 
mkdir -p .git/remotes 
cat ../remotes_origin  .git/remotes/origin 
git remote rename origin origin 
test_path_is_missing .git/remotes/origin 
 -  test $(git config remote.origin.url) = $origin_url 
 +  test $(git config remote.origin.url) = quux 
test $(git config remote.origin.push) = 
 refs/heads/master:refs/heads/upstream 
test $(git config remote.origin.fetch) = 
 refs/heads/master:refs/heads/origin)
  '
 @@ -694,10 +693,10 @@ test_expect_success 'migrate a remote from named file 
 in $GIT_DIR/branches' '
   (
   cd six 
   git remote rm origin 
 - echo $origin_url  .git/branches/origin 
 + echo quux  .git/branches/origin 
   git remote rename origin origin 
   test_path_is_missing .git/branches/origin 
 - test $(git config remote.origin.url) = $origin_url 
 + test $(git config remote.origin.url) = quux 
   test $(git config remote.origin.fetch) = 
 refs/heads/master:refs/heads/origin 
   test $(git config remote.origin.push) = 
 HEAD:refs/heads/master
   )
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html