# [PATCH] make git-push a bit more verbose

4 messages from 2006-10-31 to 2006-11-01. Participants: Nicolas Pitre, Petr Baudis, Jakub Narebski, Junio C Hamano.
Thread: https://gitlist.dev/t/43193

## Nicolas Pitre, 2006-10-31 21:58

Subject: [PATCH] make git-push a bit more verbose
Message-ID: <Pine.LNX.4.64.0610311648220.11384@xanadu.home>
URL: https://gitlist.dev/e/Pine.LNX.4.64.0610311648220.11384%40xanadu.home

```
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>

---

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, 2006-10-31 22:13

Subject: Re: [PATCH] make git-push a bit more verbose
Message-ID: <ei8hpd$inu$1@sea.gmane.org>
URL: https://gitlist.dev/e/ei8hpd%24inu%241%40sea.gmane.org
In-Reply-To: <Pine.LNX.4.64.0610311648220.11384@xanadu.home>

```
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


```

## Junio C Hamano, 2006-10-31 23:52

Subject: Re: [PATCH] make git-push a bit more verbose
Message-ID: <7vslh4oxfx.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7vslh4oxfx.fsf%40assigned-by-dhcp.cox.net
In-Reply-To: <Pine.LNX.4.64.0610311648220.11384@xanadu.home>

```
Thanks.  Will apply.

```

## Petr Baudis, 2006-11-01 00:08

Subject: Re: [PATCH] make git-push a bit more verbose
Message-ID: <20061101000840.GE20017@pasky.or.cz>
URL: https://gitlist.dev/e/20061101000840.GE20017%40pasky.or.cz
In-Reply-To: <Pine.LNX.4.64.0610311648220.11384@xanadu.home>

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

```
