git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git-diff-stages?
@ 2005-09-17  1:04 Junio C Hamano
  2005-09-17  1:31 ` deprecating more Junio C Hamano
  0 siblings, 1 reply; 8+ messages in thread
From: Junio C Hamano @ 2005-09-17  1:04 UTC (permalink / raw)
  To: git

Is anybody actually using this program?  If not I'd like to
deprecate it now and remove it before we hit 1.0.  As far as I
can tell it is not very useful.

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

* deprecating more
  2005-09-17  1:04 git-diff-stages? Junio C Hamano
@ 2005-09-17  1:31 ` Junio C Hamano
  2005-09-17  1:58   ` Horst von Brand
  2005-09-17  1:59   ` Linus Torvalds
  0 siblings, 2 replies; 8+ messages in thread
From: Junio C Hamano @ 2005-09-17  1:31 UTC (permalink / raw)
  To: git

Junio C Hamano <junkio@cox.net> writes:

> Is anybody actually using this program?  If not I'd like to
> deprecate it now and remove it before we hit 1.0.  As far as I
> can tell it is not very useful.

The same goes for the following programs:

    git-diff-helper
    git-diff-stages
    git-export
    git-rev-tree

Among them, I could be talked into keeping git-export on the
condition that we will add a counterpart git-import that can
read git-export output and recreate an identical repository
[*1*]; without something like that, I doubt its usefulness,
especially since "git-whatchanged" is far more useful for
everyday use.

[Footnote]

*1* which I think actually is impossible without fixing
git-export first so that it exports the initial commit.  I may
be mistaken.

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

* Re: deprecating more
  2005-09-17  1:31 ` deprecating more Junio C Hamano
@ 2005-09-17  1:58   ` Horst von Brand
  2005-09-17  1:59   ` Linus Torvalds
  1 sibling, 0 replies; 8+ messages in thread
From: Horst von Brand @ 2005-09-17  1:58 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

Junio C Hamano <junkio@cox.net> wrote:

[About axing programs]

> Among them, I could be talked into keeping git-export on the
> condition that we will add a counterpart git-import that can
> read git-export output and recreate an identical repository
> [*1*]; without something like that, I doubt its usefulness,
> especially since "git-whatchanged" is far more useful for
> everyday use.
> 
> [Footnote]
> 
> *1* which I think actually is impossible without fixing
> git-export first so that it exports the initial commit.  I may
> be mistaken.

Given that you can just tar the whole repository up and handle it that way,
all that work makes little sense.

Note that bk export (and cg-export) copy the current snapshot into a
directory or tarball, so this doesn't do what I'd expected.
-- 
Dr. Horst H. von Brand                   User #22616 counter.li.org
Departamento de Informatica                     Fono: +56 32 654431
Universidad Tecnica Federico Santa Maria              +56 32 654239
Casilla 110-V, Valparaiso, Chile                Fax:  +56 32 797513

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

* Re: deprecating more
  2005-09-17  1:31 ` deprecating more Junio C Hamano
  2005-09-17  1:58   ` Horst von Brand
@ 2005-09-17  1:59   ` Linus Torvalds
  2005-09-17  2:29     ` Junio C Hamano
  1 sibling, 1 reply; 8+ messages in thread
From: Linus Torvalds @ 2005-09-17  1:59 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git



On Fri, 16 Sep 2005, Junio C Hamano wrote:
> 
> Among them, I could be talked into keeping git-export on the
> condition that we will add a counterpart git-import that can
> read git-export output and recreate an identical repository

I don't think there is any point.

git-export was done as a concept example on how easy it is to export the
git data to something else. It's much less powerful than ny number of
trivial one-liner scripts now, and real exporters would not ever use
git-export.

It's obviously much less powerful than "git-whatchanged", or just about 
any combination of git-rev-list + git-diff-tree.

So drop it.

		Linus

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

* Re: deprecating more
  2005-09-17  1:59   ` Linus Torvalds
@ 2005-09-17  2:29     ` Junio C Hamano
  2005-09-17  2:50       ` Linus Torvalds
  0 siblings, 1 reply; 8+ messages in thread
From: Junio C Hamano @ 2005-09-17  2:29 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: git

Linus Torvalds <torvalds@osdl.org> writes:

> It's obviously much less powerful than "git-whatchanged", or just about 
> any combination of git-rev-list + git-diff-tree.
>
> So drop it.

I'm happy to hear an argument to drop it, but I would like to
make sure that you do realize that git-whatchanged is not a
convenient way to truly "export" for later recreation of
identical repository, due to its indentation and truncation
behaviour.  Not that *I* think that matters.

What do you think about the other commands I mentioned?

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

* Re: deprecating more
  2005-09-17  2:29     ` Junio C Hamano
@ 2005-09-17  2:50       ` Linus Torvalds
  2005-09-17  5:28         ` Junio C Hamano
  0 siblings, 1 reply; 8+ messages in thread
From: Linus Torvalds @ 2005-09-17  2:50 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git



On Fri, 16 Sep 2005, Junio C Hamano wrote:
> 
> I'm happy to hear an argument to drop it, but I would like to
> make sure that you do realize that git-whatchanged is not a
> convenient way to truly "export" for later recreation of
> identical repository, due to its indentation and truncation
> behaviour.  Not that *I* think that matters.

Well, the thing is, a true exporter probably doesn't want to use patches 
at all.

A truly good exporter would likely use

	git-diff-tree -M -r

or something to generate the list of filenames and versions, and then work 
on that. You really _have_ to, in order to get things like binary files 
right.

Anything that is based on diffs would suck.

Also, I suspect that to get the list of commits to export, a real exporter
is likely to first just do something like

	git-rev-list --parents --topo-order prev..

and generate the commit topology from there. Then just either use the C
library interfaces to suck in the commit messages, or just use
git-cat-file. And then git-diff-tree -M (or perhaps -C, if the
repo-to-be-exported-to knows about copies) to actually generate the 
revision info.

> What do you think about the other commands I mentioned?

I think they can all go. I think some old scripts migth still use 
git-rev-tree, but it really is clearly inferior in every way to 
git-rev-list that such scripts should be fixed anyway. Fixing them should 
be pretty easy.

(The packed format actually makes git-rev-tree at least ok from a 
performance angle, even if it has to walk all the way to the root. But I 
_seriously_ doube you want to use it on any big repo anyway, and 
definitely not with an unpacked one).

		Linus

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

* Re: deprecating more
  2005-09-17  2:50       ` Linus Torvalds
@ 2005-09-17  5:28         ` Junio C Hamano
  2005-09-17  6:13           ` Tony Luck
  0 siblings, 1 reply; 8+ messages in thread
From: Junio C Hamano @ 2005-09-17  5:28 UTC (permalink / raw)
  To: tony.luck; +Cc: git, Linus Torvalds

Linus Torvalds <torvalds@osdl.org> writes:

> On Fri, 16 Sep 2005, Junio C Hamano wrote:
>
>> What do you think about the other commands I mentioned?
>
> I think they can all go. I think some old scripts migth still use 
> git-rev-tree, but it really is clearly inferior in every way to 
> git-rev-list that such scripts should be fixed anyway. Fixing them should 
> be pretty easy.

I found one in our source.  Tony, is the following change
acceptable to you?

------------
[PATCH] Use git-rev-list not git-rev-tree where appropriate.

Signed-off-by: Junio C Hamano <junkio@cox.net>
---

diff --git a/Documentation/howto/using-topic-branches.txt b/Documentation/howto/using-topic-branches.txt
--- a/Documentation/howto/using-topic-branches.txt
+++ b/Documentation/howto/using-topic-branches.txt
@@ -245,7 +245,7 @@ gb=$(tput setab 2)
 rb=$(tput setab 1)
 restore=$(tput setab 9)
 
-if [ `git-rev-tree release ^test | wc -c` -gt 0 ]
+if [ `git-rev-list release ^test | wc -c` -gt 0 ]
 then
 	echo $rb Warning: commits in release that are not in test $restore
 	git-whatchanged release ^test
@@ -262,7 +262,7 @@ do
 	status=
 	for ref in test release linus
 	do
-		if [ `git-rev-tree $branch ^$ref | wc -c` -gt 0 ]
+		if [ `git-rev-list $branch ^$ref | wc -c` -gt 0 ]
 		then
 			status=$status${ref:0:1}
 		fi

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

* Re: deprecating more
  2005-09-17  5:28         ` Junio C Hamano
@ 2005-09-17  6:13           ` Tony Luck
  0 siblings, 0 replies; 8+ messages in thread
From: Tony Luck @ 2005-09-17  6:13 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: tony.luck, git, Linus Torvalds

> I found one in our source.  Tony, is the following change
> acceptable to you?
> 
> ------------
> [PATCH] Use git-rev-list not git-rev-tree where appropriate.

Sure ... I'll be glad to see git-rev-tree go.  For some reason it got wired
into my fingers early on, and I keep typing it when I mean to use
git-rev-list, then stare at the screen all confused when it complains
about the arguments I gave it.

-Tony

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

end of thread, other threads:[~2005-09-18  2:01 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-17  1:04 git-diff-stages? Junio C Hamano
2005-09-17  1:31 ` deprecating more Junio C Hamano
2005-09-17  1:58   ` Horst von Brand
2005-09-17  1:59   ` Linus Torvalds
2005-09-17  2:29     ` Junio C Hamano
2005-09-17  2:50       ` Linus Torvalds
2005-09-17  5:28         ` Junio C Hamano
2005-09-17  6:13           ` Tony Luck

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).