* [PATCH] git-svn: forward -q to git-rebase
@ 2012-06-12 15:43 Erik Faye-Lund
2012-06-12 16:54 ` Junio C Hamano
2012-06-12 21:38 ` Eric Wong
0 siblings, 2 replies; 6+ messages in thread
From: Erik Faye-Lund @ 2012-06-12 15:43 UTC (permalink / raw)
To: git; +Cc: normalperson
When calling "git svn rebase -q", we still get the message
"Current branch BRANCHNAME is up to date." from git-rebase, which
isn't quite as quiet as we could be.
Fix this by forwarding the -q flag to git-rebase.
Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
---
I just set up a cronjob that did a "git svn rebase -q", and noticed
it triggered cron to send me an e-mail every time.
Since I'm not really interested in getting an e-mail every time the
script does nothing, but I'd like the option to get an e-mail whenever
it does something useful, perhaps something like this can benefit
other people as well?
git-svn.perl | 1 +
1 file changed, 1 insertion(+)
diff --git a/git-svn.perl b/git-svn.perl
index 0b074c4..34baa43 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -1590,6 +1590,7 @@ sub cmd_gc {
sub rebase_cmd {
my @cmd = qw/rebase/;
push @cmd, '-v' if $_verbose;
+ push @cmd, '-q' if $_q;
push @cmd, qw/--merge/ if $_merge;
push @cmd, "--strategy=$_strategy" if $_strategy;
push @cmd, "--preserve-merges" if $_preserve_merges;
--
1.7.11.rc2.5.g68f532f.dirty
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] git-svn: forward -q to git-rebase
2012-06-12 15:43 [PATCH] git-svn: forward -q to git-rebase Erik Faye-Lund
@ 2012-06-12 16:54 ` Junio C Hamano
2012-06-12 20:23 ` Erik Faye-Lund
2012-06-12 21:38 ` Eric Wong
1 sibling, 1 reply; 6+ messages in thread
From: Junio C Hamano @ 2012-06-12 16:54 UTC (permalink / raw)
To: Erik Faye-Lund; +Cc: git, normalperson
Erik Faye-Lund <kusmabite@gmail.com> writes:
> When calling "git svn rebase -q", we still get the message
> "Current branch BRANCHNAME is up to date." from git-rebase, which
> isn't quite as quiet as we could be.
>
> Fix this by forwarding the -q flag to git-rebase.
>
> Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
> ---
>
> I just set up a cronjob that did a "git svn rebase -q", and noticed
> it triggered cron to send me an e-mail every time.
>
> Since I'm not really interested in getting an e-mail every time the
> script does nothing, but I'd like the option to get an e-mail whenever
> it does something useful, perhaps something like this can benefit
> other people as well?
If it matches what you would get from "git pull -q" run in a
cronjob, I would say that is a sensible change to make.
> git-svn.perl | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/git-svn.perl b/git-svn.perl
> index 0b074c4..34baa43 100755
> --- a/git-svn.perl
> +++ b/git-svn.perl
> @@ -1590,6 +1590,7 @@ sub cmd_gc {
> sub rebase_cmd {
> my @cmd = qw/rebase/;
> push @cmd, '-v' if $_verbose;
> + push @cmd, '-q' if $_q;
> push @cmd, qw/--merge/ if $_merge;
> push @cmd, "--strategy=$_strategy" if $_strategy;
> push @cmd, "--preserve-merges" if $_preserve_merges;
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] git-svn: forward -q to git-rebase
2012-06-12 16:54 ` Junio C Hamano
@ 2012-06-12 20:23 ` Erik Faye-Lund
2012-06-12 20:39 ` Erik Faye-Lund
0 siblings, 1 reply; 6+ messages in thread
From: Erik Faye-Lund @ 2012-06-12 20:23 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git, normalperson
On Tue, Jun 12, 2012 at 6:54 PM, Junio C Hamano <gitster@pobox.com> wrote:
> Erik Faye-Lund <kusmabite@gmail.com> writes:
>
>> When calling "git svn rebase -q", we still get the message
>> "Current branch BRANCHNAME is up to date." from git-rebase, which
>> isn't quite as quiet as we could be.
>>
>> Fix this by forwarding the -q flag to git-rebase.
>>
>> Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
>> ---
>>
>> I just set up a cronjob that did a "git svn rebase -q", and noticed
>> it triggered cron to send me an e-mail every time.
>>
>> Since I'm not really interested in getting an e-mail every time the
>> script does nothing, but I'd like the option to get an e-mail whenever
>> it does something useful, perhaps something like this can benefit
>> other people as well?
>
> If it matches what you would get from "git pull -q" run in a
> cronjob, I would say that is a sensible change to make.
Seems like it to me in my tests, yeah.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] git-svn: forward -q to git-rebase
2012-06-12 20:23 ` Erik Faye-Lund
@ 2012-06-12 20:39 ` Erik Faye-Lund
2012-06-12 20:41 ` Erik Faye-Lund
0 siblings, 1 reply; 6+ messages in thread
From: Erik Faye-Lund @ 2012-06-12 20:39 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git, normalperson
On Tue, Jun 12, 2012 at 10:23 PM, Erik Faye-Lund <kusmabite@gmail.com> wrote:
> On Tue, Jun 12, 2012 at 6:54 PM, Junio C Hamano <gitster@pobox.com> wrote:
>> Erik Faye-Lund <kusmabite@gmail.com> writes:
>>
>>> When calling "git svn rebase -q", we still get the message
>>> "Current branch BRANCHNAME is up to date." from git-rebase, which
>>> isn't quite as quiet as we could be.
>>>
>>> Fix this by forwarding the -q flag to git-rebase.
>>>
>>> Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
>>> ---
>>>
>>> I just set up a cronjob that did a "git svn rebase -q", and noticed
>>> it triggered cron to send me an e-mail every time.
>>>
>>> Since I'm not really interested in getting an e-mail every time the
>>> script does nothing, but I'd like the option to get an e-mail whenever
>>> it does something useful, perhaps something like this can benefit
>>> other people as well?
>>
>> If it matches what you would get from "git pull -q" run in a
>> cronjob, I would say that is a sensible change to make.
>
> Seems like it to me in my tests, yeah.
Hm, but not the same as "git pull --rebase -q", as git-pull.sh doesn't
forward $verbosity to "git rebase" either. It DOES pass it to "git
merge", though... Which puzzles me a bit.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] git-svn: forward -q to git-rebase
2012-06-12 20:39 ` Erik Faye-Lund
@ 2012-06-12 20:41 ` Erik Faye-Lund
0 siblings, 0 replies; 6+ messages in thread
From: Erik Faye-Lund @ 2012-06-12 20:41 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git, normalperson
On Tue, Jun 12, 2012 at 10:39 PM, Erik Faye-Lund <kusmabite@gmail.com> wrote:
> On Tue, Jun 12, 2012 at 10:23 PM, Erik Faye-Lund <kusmabite@gmail.com> wrote:
>> On Tue, Jun 12, 2012 at 6:54 PM, Junio C Hamano <gitster@pobox.com> wrote:
>>> Erik Faye-Lund <kusmabite@gmail.com> writes:
>>>
>>>> When calling "git svn rebase -q", we still get the message
>>>> "Current branch BRANCHNAME is up to date." from git-rebase, which
>>>> isn't quite as quiet as we could be.
>>>>
>>>> Fix this by forwarding the -q flag to git-rebase.
>>>>
>>>> Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
>>>> ---
>>>>
>>>> I just set up a cronjob that did a "git svn rebase -q", and noticed
>>>> it triggered cron to send me an e-mail every time.
>>>>
>>>> Since I'm not really interested in getting an e-mail every time the
>>>> script does nothing, but I'd like the option to get an e-mail whenever
>>>> it does something useful, perhaps something like this can benefit
>>>> other people as well?
>>>
>>> If it matches what you would get from "git pull -q" run in a
>>> cronjob, I would say that is a sensible change to make.
>>
>> Seems like it to me in my tests, yeah.
>
> Hm, but not the same as "git pull --rebase -q", as git-pull.sh doesn't
> forward $verbosity to "git rebase" either.
The obvious fix to that (if we decide it needs fixing, that is), is this:
diff --git a/git-pull.sh b/git-pull.sh
index 2a10047..2920c69 100755
--- a/git-pull.sh
+++ b/git-pull.sh
@@ -278,7 +278,7 @@ fi
merge_name=$(git fmt-merge-msg $log_arg <"$GIT_DIR/FETCH_HEAD") || exit
case "$rebase" in
true)
- eval="git-rebase $diffstat $strategy_args $merge_args"
+ eval="git-rebase $diffstat $strategy_args $merge_args $verbosity"
eval="$eval --onto $merge_head ${oldremoteref:-$merge_head}"
;;
*)
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] git-svn: forward -q to git-rebase
2012-06-12 15:43 [PATCH] git-svn: forward -q to git-rebase Erik Faye-Lund
2012-06-12 16:54 ` Junio C Hamano
@ 2012-06-12 21:38 ` Eric Wong
1 sibling, 0 replies; 6+ messages in thread
From: Eric Wong @ 2012-06-12 21:38 UTC (permalink / raw)
To: Erik Faye-Lund; +Cc: git
Erik Faye-Lund <kusmabite@gmail.com> wrote:
> When calling "git svn rebase -q", we still get the message
> "Current branch BRANCHNAME is up to date." from git-rebase, which
> isn't quite as quiet as we could be.
>
> Fix this by forwarding the -q flag to git-rebase.
>
> Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
> ---
Looks good to me.
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Also pushed to "master" of git://bogomips.org/git-svn
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-06-12 21:38 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-12 15:43 [PATCH] git-svn: forward -q to git-rebase Erik Faye-Lund
2012-06-12 16:54 ` Junio C Hamano
2012-06-12 20:23 ` Erik Faye-Lund
2012-06-12 20:39 ` Erik Faye-Lund
2012-06-12 20:41 ` Erik Faye-Lund
2012-06-12 21:38 ` Eric Wong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).