* Re: What's cooking in git.git (Sep 2011, #06; Wed, 21)
2011-09-22 5:04 What's cooking in git.git (Sep 2011, #06; Wed, 21) Junio C Hamano
@ 2011-09-22 8:37 ` Carlos Martín Nieto
2011-09-22 9:14 ` Michael Schubert
2011-09-22 23:01 ` Jakub Narebski
` (5 subsequent siblings)
6 siblings, 1 reply; 19+ messages in thread
From: Carlos Martín Nieto @ 2011-09-22 8:37 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
[-- Attachment #1: Type: text/plain, Size: 328 bytes --]
On Wed, 2011-09-21 at 22:04 -0700, Junio C Hamano wrote:
> * cn/eradicate-working-copy (2011-09-21) 2 commits
> - patch-id.c: use strbuf instead of a fixed buffer
> - Remove 'working copy' from the documentation and C code
It looks like that first commit sneaked in there. Shouldn't that be its
own topic?
cmn
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: What's cooking in git.git (Sep 2011, #06; Wed, 21)
2011-09-22 8:37 ` Carlos Martín Nieto
@ 2011-09-22 9:14 ` Michael Schubert
2011-09-22 16:39 ` Junio C Hamano
0 siblings, 1 reply; 19+ messages in thread
From: Michael Schubert @ 2011-09-22 9:14 UTC (permalink / raw)
To: Carlos Martín Nieto; +Cc: Junio C Hamano, git
On 09/22/2011 10:37 AM, Carlos Martín Nieto wrote:
> On Wed, 2011-09-21 at 22:04 -0700, Junio C Hamano wrote:
>> * cn/eradicate-working-copy (2011-09-21) 2 commits
>> - patch-id.c: use strbuf instead of a fixed buffer
>> - Remove 'working copy' from the documentation and C code
>
> It looks like that first commit sneaked in there. Shouldn't that be its
> own topic?
It's in pu twice:
On 09/22/2011 07:04 AM, Junio C Hamano wrote:
> * cn/eradicate-working-copy (2011-09-21) 2 commits
> - patch-id.c: use strbuf instead of a fixed buffer
> - Remove 'working copy' from the documentation and C code
> * ms/patch-id-with-overlong-line (2011-09-21) 1 commit
> - patch-id.c: use strbuf instead of a fixed buffer
64128da and a6c5c60
There's also a minor typo in the last sentence of the commit message.
Should I resend?
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: What's cooking in git.git (Sep 2011, #06; Wed, 21)
2011-09-22 9:14 ` Michael Schubert
@ 2011-09-22 16:39 ` Junio C Hamano
0 siblings, 0 replies; 19+ messages in thread
From: Junio C Hamano @ 2011-09-22 16:39 UTC (permalink / raw)
To: Michael Schubert; +Cc: Carlos Martín Nieto, git
Michael Schubert <mschub@elegosoft.com> writes:
> On 09/22/2011 10:37 AM, Carlos Martín Nieto wrote:
>> On Wed, 2011-09-21 at 22:04 -0700, Junio C Hamano wrote:
>>> * cn/eradicate-working-copy (2011-09-21) 2 commits
>>> - patch-id.c: use strbuf instead of a fixed buffer
>>> - Remove 'working copy' from the documentation and C code
>>
>> It looks like that first commit sneaked in there. Shouldn't that be its
>> own topic?
>
> It's in pu twice:
Thansk for noticing. Will remove.
> On 09/22/2011 07:04 AM, Junio C Hamano wrote:
>> * cn/eradicate-working-copy (2011-09-21) 2 commits
>> - patch-id.c: use strbuf instead of a fixed buffer
>> - Remove 'working copy' from the documentation and C code
>
>> * ms/patch-id-with-overlong-line (2011-09-21) 1 commit
>> - patch-id.c: use strbuf instead of a fixed buffer
>
> 64128da and a6c5c60
>
> There's also a minor typo in the last sentence of the commit message.
> Should I resend?
If that is s/user/use/ and nothing else, I can amend locally; otherwise
please do.
The last part of the "rather dumb heiristic" you talk about is designed to
parse "cmd | diff-tree -p --stdin" output. I agree with you that it can
safely tightened a bit by checking that 41st byte is the EOL, but it
probably is not worth it.
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: What's cooking in git.git (Sep 2011, #06; Wed, 21)
2011-09-22 5:04 What's cooking in git.git (Sep 2011, #06; Wed, 21) Junio C Hamano
2011-09-22 8:37 ` Carlos Martín Nieto
@ 2011-09-22 23:01 ` Jakub Narebski
2011-09-22 23:12 ` Junio C Hamano
2011-09-23 11:00 ` [PATCH] fix push --quiet: add 'quiet' capability to receive-pack Clemens Buchacher
` (4 subsequent siblings)
6 siblings, 1 reply; 19+ messages in thread
From: Jakub Narebski @ 2011-09-22 23:01 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
Junio C Hamano <gitster@pobox.com> writes:
> --------------------------------------------------
> [New Topics]
> * jc/namespace-doc-with-old-asciidoc (2011-09-16) 1 commit
> - Documentation/gitnamespaces.txt: cater to older asciidoc
I'll need this to e.g. test the "rpm" target after adding
Documentation/gitweb.txt and Documentation/gitweb.conf.txt
But it is not something very urgent; the series are cooking now:
"[PATCH/RFCv4 0/4] Moving gitweb documentation to manpages"
http://thread.gmane.org/gmane.comp.version-control.git/181605
--
Jakub Narębski
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: What's cooking in git.git (Sep 2011, #06; Wed, 21)
2011-09-22 23:01 ` Jakub Narebski
@ 2011-09-22 23:12 ` Junio C Hamano
2011-09-22 23:33 ` Jakub Narebski
0 siblings, 1 reply; 19+ messages in thread
From: Junio C Hamano @ 2011-09-22 23:12 UTC (permalink / raw)
To: Jakub Narebski; +Cc: git
Jakub Narebski <jnareb@gmail.com> writes:
> Junio C Hamano <gitster@pobox.com> writes:
>
>> --------------------------------------------------
>> [New Topics]
>
>> * jc/namespace-doc-with-old-asciidoc (2011-09-16) 1 commit
>> - Documentation/gitnamespaces.txt: cater to older asciidoc
>
> I'll need this to e.g. test the "rpm" target after adding
> Documentation/gitweb.txt and Documentation/gitweb.conf.txt
>
> But it is not something very urgent...
Now I am confused. If you apply your patch on top of "master" then you
cannot create "rpm" on your platform, not because your patch is busted,
but because "master" lacks the documentation fix from that topic. Is that
what you mean?
If the reason the documentation fix for "master" is needed is because a
new feature scheduled for the upcoming release has broken documentation,
then wouldn't we need the fix before the release, whether you are working
on your patch or not? How can it be not urgent if that is the case?
On my boxes with recent Debian, Ubuntu, and F14, I am not suffering from
the lack of the workaround, but if distros need the workaround, then the
time to apply it is now, not post release.
Hmmm....
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: What's cooking in git.git (Sep 2011, #06; Wed, 21)
2011-09-22 23:12 ` Junio C Hamano
@ 2011-09-22 23:33 ` Jakub Narebski
2011-09-22 23:45 ` Junio C Hamano
0 siblings, 1 reply; 19+ messages in thread
From: Jakub Narebski @ 2011-09-22 23:33 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
Junio C Hamano wrote:
> Jakub Narebski <jnareb@gmail.com> writes:
>> Junio C Hamano <gitster@pobox.com> writes:
>>
>>> --------------------------------------------------
>>> [New Topics]
>>
>>> * jc/namespace-doc-with-old-asciidoc (2011-09-16) 1 commit
>>> - Documentation/gitnamespaces.txt: cater to older asciidoc
>>
>> I'll need this to e.g. test the "rpm" target after adding
>> Documentation/gitweb.txt and Documentation/gitweb.conf.txt
>>
>> But it is not something very urgent...
>
> Now I am confused. If you apply your patch on top of "master" then you
> cannot create "rpm" on your platform, not because your patch is busted,
> but because "master" lacks the documentation fix from that topic. Is that
> what you mean?
Yes, that is what I mean... but that it is only because I use old
version of asciidoc (7.1.2).
"make doc" (which is part of "make rpm") fails on my box with
ASCIIDOC gitnamespaces.html
ERROR: gitnamespaces.txt: line 9: second section must be named SYNOPSIS
make[1]: *** [gitnamespaces.html] Error 1
> If the reason the documentation fix for "master" is needed is because a
> new feature scheduled for the upcoming release has broken documentation,
> then wouldn't we need the fix before the release, whether you are working
> on your patch or not? How can it be not urgent if that is the case?
>
> On my boxes with recent Debian, Ubuntu, and F14, I am not suffering from
> the lack of the workaround, but if distros need the workaround, then the
> time to apply it is now, not post release.
I don't think _modern_ distributions need this workaround... asciidoc 8.4.5
which fixed the issue with "Synopsis" section was released 2009-05-24:
http://www.methods.co.nz/asciidoc/CHANGELOG.html
Version 8.4.5 (2009-05-24)
--------------------------
Additions and changes
~~~~~~~~~~~~~~~~~~~~~
* Added manpage "Name" and "Synopsis" section title customization to
languages configuration files.
* "Synopsis" manpage section no longer mandatory.
[...]
--
Jakub Narebski
Poland
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: What's cooking in git.git (Sep 2011, #06; Wed, 21)
2011-09-22 23:33 ` Jakub Narebski
@ 2011-09-22 23:45 ` Junio C Hamano
0 siblings, 0 replies; 19+ messages in thread
From: Junio C Hamano @ 2011-09-22 23:45 UTC (permalink / raw)
To: Jakub Narebski; +Cc: git
Jakub Narebski <jnareb@gmail.com> writes:
> I don't think _modern_ distributions need this workaround... asciidoc 8.4.5
> which fixed the issue with "Synopsis" section was released 2009-05-24:
Thanks for a clarification. I'll then hold it off until the upcoming
release and then merge it to see if anybody screams.
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH] fix push --quiet: add 'quiet' capability to receive-pack
2011-09-22 5:04 What's cooking in git.git (Sep 2011, #06; Wed, 21) Junio C Hamano
2011-09-22 8:37 ` Carlos Martín Nieto
2011-09-22 23:01 ` Jakub Narebski
@ 2011-09-23 11:00 ` Clemens Buchacher
2011-09-23 11:55 ` [PATCH] use -h for synopsis and --help for manpage consistently Clemens Buchacher
` (3 subsequent siblings)
6 siblings, 0 replies; 19+ messages in thread
From: Clemens Buchacher @ 2011-09-23 11:00 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git, tmz, tobiasu, jkeating
Currently, git push --quiet produces some non-error output, e.g.:
$ git push --quiet
Unpacking objects: 100% (3/3), done.
This fixes a bug reported for the fedora git package:
https://bugzilla.redhat.com/show_bug.cgi?id=725593
Commit 90a6c7d4 (propagate --quiet to send-pack/receive-pack)
introduced the --quiet option to receive-pack and made send-pack
pass that option. Older versions of receive-pack do not recognize
the option, however, and terminate immediately. The commit was
therefore reverted.
This change instead adds a 'quiet' capability to receive-pack,
which is a backwards compatible.
In addition, this fixes push --quiet via http: A verbosity of 0
means quiet for remote helpers.
Reported-by: Jesse Keating <jkeating@redhat.com>
Reported-by: Tobias Ulmer <tobiasu@tmux.org>
Cc: Todd Zullinger <tmz@pobox.com>
Signed-off-by: Clemens Buchacher <drizzd@aon.at>
---
On Wed, Sep 21, 2011 at 10:04:28PM -0700, Junio C Hamano wrote:
>
> * cb/maint-quiet-push (2011-09-05) 4 commits
> . t5541: avoid TAP test miscounting
> . push: old receive-pack does not understand --quiet
> . fix push --quiet via http
> . tests for push --quiet
>
> Dropped for rerolling after 1.7.7 cycle.
This is the re-rolled version based on current master, without the
backwards incompatible receive-pack --quiet option.
I squashed the tests in and added your unpack(void) fixup.
I have not added Michael's "t5541: avoid TAP test miscounting"
since I cannot reproduce the error:
http://mid.gmane.org/e4e82f1267da3edfc600361de0041f618c31e30c.1315232475.git.git@drmicha.warpmail.net
And there is also this related patch "server_supports(): parse
feature list more carefully", which looked good to me:
http://mid.gmane.org/7vmxejy9od.fsf@alter.siamese.dyndns.org
Does it need more work?
Clemens
builtin/receive-pack.c | 14 ++++++++++++--
builtin/send-pack.c | 13 ++++++++++---
remote-curl.c | 4 +++-
t/t5523-push-upstream.sh | 7 +++++++
t/t5541-http-push.sh | 8 ++++++++
5 files changed, 40 insertions(+), 6 deletions(-)
diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c
index ae164da..4419323 100644
--- a/builtin/receive-pack.c
+++ b/builtin/receive-pack.c
@@ -31,6 +31,7 @@ static int transfer_unpack_limit = -1;
static int unpack_limit = 100;
static int report_status;
static int use_sideband;
+static int quiet;
static int prefer_ofs_delta = 1;
static int auto_update_server_info;
static int auto_gc = 1;
@@ -114,7 +115,7 @@ static int show_ref(const char *path, const unsigned char *sha1, int flag, void
else
packet_write(1, "%s %s%c%s%s\n",
sha1_to_hex(sha1), path, 0,
- " report-status delete-refs side-band-64k",
+ " report-status delete-refs side-band-64k quiet",
prefer_ofs_delta ? " ofs-delta" : "");
sent_capabilities = 1;
return 0;
@@ -636,6 +637,8 @@ static struct command *read_head_info(void)
report_status = 1;
if (strstr(refname + reflen + 1, "side-band-64k"))
use_sideband = LARGE_PACKET_MAX;
+ if (strstr(refname + reflen + 1, "quiet"))
+ quiet = 1;
}
cmd = xcalloc(1, sizeof(struct command) + len - 80);
hashcpy(cmd->old_sha1, old_sha1);
@@ -684,8 +687,10 @@ static const char *unpack(void)
if (ntohl(hdr.hdr_entries) < unpack_limit) {
int code, i = 0;
- const char *unpacker[4];
+ const char *unpacker[5];
unpacker[i++] = "unpack-objects";
+ if (quiet)
+ unpacker[i++] = "-q";
if (receive_fsck_objects)
unpacker[i++] = "--strict";
unpacker[i++] = hdr_arg;
@@ -799,6 +804,11 @@ int cmd_receive_pack(int argc, const char **argv, const char *prefix)
const char *arg = *argv++;
if (*arg == '-') {
+ if (!strcmp(arg, "--quiet")) {
+ quiet = 1;
+ continue;
+ }
+
if (!strcmp(arg, "--advertise-refs")) {
advertise_refs = 1;
continue;
diff --git a/builtin/send-pack.c b/builtin/send-pack.c
index c1f6ddd..a8d6b4c 100644
--- a/builtin/send-pack.c
+++ b/builtin/send-pack.c
@@ -263,6 +263,8 @@ int send_pack(struct send_pack_args *args,
args->use_ofs_delta = 1;
if (server_supports("side-band-64k"))
use_sideband = 1;
+ if (!server_supports("quiet"))
+ args->quiet = 0;
if (!remote_refs) {
fprintf(stderr, "No refs in common and none specified; doing nothing.\n"
@@ -301,11 +303,12 @@ int send_pack(struct send_pack_args *args,
char *old_hex = sha1_to_hex(ref->old_sha1);
char *new_hex = sha1_to_hex(ref->new_sha1);
- if (!cmds_sent && (status_report || use_sideband)) {
- packet_buf_write(&req_buf, "%s %s %s%c%s%s",
+ if (!cmds_sent && (status_report || use_sideband || args->quiet)) {
+ packet_buf_write(&req_buf, "%s %s %s%c%s%s%s",
old_hex, new_hex, ref->name, 0,
status_report ? " report-status" : "",
- use_sideband ? " side-band-64k" : "");
+ use_sideband ? " side-band-64k" : "",
+ args->quiet ? " quiet" : "");
}
else
packet_buf_write(&req_buf, "%s %s %s",
@@ -439,6 +442,10 @@ int cmd_send_pack(int argc, const char **argv, const char *prefix)
args.force_update = 1;
continue;
}
+ if (!strcmp(arg, "--quiet")) {
+ args.quiet = 1;
+ continue;
+ }
if (!strcmp(arg, "--verbose")) {
args.verbose = 1;
continue;
diff --git a/remote-curl.c b/remote-curl.c
index b8cf45a..2341106 100644
--- a/remote-curl.c
+++ b/remote-curl.c
@@ -762,7 +762,9 @@ static int push_git(struct discovery *heads, int nr_spec, char **specs)
argv[argc++] = "--thin";
if (options.dry_run)
argv[argc++] = "--dry-run";
- if (options.verbosity > 1)
+ if (options.verbosity == 0)
+ argv[argc++] = "--quiet";
+ else if (options.verbosity > 1)
argv[argc++] = "--verbose";
argv[argc++] = url;
for (i = 0; i < nr_spec; i++)
diff --git a/t/t5523-push-upstream.sh b/t/t5523-push-upstream.sh
index c229fe6..9ee52cf 100755
--- a/t/t5523-push-upstream.sh
+++ b/t/t5523-push-upstream.sh
@@ -108,4 +108,11 @@ test_expect_failure TTY 'push --no-progress suppresses progress' '
! grep "Writing objects" err
'
+test_expect_success TTY 'quiet push' '
+ ensure_fresh_upstream &&
+
+ test_terminal git push --quiet --no-progress upstream master 2>&1 | tee output &&
+ test_cmp /dev/null output
+'
+
test_done
diff --git a/t/t5541-http-push.sh b/t/t5541-http-push.sh
index a73c826..e756a08 100755
--- a/t/t5541-http-push.sh
+++ b/t/t5541-http-push.sh
@@ -5,6 +5,7 @@
test_description='test smart pushing over http via http-backend'
. ./test-lib.sh
+. "$TEST_DIRECTORY"/lib-terminal.sh
if test -n "$NO_CURL"; then
skip_all='skipping test, git built without http support'
@@ -154,5 +155,12 @@ test_expect_success 'push (chunked)' '
test $HEAD = $(git rev-parse --verify HEAD))
'
+test_expect_success TTY 'quiet push' '
+ cd "$ROOT_PATH"/test_repo_clone &&
+ test_commit quiet &&
+ test_terminal git push --quiet --no-progress 2>&1 | tee output &&
+ test_cmp /dev/null output
+'
+
stop_httpd
test_done
--
1.7.6.1
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH] use -h for synopsis and --help for manpage consistently
2011-09-22 5:04 What's cooking in git.git (Sep 2011, #06; Wed, 21) Junio C Hamano
` (2 preceding siblings ...)
2011-09-23 11:00 ` [PATCH] fix push --quiet: add 'quiet' capability to receive-pack Clemens Buchacher
@ 2011-09-23 11:55 ` Clemens Buchacher
2011-09-23 14:44 ` What's cooking in git.git (Sep 2011, #06; Wed, 21) Scott Chacon
` (2 subsequent siblings)
6 siblings, 0 replies; 19+ messages in thread
From: Clemens Buchacher @ 2011-09-23 11:55 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
Signed-off-by: Clemens Buchacher <drizzd@aon.at>
---
On Wed, Sep 21, 2011 at 10:04:28PM -0700, Junio C Hamano wrote:
>
> * cb/send-email-help (2011-09-12) 1 commit
> (merged to 'next' on 2011-09-14 at ae71999)
> + send-email: add option -h
>
> A separate set of patches to remove the hidden fully-spelled "help" from
> other commands would be nice to have as companion patches as well.
This should do it.
Clemens
Documentation/blame-options.txt | 1 -
git-cvsserver.perl | 4 ++--
git-difftool.perl | 2 +-
git-pull.sh | 2 +-
git-sh-setup.sh | 2 +-
git-svn.perl | 2 +-
6 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/Documentation/blame-options.txt b/Documentation/blame-options.txt
index e76195a..d4a51da 100644
--- a/Documentation/blame-options.txt
+++ b/Documentation/blame-options.txt
@@ -117,5 +117,4 @@ commit. And the default value is 40. If there are more than one
take effect.
-h::
---help::
Show help message.
diff --git a/git-cvsserver.perl b/git-cvsserver.perl
index 1b8bff2..6c5185e 100755
--- a/git-cvsserver.perl
+++ b/git-cvsserver.perl
@@ -109,14 +109,14 @@ my $usage =
" --strict-paths : Don't allow recursing into subdirectories\n".
" --export-all : Don't check for gitcvs.enabled in config\n".
" --version, -V : Print version information and exit\n".
- " --help, -h, -H : Print usage information and exit\n".
+ " -h : Print usage information and exit\n".
"\n".
"<directory> ... is a list of allowed directories. If no directories\n".
"are given, all are allowed. This is an additional restriction, gitcvs\n".
"access still needs to be enabled by the gitcvs.enabled config option.\n".
"Alternately, one directory may be specified in GIT_CVSSERVER_ROOT.\n";
-my @opts = ( 'help|h|H', 'version|V',
+my @opts = ( 'h', 'version|V',
'base-path=s', 'strict-paths', 'export-all' );
GetOptions( $state, @opts )
or die $usage;
diff --git a/git-difftool.perl b/git-difftool.perl
index ced1615..09b65f1 100755
--- a/git-difftool.perl
+++ b/git-difftool.perl
@@ -97,7 +97,7 @@ sub generate_command
$prompt = 'yes';
next;
}
- if ($arg eq '-h' || $arg eq '--help') {
+ if ($arg eq '-h') {
usage();
}
push @command, $arg;
diff --git a/git-pull.sh b/git-pull.sh
index 63da37b..8c1370f 100755
--- a/git-pull.sh
+++ b/git-pull.sh
@@ -120,7 +120,7 @@ do
--d|--dr|--dry|--dry-|--dry-r|--dry-ru|--dry-run)
dry_run=--dry-run
;;
- -h|--h|--he|--hel|--help|--help-|--help-a|--help-al|--help-all)
+ -h|--help-all)
usage
;;
*)
diff --git a/git-sh-setup.sh b/git-sh-setup.sh
index 8e427da..1fba6c2 100644
--- a/git-sh-setup.sh
+++ b/git-sh-setup.sh
@@ -90,7 +90,7 @@ $LONG_USAGE"
fi
case "$1" in
- -h|--h|--he|--hel|--help)
+ -h)
echo "$LONG_USAGE"
exit
esac
diff --git a/git-svn.perl b/git-svn.perl
index 89f83fd..a019f55 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -294,7 +294,7 @@ read_git_config(\%opts);
if ($cmd && ($cmd eq 'log' || $cmd eq 'blame')) {
Getopt::Long::Configure('pass_through');
}
-my $rv = GetOptions(%opts, 'help|H|h' => \$_help, 'version|V' => \$_version,
+my $rv = GetOptions(%opts, 'h' => \$_help, 'version|V' => \$_version,
'minimize-connections' => \$Git::SVN::Migration::_minimize,
'id|i=s' => \$Git::SVN::default_ref_id,
'svn-remote|remote|R=s' => sub {
--
1.7.6.1
^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: What's cooking in git.git (Sep 2011, #06; Wed, 21)
2011-09-22 5:04 What's cooking in git.git (Sep 2011, #06; Wed, 21) Junio C Hamano
` (3 preceding siblings ...)
2011-09-23 11:55 ` [PATCH] use -h for synopsis and --help for manpage consistently Clemens Buchacher
@ 2011-09-23 14:44 ` Scott Chacon
2011-09-23 18:00 ` Junio C Hamano
[not found] ` <20111003182136.GA6136@ecki.lan>
2011-10-05 6:31 ` [PATCH] fix push --quiet: add 'quiet' capability to receive-pack Clemens Buchacher
6 siblings, 1 reply; 19+ messages in thread
From: Scott Chacon @ 2011-09-23 14:44 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
Hey,
On Wed, Sep 21, 2011 at 10:04 PM, Junio C Hamano <gitster@pobox.com> wrote:
> Here are the topics that have been cooking. Commits prefixed with '-' are
> only in 'pu' while commits prefixed with '+' are in 'next'.
>
> Here are the repositories that have my integration branches:
>
> With maint, master, next, pu and todo:
>
> url = git://repo.or.cz/alt-git.git
> url = https://code.google.com/p/git-core/
>
> With only maint and master:
>
> url = git://git.sourceforge.jp/gitroot/git-core/git.git
> url = git://git-core.git.sourceforge.net/gitroot/git-core/git-core
>
> With all the topics and integration branches:
>
> url = https://github.com/gitster/git
>
It appears that you're no longer pushing the 'html' branch to the
GitHub repo, but you are to some of the other ones, which is sort of
strange because *everything* else is there.
Since the k.org hosting of the man pages is down, I was working on
putting them on git-scm.com, where you could select which version of
the docs you want to see and could search through them and whatnot.
Can you push 'html' to GitHub too? I want to pull my data out of it
on an ongoing basis and it's the only one with a git object level API.
Thanks,
Scott
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: What's cooking in git.git (Sep 2011, #06; Wed, 21)
2011-09-23 14:44 ` What's cooking in git.git (Sep 2011, #06; Wed, 21) Scott Chacon
@ 2011-09-23 18:00 ` Junio C Hamano
2011-09-23 19:29 ` Junio C Hamano
0 siblings, 1 reply; 19+ messages in thread
From: Junio C Hamano @ 2011-09-23 18:00 UTC (permalink / raw)
To: Scott Chacon; +Cc: git
Scott Chacon <schacon@gmail.com> writes:
> It appears that you're no longer pushing the 'html' branch to the
> GitHub repo,...
It is not even "no longer".
Unlike the other public mirrors that are designed to mimic what my
repository at k.org looks like, https://github.com/gitster/git is
primarily meant to mirror my internal development repository, with the
full set of topic branches.
As I do not have 'html' as a branch in my development repository, the
result "git push --mirror" there never had refs/heads/html, either.
My workflow used to be:
- push 4 integration branches from the development repository to k.org,
and have its update hook update html and man branches there;
- optionally push todo from a different private repository to k.org;
- fetch back refs/heads/* from k.org to refs/remotes/ko/*;
- verify that my refs/heads/* and refs/remotes/ko/* match for 4 integration
branches;
- push stuff under refs/remotes/ko/* to public mirrors (sourceforge does
not get next and pu);
- push --mirror to https://github.com/gitster/git.
Now the interim workflow, until k.org comes back, is tentatively:
- in a separate local "formatting" repository, pull 'master' from my
development repository, build html and man there, and push them back
to refs/docs/{html,man} to my development repository;
- push refs/heads/{master,maint,next,pu} and refs/docs/{html,man} to
public mirrors (sourceforge does not get next and pu);
- push --mirror to https://github.com/gitster/git.
I am hoping that I do not have to keep doing this and refs/docs/ can
eventually go away. I specifically do _not_ want the administrative
non-source branches html/man/todo to be my local branches.
> Since the k.org hosting of the man pages is down, I was working on
> putting them on git-scm.com, where you could select which version of
> the docs you want to see and could search through them and whatnot.
What is the expected the end-user page-flow?
Would people come to https://github.com/gitster/git first, find "doc" link
there, and start browsing the html version of the documentation?
Or do people come to http://github.com/, find a link "documentation for
the scm this site supports", your machinery kicks in and serves the blobs
from https://github.com/gitster/git under the hood, without letting users
know where the pages they are looking at really come from?
What I am getting at is that if these users do not need to know about my
repository, then you do not _need_ to see html branch in my repository,
either. You only need to find it _somewhere_, and that somewhere does not
have to be https://github.com/gitster/git repository.
You may think you could use refs/docs/html but I would rather want to
avoid letting you guys rely on refs/docs/ I started using just a few days
ago as an interim measure. I may later change my mind and get rid of that
from my development repository, but that would break your machinery to
show preformatted documentation pages.
I could add a _separate_ repository at github, and treat it just like
other public mirrors like repo.or.cz, so that you can find html branch
there. That would be consistent with my wish to use "push --mirror" to at
least one place (https://github.com/gitster/git), and would be easier to
manage for me.
Would that work?
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: What's cooking in git.git (Sep 2011, #06; Wed, 21)
2011-09-23 18:00 ` Junio C Hamano
@ 2011-09-23 19:29 ` Junio C Hamano
2011-09-26 14:03 ` Scott Chacon
0 siblings, 1 reply; 19+ messages in thread
From: Junio C Hamano @ 2011-09-23 19:29 UTC (permalink / raw)
To: Scott Chacon; +Cc: git
Junio C Hamano <gitster@pobox.com> writes:
> Scott Chacon <schacon@gmail.com> writes:
>
>> It appears that you're no longer pushing the 'html' branch to the
>> GitHub repo,...
>
> It is not even "no longer".
It just occurred to me that https://github.com/git/git repository might be
the one you are talking about, but that repository is not even mine. The
page at https://github.com/git says git@logicalawesome.com is its contact
person.
I _suspect_ it is set up to mirror from my k.org repository and obviously
nothing is updated from that route for the past few weeks. It is correct
to say "html branch in that repository is no longer updated", but I cannot
do anything about that repository ;-).
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: What's cooking in git.git (Sep 2011, #06; Wed, 21)
2011-09-23 19:29 ` Junio C Hamano
@ 2011-09-26 14:03 ` Scott Chacon
2011-09-26 18:52 ` Junio C Hamano
0 siblings, 1 reply; 19+ messages in thread
From: Scott Chacon @ 2011-09-26 14:03 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
Hey,
On Fri, Sep 23, 2011 at 12:29 PM, Junio C Hamano <gitster@pobox.com> wrote:
> It just occurred to me that https://github.com/git/git repository might be
> the one you are talking about, but that repository is not even mine. The
> page at https://github.com/git says git@logicalawesome.com is its contact
> person.
>
> I _suspect_ it is set up to mirror from my k.org repository and obviously
> nothing is updated from that route for the past few weeks. It is correct
> to say "html branch in that repository is no longer updated", but I cannot
> do anything about that repository ;-).
git/git is a mirror I set up from k.org years ago for git-scm.com. I
believe you've been a collaborator on it for a while now, so you can
push to it if you'd like. The mirroring system is down since k.org
died and I've since moved it off the host I had been using to Heroku,
so I can't do the mirroring that way anymore. If you want to push to
it I'll leave it there, otherwise I'll reroot your repo to be the head
of the GitHub network instead.
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: What's cooking in git.git (Sep 2011, #06; Wed, 21)
2011-09-26 14:03 ` Scott Chacon
@ 2011-09-26 18:52 ` Junio C Hamano
2011-09-27 2:08 ` Jay Soffian
0 siblings, 1 reply; 19+ messages in thread
From: Junio C Hamano @ 2011-09-26 18:52 UTC (permalink / raw)
To: git; +Cc: Scott Chacon
Scott Chacon <schacon@gmail.com> writes:
> On Fri, Sep 23, 2011 at 12:29 PM, Junio C Hamano <gitster@pobox.com> wrote:
>> It just occurred to me that https://github.com/git/git repository might be
>> the one you are talking about, but that repository is not even mine. The
>> page at https://github.com/git says git@logicalawesome.com is its contact
>> person.
>>
>> I _suspect_ it is set up to mirror from my k.org repository and obviously
>> nothing is updated from that route for the past few weeks. It is correct
>> to say "html branch in that repository is no longer updated", but I cannot
>> do anything about that repository ;-).
>
> git/git is a mirror I set up from k.org years ago for git-scm.com. I
> believe you've been a collaborator on it for a while now, so you can
> push to it if you'd like. The mirroring system is down since k.org
> died and I've since moved it off the host I had been using to Heroku,
> so I can't do the mirroring that way anymore. If you want to push to
> it I'll leave it there, otherwise I'll reroot your repo to be the head
> of the GitHub network instead.
Ok, to clarify this discussion for people who have been pulling from me
and have been wondering where to reset their "origin" to...
* I'll start to also push into https://github.com/git/git/ directly,
treating it like git://repo.or.cz/alt-git.git/ and other secondary
distribution points, that have the integration branches, todo, html and
man.
* Eventually git://git.kernel.org/pub/scm/git/git.git/ will again start
receiving my direct pushes just like it used to. The secondary
distribution points will also get my pushes directly (I've made sure
with Scott that mirroring into https://github.com/git/git/ from my
k.org repository will stay turned off).
* https://github.com/gitster/git.git/ will stay a mirror of my private
development repository with the topic branches (but without non-source
branches like html and mah).
I haven't figured out how the preformatted documentation branches will be
managed in the longer term, as it seems likely that I no longer would have
the post-update hook access to update them upon pushing into my k.org
repository. I might end up dropping these branches altogether if it gets
too cumbersome for me to maintain, but I do not know yet.
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: What's cooking in git.git (Sep 2011, #06; Wed, 21)
2011-09-26 18:52 ` Junio C Hamano
@ 2011-09-27 2:08 ` Jay Soffian
0 siblings, 0 replies; 19+ messages in thread
From: Jay Soffian @ 2011-09-27 2:08 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git, Scott Chacon
On Mon, Sep 26, 2011 at 2:52 PM, Junio C Hamano <gitster@pobox.com> wrote:
> I haven't figured out how the preformatted documentation branches will be
> managed in the longer term, as it seems likely that I no longer would have
> the post-update hook access to update them upon pushing into my k.org
> repository. I might end up dropping these branches altogether if it gets
> too cumbersome for me to maintain, but I do not know yet.
Building the documentation on OS X is a huge pain. OS X users
definitely appreciate the preformatted documentation. I know that
Homebrew uses it, and I think the git-osx-installer recently discussed
on this list uses it as well.
So, uh, maybe a way can be found to make it less cumbersome for you?
j.
^ permalink raw reply [flat|nested] 19+ messages in thread
[parent not found: <20111003182136.GA6136@ecki.lan>]
* Re: [PATCH] use -h for synopsis and --help for manpage consistently
[not found] ` <20111003182136.GA6136@ecki.lan>
@ 2011-10-03 22:03 ` Junio C Hamano
2011-10-05 6:33 ` Clemens Buchacher
0 siblings, 1 reply; 19+ messages in thread
From: Junio C Hamano @ 2011-10-03 22:03 UTC (permalink / raw)
To: Clemens Buchacher; +Cc: git
Clemens Buchacher <drizzd@aon.at> writes:
> Hi Junio,
>
> This is a re-send in case you missed it.
Thanks.
> Cheers,
> Clemens
>
> --8<--
>
> Signed-off-by: Clemens Buchacher <drizzd@aon.at>
> ---
> ...
> diff --git a/git-cvsserver.perl b/git-cvsserver.perl
> index 1b8bff2..6c5185e 100755
> --- a/git-cvsserver.perl
> +++ b/git-cvsserver.perl
> @@ -109,14 +109,14 @@ my $usage =
> " --strict-paths : Don't allow recursing into subdirectories\n".
> " --export-all : Don't check for gitcvs.enabled in config\n".
> " --version, -V : Print version information and exit\n".
> - " --help, -h, -H : Print usage information and exit\n".
> + " -h : Print usage information and exit\n".
> "\n".
> "<directory> ... is a list of allowed directories. If no directories\n".
> "are given, all are allowed. This is an additional restriction, gitcvs\n".
> "access still needs to be enabled by the gitcvs.enabled config option.\n".
> "Alternately, one directory may be specified in GIT_CVSSERVER_ROOT.\n";
>
> -my @opts = ( 'help|h|H', 'version|V',
> +my @opts = ( 'h', 'version|V',
I am a bit skeptical about the removal of 'H' here (also in git-svn).
Granted, no sane script would have ever used "-H" (or "-h" for that
matter) so there is little chance for this to introduce a painful
regression.
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH] fix push --quiet: add 'quiet' capability to receive-pack
2011-09-22 5:04 What's cooking in git.git (Sep 2011, #06; Wed, 21) Junio C Hamano
` (5 preceding siblings ...)
[not found] ` <20111003182136.GA6136@ecki.lan>
@ 2011-10-05 6:31 ` Clemens Buchacher
6 siblings, 0 replies; 19+ messages in thread
From: Clemens Buchacher @ 2011-10-05 6:31 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
Hi Junio,
Since 1.7.7 is out now, maybe you would like to pick this up again.
Cheers,
Clemens
On Wed, Sep 21, 2011 at 10:04:28PM -0700, Junio C Hamano wrote:
>
> * cb/maint-quiet-push (2011-09-05) 4 commits
> . t5541: avoid TAP test miscounting
> . push: old receive-pack does not understand --quiet
> . fix push --quiet via http
> . tests for push --quiet
>
> Dropped for rerolling after 1.7.7 cycle.
This is the re-rolled version based on current master, without the
backwards incompatible receive-pack --quiet option.
I squashed the tests in and added your unpack(void) fixup.
I have not added Michael's "t5541: avoid TAP test miscounting"
since I cannot reproduce the error:
http://mid.gmane.org/e4e82f1267da3edfc600361de0041f618c31e30c.1315232475.git.git@drmicha.warpmail.net
And there is also this related patch "server_supports(): parse
feature list more carefully", which looked good to me:
http://mid.gmane.org/7vmxejy9od.fsf@alter.siamese.dyndns.org
Does it need more work?
Clemens
--o<--
Currently, git push --quiet produces some non-error output, e.g.:
$ git push --quiet
Unpacking objects: 100% (3/3), done.
This fixes a bug reported for the fedora git package:
https://bugzilla.redhat.com/show_bug.cgi?id=725593
Commit 90a6c7d4 (propagate --quiet to send-pack/receive-pack)
introduced the --quiet option to receive-pack and made send-pack
pass that option. Older versions of receive-pack do not recognize
the option, however, and terminate immediately. The commit was
therefore reverted.
This change instead adds a 'quiet' capability to receive-pack,
which is a backwards compatible.
In addition, this fixes push --quiet via http: A verbosity of 0
means quiet for remote helpers.
Reported-by: Jesse Keating <jkeating@redhat.com>
Reported-by: Tobias Ulmer <tobiasu@tmux.org>
Cc: Todd Zullinger <tmz@pobox.com>
Signed-off-by: Clemens Buchacher <drizzd@aon.at>
---
builtin/receive-pack.c | 14 ++++++++++++--
builtin/send-pack.c | 13 ++++++++++---
remote-curl.c | 4 +++-
t/t5523-push-upstream.sh | 7 +++++++
t/t5541-http-push.sh | 8 ++++++++
5 files changed, 40 insertions(+), 6 deletions(-)
diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c
index ae164da..4419323 100644
--- a/builtin/receive-pack.c
+++ b/builtin/receive-pack.c
@@ -31,6 +31,7 @@ static int transfer_unpack_limit = -1;
static int unpack_limit = 100;
static int report_status;
static int use_sideband;
+static int quiet;
static int prefer_ofs_delta = 1;
static int auto_update_server_info;
static int auto_gc = 1;
@@ -114,7 +115,7 @@ static int show_ref(const char *path, const unsigned char *sha1, int flag, void
else
packet_write(1, "%s %s%c%s%s\n",
sha1_to_hex(sha1), path, 0,
- " report-status delete-refs side-band-64k",
+ " report-status delete-refs side-band-64k quiet",
prefer_ofs_delta ? " ofs-delta" : "");
sent_capabilities = 1;
return 0;
@@ -636,6 +637,8 @@ static struct command *read_head_info(void)
report_status = 1;
if (strstr(refname + reflen + 1, "side-band-64k"))
use_sideband = LARGE_PACKET_MAX;
+ if (strstr(refname + reflen + 1, "quiet"))
+ quiet = 1;
}
cmd = xcalloc(1, sizeof(struct command) + len - 80);
hashcpy(cmd->old_sha1, old_sha1);
@@ -684,8 +687,10 @@ static const char *unpack(void)
if (ntohl(hdr.hdr_entries) < unpack_limit) {
int code, i = 0;
- const char *unpacker[4];
+ const char *unpacker[5];
unpacker[i++] = "unpack-objects";
+ if (quiet)
+ unpacker[i++] = "-q";
if (receive_fsck_objects)
unpacker[i++] = "--strict";
unpacker[i++] = hdr_arg;
@@ -799,6 +804,11 @@ int cmd_receive_pack(int argc, const char **argv, const char *prefix)
const char *arg = *argv++;
if (*arg == '-') {
+ if (!strcmp(arg, "--quiet")) {
+ quiet = 1;
+ continue;
+ }
+
if (!strcmp(arg, "--advertise-refs")) {
advertise_refs = 1;
continue;
diff --git a/builtin/send-pack.c b/builtin/send-pack.c
index c1f6ddd..a8d6b4c 100644
--- a/builtin/send-pack.c
+++ b/builtin/send-pack.c
@@ -263,6 +263,8 @@ int send_pack(struct send_pack_args *args,
args->use_ofs_delta = 1;
if (server_supports("side-band-64k"))
use_sideband = 1;
+ if (!server_supports("quiet"))
+ args->quiet = 0;
if (!remote_refs) {
fprintf(stderr, "No refs in common and none specified; doing nothing.\n"
@@ -301,11 +303,12 @@ int send_pack(struct send_pack_args *args,
char *old_hex = sha1_to_hex(ref->old_sha1);
char *new_hex = sha1_to_hex(ref->new_sha1);
- if (!cmds_sent && (status_report || use_sideband)) {
- packet_buf_write(&req_buf, "%s %s %s%c%s%s",
+ if (!cmds_sent && (status_report || use_sideband || args->quiet)) {
+ packet_buf_write(&req_buf, "%s %s %s%c%s%s%s",
old_hex, new_hex, ref->name, 0,
status_report ? " report-status" : "",
- use_sideband ? " side-band-64k" : "");
+ use_sideband ? " side-band-64k" : "",
+ args->quiet ? " quiet" : "");
}
else
packet_buf_write(&req_buf, "%s %s %s",
@@ -439,6 +442,10 @@ int cmd_send_pack(int argc, const char **argv, const char *prefix)
args.force_update = 1;
continue;
}
+ if (!strcmp(arg, "--quiet")) {
+ args.quiet = 1;
+ continue;
+ }
if (!strcmp(arg, "--verbose")) {
args.verbose = 1;
continue;
diff --git a/remote-curl.c b/remote-curl.c
index b8cf45a..2341106 100644
--- a/remote-curl.c
+++ b/remote-curl.c
@@ -762,7 +762,9 @@ static int push_git(struct discovery *heads, int nr_spec, char **specs)
argv[argc++] = "--thin";
if (options.dry_run)
argv[argc++] = "--dry-run";
- if (options.verbosity > 1)
+ if (options.verbosity == 0)
+ argv[argc++] = "--quiet";
+ else if (options.verbosity > 1)
argv[argc++] = "--verbose";
argv[argc++] = url;
for (i = 0; i < nr_spec; i++)
diff --git a/t/t5523-push-upstream.sh b/t/t5523-push-upstream.sh
index c229fe6..9ee52cf 100755
--- a/t/t5523-push-upstream.sh
+++ b/t/t5523-push-upstream.sh
@@ -108,4 +108,11 @@ test_expect_failure TTY 'push --no-progress suppresses progress' '
! grep "Writing objects" err
'
+test_expect_success TTY 'quiet push' '
+ ensure_fresh_upstream &&
+
+ test_terminal git push --quiet --no-progress upstream master 2>&1 | tee output &&
+ test_cmp /dev/null output
+'
+
test_done
diff --git a/t/t5541-http-push.sh b/t/t5541-http-push.sh
index a73c826..e756a08 100755
--- a/t/t5541-http-push.sh
+++ b/t/t5541-http-push.sh
@@ -5,6 +5,7 @@
test_description='test smart pushing over http via http-backend'
. ./test-lib.sh
+. "$TEST_DIRECTORY"/lib-terminal.sh
if test -n "$NO_CURL"; then
skip_all='skipping test, git built without http support'
@@ -154,5 +155,12 @@ test_expect_success 'push (chunked)' '
test $HEAD = $(git rev-parse --verify HEAD))
'
+test_expect_success TTY 'quiet push' '
+ cd "$ROOT_PATH"/test_repo_clone &&
+ test_commit quiet &&
+ test_terminal git push --quiet --no-progress 2>&1 | tee output &&
+ test_cmp /dev/null output
+'
+
stop_httpd
test_done
--
1.7.6.1
^ permalink raw reply related [flat|nested] 19+ messages in thread