threads / patch / 43193

patchmake git-push a bit more verbose

Subject: [PATCH] make git-push a bit more verbose

## tl;dr

4 messages between Oct 31, 2006 and Nov 1, 2006. Diffs are folded; open one to read it.

replies: 3people: 4as markdown or json

Nicolas Pitre· Oct 31, 2006, 21:58 UTC · lore

Currently git-push displays progress status for the local packing of objects to send, but nothing once it starts to push it over the connection. Having progress status in that later case is especially nice when pushing lots of objects over a slow network link.

Signed-off-by: Nicolas Pitre <nico@cam.org>
---
Show changes to 2 files +10 −4

builtin-pack-objects.c, send-pack.c

diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c
index 41e1e74..5f56a95 100644
--- a/builtin-pack-objects.c
+++ b/builtin-pack-objects.c
@@ -475,11 +475,12 @@ static void write_pack_file(void)
 	unsigned long offset;
 	struct pack_header hdr;
 	unsigned last_percent = 999;
-	int do_progress = 0;
+	int do_progress;
 
-	if (!base_name)
+	if (!base_name) {
 		f = sha1fd(1, "<stdout>");
-	else {
+		do_progress = progress >> 1;
+	} else {
 		f = sha1create("%s-%s.%s", base_name,
 			       sha1_to_hex(object_list_sha1), "pack");
 		do_progress = progress;
@@ -1524,6 +1525,10 @@ int cmd_pack_objects(int argc, const cha
 			progress = 1;
 			continue;
 		}
+		if (!strcmp("--all-progress", arg)) {
+			progress = 2;
+			continue;
+		}
 		if (!strcmp("--incremental", arg)) {
 			incremental = 1;
 			continue;
@@ -1641,7 +1646,7 @@ int cmd_pack_objects(int argc, const cha
 	else {
 		if (nr_result)
 			prepare_pack(window, depth);
-		if (progress && pack_to_stdout) {
+		if (progress == 1 && pack_to_stdout) {
 			/* the other end usually displays progress itself */
 			struct itimerval v = {{0,},};
 			setitimer(ITIMER_REAL, &v, NULL);
diff --git a/send-pack.c b/send-pack.c
index fbd792c..4476666 100644
--- a/send-pack.c
+++ b/send-pack.c
@@ -29,6 +29,7 @@ static void exec_pack_objects(void)
 {
 	static const char *args[] = {
 		"pack-objects",
+		"--all-progress",
 		"--stdout",
 		NULL
Jakub Narebski· Oct 31, 2006, 22:13 UTC · re: Nicolas Pitre · lore

Re: [PATCH] make git-push a bit more verbose

Nicolas Pitre wrote:
> Currently git-push displays progress status for the local packing of 
> objects to send, but nothing once it starts to push it over the 
> connection.  Having progress status in that later case is especially 
> nice when pushing lots of objects over a slow network link.
Thanks a lot!
-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
Petr Baudis· Nov 1, 2006, 00:08 UTC · re: Nicolas Pitre · lore

Re: [PATCH] make git-push a bit more verbose

Dear diary, on Tue, Oct 31, 2006 at 10:58:32PM CET, I got a letter where Nicolas Pitre <nico@cam.org> said that...

Show 6 quoted lines
> Currently git-push displays progress status for the local packing of 
> objects to send, but nothing once it starts to push it over the 
> connection.  Having progress status in that later case is especially 
> nice when pushing lots of objects over a slow network link.
> 
> Signed-off-by: Nicolas Pitre <nico@cam.org>
Yet Another Undocumented Feature? :-(
-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
#!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj
$/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1

← back to recent threads