Git development
 help / color / mirror / Atom feed
* [TopGit PATCH] README: Fix spelling
@ 2008-11-20 13:51 Jonas Fonseca
  2008-11-20 13:52 ` Jonas Fonseca
  2008-11-20 13:57 ` [TopGit PATCH] tg patch: disable pager and colors for git-diff Jonas Fonseca
  0 siblings, 2 replies; 8+ messages in thread
From: Jonas Fonseca @ 2008-11-20 13:51 UTC (permalink / raw)
  To: madduck; +Cc: git

Signed-off-by: Jonas Fonseca <fonseca@diku.dk>

---
 README^[[m |   11 ^[[32m+++++^[[m^[[31m------^[[m
 1 files changed, 5 insertions(+), 6 deletions(-)^[[m

^[[1mdiff --git a/README b/README^[[m
^[[1mindex 5bfe3ee..9e291da 100644^[[m
^[[1m--- a/README^[[m
^[[1m+++ b/README^[[m
^[[36m@@ -22,7 +22,7 @@ version control of patches (reordering of patches is not^[[m
 version-controlled at all). But there are several disadvantages -^[[m
 for one, these tools (especially StGIT) do not actually fit well^[[m
 with plain Git at all: it is basically impossible to take advantage^[[m
^[[31m-of the index efectively when using StGIT. But more importantly,^[[m
^[[32m+^[[m^[[32mof the index effectively when using StGIT. But more importantly,^[[m
 these tools horribly fail in the face of distributed environment.^[[m
 ^[[m
 TopGit has been designed around three main tenets:^[[m
^[[36m@@ -45,7 +45,7 @@ them.^[[m
 ^[[m
 As mentioned above, the main intended use-case for TopGit is tracking^[[m
 third-party patches, where each patch is effectively a single topic^[[m
^[[31m-branch.  In order to flexibly accomodate even complex scenarios when^[[m
^[[32m+^[[m^[[32mbranch.  In order to flexibly accommodate even complex scenarios when^[[m
 you track many patches where many are independent but some depend^[[m
 on others, TopGit ignores the ancient Quilt heritage of patch series^[[m
 and instead allows the patches to freely form graphs (DAGs just like^[[m
^[[36m@@ -222,7 +222,7 @@ tg create^[[m
 ^[[m
 	After `tg create`, you should insert the patch description^[[m
 	to the '.topmsg' file, which will already contain some^[[m
^[[31m-	pre-filled bits. You can set topgit.to, topgit.cc and topgit.bcc^[[m
^[[32m+^[[m	^[[32mprefilled bits. You can set topgit.to, topgit.cc and topgit.bcc^[[m
 	configuration variables in order to have `tg create`^[[m
 	add these headers with given default values to '.topmsg'.^[[m
 ^[[m
^[[36m@@ -350,7 +350,7 @@ tg export^[[m
 	in the cleaned up history (corresponding basically exactly^[[m
 	to `tg patch` output for the topic branch).^[[m
 ^[[m
^[[31m-	The command has two posible outputs now - either a Git branch^[[m
^[[32m+^[[m	^[[32mThe command has two possible outputs now - either a Git branch^[[m
 	with the collapsed history, or a quilt series in new directory.^[[m
 ^[[m
 	In case of producing collapsed history in new branch,^[[m
^[[36m@@ -455,7 +455,6 @@ tg update^[[m
 ^[[m
 	TODO: tg update -a for updating all topic branches^[[m
 ^[[m
^[[31m-TODO: tg depend for adding/removing dependencies smoothly^[[m
 TODO: tg rename^[[m
 ^[[m
 ^[[m
^[[36m@@ -485,7 +484,7 @@ whatever Cc headers you choose or the post-three-dashes message.^[[m
 When mailing out your patch, basically only few extra headers^[[m
 mail headers are inserted and the patch itself is appended.^[[m
 Thus, as your patches evolve, you can record nuances like whether^[[m
^[[31m-the paricular patch should have To-list/Cc-maintainer or vice^[[m
^[[32m+^[[m^[[32mthe particular patch should have To-list/Cc-maintainer or vice^[[m
 versa and similar nuances, if your project is into that.^[[m
 From is prefilled from your current GIT_AUTHOR_IDENT, other headers^[[m
 can be prefilled from various optional topgit.* config options.^[[m
-- 
tg: (f17218e..) jf/readme-update (depends on: master)

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [TopGit PATCH] README: Fix spelling
  2008-11-20 13:51 [TopGit PATCH] README: Fix spelling Jonas Fonseca
@ 2008-11-20 13:52 ` Jonas Fonseca
  2008-11-20 14:17   ` martin f krafft
  2008-11-20 13:57 ` [TopGit PATCH] tg patch: disable pager and colors for git-diff Jonas Fonseca
  1 sibling, 1 reply; 8+ messages in thread
From: Jonas Fonseca @ 2008-11-20 13:52 UTC (permalink / raw)
  To: madduck; +Cc: git

Oops sorry about this one!!! :-/

On Thu, Nov 20, 2008 at 14:51, Jonas Fonseca <fonseca@diku.dk> wrote:
> Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
>
> ---
>  README [m |   11  [32m+++++ [m [31m------ [m
>  1 files changed, 5 insertions(+), 6 deletions(-) [m
>
>  [1mdiff --git a/README b/README [m
>  [1mindex 5bfe3ee..9e291da 100644 [m
>  [1m--- a/README [m
>  [1m+++ b/README [m
>  [36m@@ -22,7 +22,7 @@ version control of patches (reordering of patches is not [m
>  version-controlled at all). But there are several disadvantages - [m
>  for one, these tools (especially StGIT) do not actually fit well [m
>  with plain Git at all: it is basically impossible to take advantage [m
>  [31m-of the index efectively when using StGIT. But more importantly, [m
>  [32m+ [m [32mof the index effectively when using StGIT. But more importantly, [m
>  these tools horribly fail in the face of distributed environment. [m
>  [m
>  TopGit has been designed around three main tenets: [m
>  [36m@@ -45,7 +45,7 @@ them. [m
>  [m
>  As mentioned above, the main intended use-case for TopGit is tracking [m
>  third-party patches, where each patch is effectively a single topic [m
>  [31m-branch.  In order to flexibly accomodate even complex scenarios when [m
>  [32m+ [m [32mbranch.  In order to flexibly accommodate even complex scenarios when [m
>  you track many patches where many are independent but some depend [m
>  on others, TopGit ignores the ancient Quilt heritage of patch series [m
>  and instead allows the patches to freely form graphs (DAGs just like [m
>  [36m@@ -222,7 +222,7 @@ tg create [m
>  [m
>        After `tg create`, you should insert the patch description [m
>        to the '.topmsg' file, which will already contain some [m
>  [31m-  pre-filled bits. You can set topgit.to, topgit.cc and topgit.bcc [m
>  [32m+ [m        [32mprefilled bits. You can set topgit.to, topgit.cc and topgit.bcc [m
>        configuration variables in order to have `tg create` [m
>        add these headers with given default values to '.topmsg'. [m
>  [m
>  [36m@@ -350,7 +350,7 @@ tg export [m
>        in the cleaned up history (corresponding basically exactly [m
>        to `tg patch` output for the topic branch). [m
>  [m
>  [31m-  The command has two posible outputs now - either a Git branch [m
>  [32m+ [m        [32mThe command has two possible outputs now - either a Git branch [m
>        with the collapsed history, or a quilt series in new directory. [m
>  [m
>        In case of producing collapsed history in new branch, [m
>  [36m@@ -455,7 +455,6 @@ tg update [m
>  [m
>        TODO: tg update -a for updating all topic branches [m
>  [m
>  [31m-TODO: tg depend for adding/removing dependencies smoothly [m
>  TODO: tg rename [m
>  [m
>  [m
>  [36m@@ -485,7 +484,7 @@ whatever Cc headers you choose or the post-three-dashes message. [m
>  When mailing out your patch, basically only few extra headers [m
>  mail headers are inserted and the patch itself is appended. [m
>  Thus, as your patches evolve, you can record nuances like whether [m
>  [31m-the paricular patch should have To-list/Cc-maintainer or vice [m
>  [32m+ [m [32mthe particular patch should have To-list/Cc-maintainer or vice [m
>  versa and similar nuances, if your project is into that. [m
>  From is prefilled from your current GIT_AUTHOR_IDENT, other headers [m
>  can be prefilled from various optional topgit.* config options. [m
> --
> tg: (f17218e..) jf/readme-update (depends on: master)
>



-- 
Jonas Fonseca

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [TopGit PATCH] tg patch: disable pager and colors for git-diff
  2008-11-20 13:51 [TopGit PATCH] README: Fix spelling Jonas Fonseca
  2008-11-20 13:52 ` Jonas Fonseca
@ 2008-11-20 13:57 ` Jonas Fonseca
  2008-11-20 14:34   ` Petr Baudis
  1 sibling, 1 reply; 8+ messages in thread
From: Jonas Fonseca @ 2008-11-20 13:57 UTC (permalink / raw)
  To: madduck; +Cc: git

When output is not redirected to a file, git brings up the pager for
only the diff, which can be confusing, so disable with --no-pager.
git-diff is a porcelain command and thus subject to color options. Use
--no-color, to avoid the patch being corrupted with terminal escape
characters when color.diff=always.

Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
---
 tg-patch.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

 Jonas Fonseca <fonseca@diku.dk> wrote Thu, Nov 20, 2008:
 > Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
 > 
 > ---
 >  README^[[m |   11 ^[[32m+++++^[[m^[[31m------^[[m
 >  1 files changed, 5 insertions(+), 6 deletions(-)^[[m
 > 
 > ^[[1mdiff --git a/README b/README^[[m
 > ^[[1mindex 5bfe3ee..9e291da 100644^[[m
 > ^[[1m--- a/README^[[m
 > ^[[1m+++ b/README^[[m

 I hope this demonstrates the point of this patch. ;)

diff --git a/tg-patch.sh b/tg-patch.sh
index 97338ab..c2f1b56 100644
--- a/tg-patch.sh
+++ b/tg-patch.sh
@@ -34,7 +34,7 @@ git diff-tree --name-only "$base_rev" "$name" |
 	fgrep -vx ".topdeps" |
 	fgrep -vx ".topmsg" >"$git_is_stupid" || : # fgrep likes to fail randomly?
 if [ -s "$git_is_stupid" ]; then
-	cat "$git_is_stupid" | xargs git diff --patch-with-stat "$base_rev" "$name" --
+	cat "$git_is_stupid" | xargs git --no-pager diff --no-color --patch-with-stat "$base_rev" "$name" --
 else
 	echo "No changes."
 fi
-- 
tg: (f17218e..) jf/patch-no-pager-and-color (depends on: master)

-- 
Jonas Fonseca

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [TopGit PATCH] README: Fix spelling
  2008-11-20 13:52 ` Jonas Fonseca
@ 2008-11-20 14:17   ` martin f krafft
  2008-11-20 14:23     ` Jonas Fonseca
  0 siblings, 1 reply; 8+ messages in thread
From: martin f krafft @ 2008-11-20 14:17 UTC (permalink / raw)
  To: Jonas Fonseca; +Cc: git

[-- Attachment #1: Type: text/plain, Size: 663 bytes --]

also sprach Jonas Fonseca <jonas.fonseca@gmail.com> [2008.11.20.1452 +0100]:
> Oops sorry about this one!!! :-/

What about it? The patch seems perfectly alright. Only the quoted
version is broken, which I think is your fault.

Should I apply the README patch?

-- 
 .''`.   martin f. krafft <madduck@debian.org>
: :'  :  proud Debian developer, author, administrator, and user
`. `'`   http://people.debian.org/~madduck - http://debiansystem.info
  `-  Debian - when you have better things to do than fixing systems
 
a Hooloovoo is a superintelligent shade of the color blue.
            -- douglas adams, "the hitchhiker's guide to the galaxy"

[-- Attachment #2: Digital signature (see http://martin-krafft.net/gpg/) --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [TopGit PATCH] README: Fix spelling
  2008-11-20 14:17   ` martin f krafft
@ 2008-11-20 14:23     ` Jonas Fonseca
  0 siblings, 0 replies; 8+ messages in thread
From: Jonas Fonseca @ 2008-11-20 14:23 UTC (permalink / raw)
  To: martin f krafft; +Cc: git

On Thu, Nov 20, 2008 at 15:17, martin f krafft <madduck@debian.org> wrote:
> also sprach Jonas Fonseca <jonas.fonseca@gmail.com> [2008.11.20.1452 +0100]:
>> Oops sorry about this one!!! :-/
>
> What about it? The patch seems perfectly alright. Only the quoted
> version is broken, which I think is your fault.

Well, it looks very broken in Gmail ...

> Should I apply the README patch?

Yes, if you can salvage it. Else it is also available in branch
jf/readme-update at

  git://repo.or.cz/topgit/fonseca.git

-- 
Jonas Fonseca

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [TopGit PATCH] tg patch: disable pager and colors for git-diff
  2008-11-20 13:57 ` [TopGit PATCH] tg patch: disable pager and colors for git-diff Jonas Fonseca
@ 2008-11-20 14:34   ` Petr Baudis
  2008-11-20 14:55     ` Jonas Fonseca
  0 siblings, 1 reply; 8+ messages in thread
From: Petr Baudis @ 2008-11-20 14:34 UTC (permalink / raw)
  To: Jonas Fonseca; +Cc: madduck, git

On Thu, Nov 20, 2008 at 02:57:10PM +0100, Jonas Fonseca wrote:
> When output is not redirected to a file, git brings up the pager for
> only the diff, which can be confusing, so disable with --no-pager.
> git-diff is a porcelain command and thus subject to color options. Use
> --no-color, to avoid the patch being corrupted with terminal escape
> characters when color.diff=always.
> 
> Signed-off-by: Jonas Fonseca <fonseca@diku.dk>

I still don't understand how did that color thing happen - shouldn't
git diff avoid spewing out colors when the output is not a tty? And when
it is, I want the colors myself, too.

Good point with the --no-pager, but in that case, tg patch itself should
by default invoke the pager, since it really is very desirable.

-- 
				Petr "Pasky" Baudis
People who take cold baths never have rheumatism, but they have
cold baths.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [TopGit PATCH] tg patch: disable pager and colors for git-diff
  2008-11-20 14:34   ` Petr Baudis
@ 2008-11-20 14:55     ` Jonas Fonseca
  2008-11-20 15:07       ` Petr Baudis
  0 siblings, 1 reply; 8+ messages in thread
From: Jonas Fonseca @ 2008-11-20 14:55 UTC (permalink / raw)
  To: Petr Baudis; +Cc: madduck, git

On Thu, Nov 20, 2008 at 15:34, Petr Baudis <pasky@suse.cz> wrote:
> On Thu, Nov 20, 2008 at 02:57:10PM +0100, Jonas Fonseca wrote:
>> When output is not redirected to a file, git brings up the pager for
>> only the diff, which can be confusing, so disable with --no-pager.
>> git-diff is a porcelain command and thus subject to color options. Use
>> --no-color, to avoid the patch being corrupted with terminal escape
>> characters when color.diff=always.
>>
>> Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
>
> I still don't understand how did that color thing happen - shouldn't
> git diff avoid spewing out colors when the output is not a tty? And when
> it is, I want the colors myself, too.

As I wrote in the commit message, git diff always spews out colors
with color.diff=always. This was what I for experimental reasons had
in my .git/config (and forgotten all about) before sending the README
update patch. Topgit could check the git color configuration but that
seems more hacky.

> Good point with the --no-pager, but in that case, tg patch itself should
> by default invoke the pager, since it really is very desirable.

Yes, probably.

-- 
Jonas Fonseca

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [TopGit PATCH] tg patch: disable pager and colors for git-diff
  2008-11-20 14:55     ` Jonas Fonseca
@ 2008-11-20 15:07       ` Petr Baudis
  0 siblings, 0 replies; 8+ messages in thread
From: Petr Baudis @ 2008-11-20 15:07 UTC (permalink / raw)
  To: Jonas Fonseca; +Cc: madduck, git

On Thu, Nov 20, 2008 at 03:55:47PM +0100, Jonas Fonseca wrote:
> On Thu, Nov 20, 2008 at 15:34, Petr Baudis <pasky@suse.cz> wrote:
> > On Thu, Nov 20, 2008 at 02:57:10PM +0100, Jonas Fonseca wrote:
> >> When output is not redirected to a file, git brings up the pager for
> >> only the diff, which can be confusing, so disable with --no-pager.
> >> git-diff is a porcelain command and thus subject to color options. Use
> >> --no-color, to avoid the patch being corrupted with terminal escape
> >> characters when color.diff=always.
> >>
> >> Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
> >
> > I still don't understand how did that color thing happen - shouldn't
> > git diff avoid spewing out colors when the output is not a tty? And when
> > it is, I want the colors myself, too.
> 
> As I wrote in the commit message, git diff always spews out colors
> with color.diff=always. This was what I for experimental reasons had
> in my .git/config (and forgotten all about) before sending the README
> update patch. Topgit could check the git color configuration but that
> seems more hacky.

This shows just that color.diff=always is asking for trouble. ;-)
I think we shouldn't try to outsmart the user if they _force_ that they
really always want the colors.

-- 
				Petr "Pasky" Baudis
People who take cold baths never have rheumatism, but they have
cold baths.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2008-11-20 15:09 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-20 13:51 [TopGit PATCH] README: Fix spelling Jonas Fonseca
2008-11-20 13:52 ` Jonas Fonseca
2008-11-20 14:17   ` martin f krafft
2008-11-20 14:23     ` Jonas Fonseca
2008-11-20 13:57 ` [TopGit PATCH] tg patch: disable pager and colors for git-diff Jonas Fonseca
2008-11-20 14:34   ` Petr Baudis
2008-11-20 14:55     ` Jonas Fonseca
2008-11-20 15:07       ` Petr Baudis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox