git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Add ALL_LDFLAGS to the git target.

From
Junio C Hamano <junkio@cox.net>
Date
Mar 28, 2006, 06:21 UTC
Message-ID
<7vu09jks1u.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<13360.1143515503@lotus.CS.Berkeley.EDU>
Jason Riedy <ejr@EECS.Berkeley.EDU> writes:
Show 6 quoted lines
> And Junio C Hamano writes:
>  - I wonder what the dependency is, since ALL_LDFLAGS is not
>  - modified on AIX, [...]
>
> Specifically, -lcrypto.  Mine is in a funny place, so I need
> LDFLAGS passed in.
Thanks.  That is the right fix, then.
Show 11 quoted lines
>  - > Once it builds, only one test "fails" on AIX 5.1 with 
>  - > 1.3.0.rc1, t5500-fetch-pack.sh, but it looks like it's some
>  - > odd tool problem in the tester + my setup and not a real bug.
>  - 
>  - Curious and would appreciate more details.
>
> I just found it.  The progress meter stuff in pack-objects
> splats all over the output.  So trash/client/log.txt is
> completely mangled.  Everything functions correctly, but
> the textual output is garbage.  If I set progress to 0 in 
> pack-objects.c, everthing's happy.

Hmph. We do fprintf(stderr, "blah\r") to draw them. The standard says that "standard error stream is not fully buffered", but I guess it does not necessarily mean it is unbuffered, so we probably need to fflush(3) there. Would something like this help?

-- >8 --
diff --git a/fetch-clone.c b/fetch-clone.c
index da1b3ff..252e5ec 100644
--- a/fetch-clone.c
+++ b/fetch-clone.c
@@ -230,6 +230,7 @@
 					total >> 20,
 					1000*((total >> 10) & 1023)>>10,
 					avg_bytes / avg_time );
+				fflush(stderr);
 			}
 		}
 	}
diff --git a/imap-send.c b/imap-send.c
index e33c78b..dcfa8d8 100644
--- a/imap-send.c
+++ b/imap-send.c
@@ -1345,6 +1345,7 @@
 	while (1) {
 		unsigned percent = n * 100 / total;
 		fprintf( stderr, "%4u%% (%d/%d) done\r", percent, n, total );
+		fflush(stderr);
 		if (!split_msg( &all_msgs, &msg, &ofs ))
 			break;
 		r = imap_store_msg( ctx, &msg, &uid );
diff --git a/pack-objects.c b/pack-objects.c
index 49357c6..7c85348 100644
--- a/pack-objects.c
+++ b/pack-objects.c
@@ -360,6 +360,7 @@
 			if (progress_update || percent != last_percent) {
 				fprintf(stderr, "%4u%% (%u/%u) done\r",
 					percent, written, nr_result);
+				fflush(stderr);
 				progress_update = 0;
 				last_percent = percent;
 			}
@@ -570,6 +571,7 @@
  already_added:
 	if (progress_update) {
 		fprintf(stderr, "Counting objects...%d\r", nr_objects);
+		fflush(stderr);
 		progress_update = 0;
 	}
 	if (exclude)
@@ -912,6 +914,7 @@
 			if (percent != last_percent || progress_update) {
 				fprintf(stderr, "%4u%% (%u/%u) done\r",
 					percent, processed, nr_result);
+				fflush(stderr);
 				progress_update = 0;
 				last_percent = percent;
 			}
diff --git a/read-tree.c b/read-tree.c
index eaff444..6a2aa16 100644
--- a/read-tree.c
+++ b/read-tree.c
@@ -325,6 +325,7 @@
 				    progress_update) {
 					fprintf(stderr, "%4u%% (%u/%u) done\r",
 						percent, cnt, total);
+					fflush(stderr);
 					last_percent = percent;
 				}
 			}
diff --git a/unpack-objects.c b/unpack-objects.c
index 815a1b3..8596f9b 100644
--- a/unpack-objects.c
+++ b/unpack-objects.c
@@ -220,6 +220,7 @@
 			last_sec = now.tv_sec;
 			last_percent = percentage;
 			fprintf(stderr, "%4u%% (%u/%u) done\r", percentage, nr, total);
+			fflush(stderr);
 		}
 	}
 	switch (type) {
Previous: Jason RiedyNext: Jason Riedy
Message 5 of 33 in “What's in git.git”
  1. Junio C HamanoMar 28, 2006
  2. Add ALL_LDFLAGS to the git target.Jason Riedy, Mar 28, 2006
  3. Junio C HamanoMar 28, 2006
  4. Jason RiedyMar 28, 2006
  5. Junio C HamanoMar 28, 2006
  6. Jason RiedyMar 28, 2006
  7. Mark WoodingMar 28, 2006
  8. Linus TorvaldsMar 28, 2006
  9. Junio C HamanoMar 28, 2006
  10. Jason RiedyMar 28, 2006
  11. Junio C HamanoMar 29, 2006
  12. Mark WoodingMar 28, 2006
  13. Support for pickaxe matching regular expressionsPetr Baudis, Mar 29, 2006
  14. Johannes SchindelinMar 29, 2006
  15. Petr BaudisMar 29, 2006
  16. Gitk strangeness..Linus Torvalds, Mar 28, 2006
  17. Junio C HamanoMar 28, 2006
  18. Paul MackerrasMar 28, 2006
  19. Linus TorvaldsMar 28, 2006
  20. Junio C HamanoMar 28, 2006
  21. Paul MackerrasMar 28, 2006
  22. Junio C HamanoMar 28, 2006
  23. Paul MackerrasMar 28, 2006
  24. Junio C HamanoMar 28, 2006
  25. Paul MackerrasMar 28, 2006
  26. Junio C HamanoMar 29, 2006
  27. Junio C HamanoMar 29, 2006
  28. Alex RiesenMar 30, 2006
  29. Paul MackerrasMar 30, 2006
  30. Paul MackerrasMar 30, 2006
  31. Junio C HamanoMar 31, 2006
  32. Alex RiesenMar 31, 2006
  33. Linus TorvaldsMar 28, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.