Skip to contentSkip to conversation

Allow http authentication via prompt for http push.

PATCH In review Amos King 3 participants 7 messages Jun 15, 2016

lore
Share & tools
lore

Amos King

author
#0 lore raw

PATCH 2/2 Allow http authentication via prompt for http push.

There is now a faux remote created in order to
be passed to http_init.

---
 http-push.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)
http-push.c +10 -1
index 9ac2664..468d5af 100644
@@ -2195,7 +2195,16 @@ int main(int argc, char **argv)
 
 	memset(remote_dir_exists, -1, 256);
 
-	http_init(NULL);
+	/*
+	 * This is a faked remote so that http_init can
+	 * get the correct data for builidng out athorization.
+	 */
+	struct remote *remote;
+	remote = xcalloc(sizeof(*remote), 1);
+	ALLOC_GROW(remote->url, remote->url_nr + 1, remote->url_alloc);
+	remote->url[remote->url_nr++] = repo->url;
+
+	http_init(remote);
 
 	no_pragma_header = curl_slist_append(no_pragma_header, "Pragma:");
 
Signature · 1 line
1.6.2.GIT
#1 lore raw

Hi,

Quoted 13 lines · Amos King

There is now a faux remote created in order to
be passed to http_init.

---
 http-push.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)
http-push.c +0 -0
index 9ac2664..468d5af 100644

http-push.c int main(int argc, char **argv) · line 2201

Quoted 8 lines
http-push.c +4 -1
@@ -2195,7 +2195,16 @@ int main(int argc, char **argv)
 
 	memset(remote_dir_exists, -1, 256);
 
-	http_init(NULL);
+	/*
+	 * This is a faked remote so that http_init can
+	 * get the correct data for builidng out athorization.
+	 */

You might want to pass this through aspell ;-) Altough it will not suggest 'out ->our', I guess...

http-push.c int main(int argc, char **argv) · line 2207

Quoted 6 lines
http-push.c +6 -0
+	struct remote *remote;
+	remote = xcalloc(sizeof(*remote), 1);
+	ALLOC_GROW(remote->url, remote->url_nr + 1, remote->url_alloc);
+	remote->url[remote->url_nr++] = repo->url;
+
+	http_init(remote);

Would 'fake' not be a more appropriate name than 'remote'?

That would also make the patch 1/2 rather unnecessary (I also have to admit that I do not find 'repo' a better name, as we have a repository both locally and remotely, and this _is_ the remote repository, not the local one).

Ciao,
Dscho

author
#2 lore raw

The issue with calling it remote is that it conflicts with the remote struct that is need for http_init, and is used in the rest of the code. So do you want me to make this small impact change or a larger and more broad sweeping change by changing the name of the other remote. I don't believe fake is a better name. I would hope that at some point the 'repo' struct would go away and we can make http_push work like all the other remote commands.

I also believe that 'out' is the correct word. It was not a typo, and I appreciate your suggestion of assuming that I can't spell just because I used a word that you didn't understand. I'm not building OUR authorization. I am building OUT authorization. Have you heard of building something out? Or even fleshing something out?

I appreciated your first responses to my other patch. Even if your tone was that of a person with low self-esteem who needs to pick unimportant details apart in order to stroke their own ego. Instead of responding in the same tone I thought I would respond nicely and get your feedback. Responses like your first one don't cause people to want to continue to contribute to the community.

I have a great idea. Why don't you try using the 'nice' tense in your next email instead of the high and mighty 'ass-hole' tense. Then I will gladly not use past tense in my commit messages, and others might respond more positively to your criticisms.

Fiek Dich,
Amos

Quoted 47 lines · Johannes Schindelin

Hi,

Quoted 13 lines · Amos King

There is now a faux remote created in order to
be passed to http_init.

---
 http-push.c |   11 ++++++++++-

 1 files changed, 10 insertions(+), 1 deletions(-)
http-push.c +0 -0
index 9ac2664..468d5af 100644

http-push.c int main(int argc, char **argv) · line 2201

Quoted 8 lines
http-push.c +4 -1
@@ -2195,7 +2195,16 @@ int main(int argc, char **argv)
 
       memset(remote_dir_exists, -1, 256);
 
-     http_init(NULL);
+     /*
+      * This is a faked remote so that http_init can
+      * get the correct data for builidng out athorization.
+      */

You might want to pass this through aspell ;-)  Altough it will not suggest 'out ->our', I guess...

http-push.c int main(int argc, char **argv) · line 2207

Quoted 6 lines
http-push.c +6 -0
+     struct remote *remote;
+     remote = xcalloc(sizeof(*remote), 1);
+     ALLOC_GROW(remote->url, remote->url_nr + 1, remote->url_alloc);
+     remote->url[remote->url_nr++] = repo->url;
+
+     http_init(remote);

Would 'fake' not be a more appropriate name than 'remote'?

That would also make the patch 1/2 rather unnecessary (I also have to admit that I do not find 'repo' a better name, as we have a repository both locally and remotely, and this _is_ the remote repository, not the local one).

Ciao,
Dscho

Signature · 5 lines
Amos King
http://dirtyInformation.com
http://github.com/Adkron
--
Looking for something to do? Visit http://ImThere.com
author
#6 lore raw
In reply to Johannes Schindelin

Sorry for the way I responded. It was not very appropriate of me. I do think that if you would take a little tact in your approach that you would keep developers trying to improve the code they are putting into git, and trying to contribute more often.

Amos

Quoted 47 lines · Johannes Schindelin

Hi,

Quoted 13 lines · Amos King

There is now a faux remote created in order to
be passed to http_init.

---
 http-push.c |   11 ++++++++++-

 1 files changed, 10 insertions(+), 1 deletions(-)
http-push.c +0 -0
index 9ac2664..468d5af 100644

http-push.c int main(int argc, char **argv) · line 2201

Quoted 8 lines
http-push.c +4 -1
@@ -2195,7 +2195,16 @@ int main(int argc, char **argv)
 
       memset(remote_dir_exists, -1, 256);
 
-     http_init(NULL);
+     /*
+      * This is a faked remote so that http_init can
+      * get the correct data for builidng out athorization.
+      */

You might want to pass this through aspell ;-)  Altough it will not suggest 'out ->our', I guess...

http-push.c int main(int argc, char **argv) · line 2207

Quoted 6 lines
http-push.c +6 -0
+     struct remote *remote;
+     remote = xcalloc(sizeof(*remote), 1);
+     ALLOC_GROW(remote->url, remote->url_nr + 1, remote->url_alloc);
+     remote->url[remote->url_nr++] = repo->url;
+
+     http_init(remote);

Would 'fake' not be a more appropriate name than 'remote'?

That would also make the patch 1/2 rather unnecessary (I also have to admit that I do not find 'repo' a better name, as we have a repository both locally and remotely, and this _is_ the remote repository, not the local one).

Ciao,
Dscho

Signature · 5 lines
Amos King
http://dirtyInformation.com
http://github.com/Adkron
--
Looking for something to do? Visit http://ImThere.com
#3 lore raw
In reply to Amos King

Amos King venit, vidit, dixit 19.03.2009 20:02:

Quoted 21 lines

The issue with calling it remote is that it conflicts with the remote struct that is need for http_init, and is used in the rest of the code. So do you want me to make this small impact change or a larger and more broad sweeping change by changing the name of the other remote. I don't believe fake is a better name. I would hope that at some point the 'repo' struct would go away and we can make http_push work like all the other remote commands.

I also believe that 'out' is the correct word. It was not a typo, and I appreciate your suggestion of assuming that I can't spell just because I used a word that you didn't understand. I'm not building OUR authorization. I am building OUT authorization. Have you heard of building something out? Or even fleshing something out?

I appreciated your first responses to my other patch. Even if your tone was that of a person with low self-esteem who needs to pick unimportant details apart in order to stroke their own ego. Instead of responding in the same tone I thought I would respond nicely and get your feedback. Responses like your first one don't cause people to want to continue to contribute to the community.

Quoted 7 lines

I have a great idea. Why don't you try using the 'nice' tense in your next email instead of the high and mighty 'ass-hole' tense. Then I will gladly not use past tense in my commit messages, and others might respond more positively to your criticisms.

Fiek Dich,
Amos

We don't want these obscenities on this list, whether in plain English or wrong German!

In fact, Dscho's criticism was not only constructive but nice, and not only by his standards.

You managed to have at least 2 (3 by our count) typos in one line, and Dscho pointed that out correctly and nicely.

Your second response (which I saw just before hitting send) doesn't show much new insight regarding the latter two points. I'll consider the first one dealt with by it.

Michael

Quoted 52 lines
Quoted 47 lines · Johannes Schindelin

Hi,

Quoted 13 lines · Amos King

There is now a faux remote created in order to
be passed to http_init.

---
 http-push.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)
http-push.c +0 -0
index 9ac2664..468d5af 100644

http-push.c int main(int argc, char **argv) · line 2201

Quoted 8 lines
http-push.c +4 -1
@@ -2195,7 +2195,16 @@ int main(int argc, char **argv)
 
      memset(remote_dir_exists, -1, 256);
 
-     http_init(NULL);
+     /*
+      * This is a faked remote so that http_init can
+      * get the correct data for builidng out athorization.
+      */

You might want to pass this through aspell ;-) Altough it will not suggest 'out ->our', I guess...

http-push.c int main(int argc, char **argv) · line 2207

Quoted 6 lines
http-push.c +6 -0
+     struct remote *remote;
+     remote = xcalloc(sizeof(*remote), 1);
+     ALLOC_GROW(remote->url, remote->url_nr + 1, remote->url_alloc);
+     remote->url[remote->url_nr++] = repo->url;
+
+     http_init(remote);

Would 'fake' not be a more appropriate name than 'remote'?

That would also make the patch 1/2 rather unnecessary (I also have to admit that I do not find 'repo' a better name, as we have a repository both locally and remotely, and this _is_ the remote repository, not the local one).

Ciao,
Dscho

author
#4 lore raw

Where are the typos and I will fix them?

As far as my response, I will only apologize for my choice of words and not my message. Being rude does not encourage developers to continue to try to improve git. Almost every time I see Dscho respond he says something about the little precious time he has, but doesn't seem to respect the fact that other people are taking their precious free time to prepare and submit the patches. Continue with rude comments and you will lose great developer after great developer.

Again I am sorry for the words I chose, and it was uncalled for. Before anyone responded to my email I sent this to Dscho:

Quoted 4 lines

Sorry for the way I responded. It was not very appropriate of me. I do think that if you would take a little tact in your approach that you would keep developers trying to improve the code they are putting into git, and trying to contribute more often.

Amos

Quoted 99 lines · Michael J Gruber

Amos King venit, vidit, dixit 19.03.2009 20:02:

Quoted 21 lines

The issue with calling it remote is that it conflicts with the remote struct that is need for http_init, and is used in the rest of the code.  So do you want me to make this small impact change or a larger and more broad sweeping change by changing the name of the other remote.  I don't believe fake is a better name.  I would hope that at some point the 'repo' struct would go away and we can make http_push work like all the other remote commands.

I also believe that 'out' is the correct word.  It was not a typo, and I appreciate your suggestion of assuming that I can't spell just because I used a word that you didn't understand.  I'm not building OUR authorization.  I am building OUT authorization.  Have you heard of building something out?  Or even fleshing something out?

I appreciated your first responses to my other patch.  Even if your tone was that of a person with low self-esteem who needs to pick unimportant details apart in order to stroke their own ego.  Instead of responding in the same tone I thought I would respond nicely and get your feedback.  Responses like your first one don't cause people to want to continue to contribute to the community.

Quoted 7 lines

I have a great idea.  Why don't you try using the 'nice' tense in your next email instead of the high and mighty 'ass-hole' tense.  Then I will gladly not use past tense in my commit messages, and others might respond more positively to your criticisms.

Fiek Dich,
Amos

We don't want these obscenities on this list, whether in plain English or wrong German!

In fact, Dscho's criticism was not only constructive but nice, and not only by his standards.

You managed to have at least 2 (3 by our count) typos in one line, and Dscho pointed that out correctly and nicely.

Your second response (which I saw just before hitting send) doesn't show much new insight regarding the latter two points. I'll consider the first one dealt with by it.

Michael

Quoted 52 lines
Quoted 47 lines · Johannes Schindelin

Hi,

Quoted 13 lines · Amos King

There is now a faux remote created in order to
be passed to http_init.

---
 http-push.c |   11 ++++++++++-

 1 files changed, 10 insertions(+), 1 deletions(-)
http-push.c +0 -0
index 9ac2664..468d5af 100644

http-push.c int main(int argc, char **argv) · line 2201

Quoted 8 lines
http-push.c +4 -1
@@ -2195,7 +2195,16 @@ int main(int argc, char **argv)
 
       memset(remote_dir_exists, -1, 256);
 
-     http_init(NULL);
+     /*
+      * This is a faked remote so that http_init can
+      * get the correct data for builidng out athorization.
+      */

You might want to pass this through aspell ;-)  Altough it will not suggest 'out ->our', I guess...

http-push.c int main(int argc, char **argv) · line 2207

Quoted 6 lines
http-push.c +6 -0
+     struct remote *remote;
+     remote = xcalloc(sizeof(*remote), 1);
+     ALLOC_GROW(remote->url, remote->url_nr + 1, remote->url_alloc);
+     remote->url[remote->url_nr++] = repo->url;
+
+     http_init(remote);

Would 'fake' not be a more appropriate name than 'remote'?

That would also make the patch 1/2 rather unnecessary (I also have to admit that I do not find 'repo' a better name, as we have a repository both locally and remotely, and this _is_ the remote repository, not the local one).

Ciao,
Dscho

Signature · 5 lines
Amos King
http://dirtyInformation.com
http://github.com/Adkron
--
Looking for something to do? Visit http://ImThere.com
#5 lore raw

Amos King venit, vidit, dixit 20.03.2009 13:38:

Quoted 1 line

Where are the typos and I will fix them?

I'll respond to this only, everything else has been said already.

Quoted 2 lines

There is now a faux remote created in order to
be passed to http_init.

...

http-push.c int main(int argc, char **argv) · line 2200

Quoted 2 lines
http-push.c +2 -0
+	 * This is a faked remote so that http_init can
+	 * get the correct data for builidng out athorization.

Obviously:

"builidng" -> "building"
"athorization" -> "authorization"

Up for discussion:

"out" -> "our"/"up"/""
"build out" isn't that common and doesn't seem to apply here: In order to build something out that something must exist already. You can build up something from the ground.

"faux" -> "fake"
"faked" -> "fake"

Both changes go for a more common, simplified wording. It's only a comment, though. No one would have cared about those.

Michael