{"thread":{"id":"12901","subject":"Git vs svn. Is ... possible ?","startedAt":"2008-03-28T13:24:38Z","lastAt":"2008-03-31T15:41:08Z","messageCount":5,"participants":["Rafał Mużyło","Adam Piatyszek","Bill Lear","Theodore Tso","John Goerzen"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"73259","messageId":"20080328132438.GA32646@blackspire","threadId":"12901","inReplyTo":null,"subject":"Git vs svn. Is ... possible ?","fromName":"Rafał Mużyło","fromEmail":"galtgendo@o2.pl","sentAt":"2008-03-28T13:24:38Z","receivedAt":"2008-03-28T13:24:38Z","isPatch":false,"sender":{"key":"galtgendo@o2.pl","avatar":null},"body":"Well, the actual question is:\nIn svn I can do a remote diff (diff between two remote revisions) without\nhaving to do a checkout, is this possible for git ?\n"},{"id":"73262","messageId":"47ECF459.2040500@users.sourceforge.net","threadId":"12901","inReplyTo":"20080328132438.GA32646@blackspire","subject":"Re: Git vs svn. Is ... possible ?","fromName":"Adam Piatyszek","fromEmail":"ediap@users.sourceforge.net","sentAt":"2008-03-28T13:36:25Z","receivedAt":"2008-03-28T13:36:25Z","isPatch":false,"sender":{"key":"ediap@users.sourceforge.net","avatar":null},"body":"Hi Rafał,\n\n* Rafa? Mu?y?o [28 III 2008 14:24]:\n> Well, the actual question is:\n> In svn I can do a remote diff (diff between two remote revisions) without\n> having to do a checkout, is this possible for git ?\n\nThe question makes no sense to me. Git by design is a distributed SCM \ntool, so there is no such thing like \"remote revisions\". You can have \ntracking branches (clones) of some remote repositories, but all the \ncommits on such branches are also stored locally. So you have full \naccess to them, even without a permanent connection to such remote \nrepositories.\n\nAnd answering to the second part of your question: Yes, you can do \"git \ndiff\" operation between any of the commits in the repository you are \nworking with. No need to checkout before. You can perform \"git diff\" \neven on a bare repository without the working three.\n\nPlease refer to \"man git-diff\" for more info.\n\nBR,\n/Adam\n\n\nPS. The encoding you used for your message is not playing well with the \nPolish accented characters in your name ;)\n\n-- \n.:.  Adam Piatyszek (ediap)  .:.....................................:.\n.:.  ediap@users.sourceforge.net  .:................................:.\n"},{"id":"73266","messageId":"18412.64512.269165.652979@lisa.zopyra.com","threadId":"12901","inReplyTo":"20080328132438.GA32646@blackspire","subject":"Re: Git vs svn. Is ... possible ?","fromName":"Bill Lear","fromEmail":"rael@zopyra.com","sentAt":"2008-03-28T14:09:04Z","receivedAt":"2008-03-28T14:09:04Z","isPatch":false,"sender":{"key":"rael@zopyra.com","avatar":"https://gravatar.com/avatar/c4f2d2790ca3828d3b4e7dfebabf61d2fe94fd82fa49cdac2a5295dd2d46a874?d=mp&s=160"},"body":"On Friday, March 28, 2008 at 14:24:38 (+0100) =?utf-8?B?UmFmYcWCIE11xbx5xYJv?= writes:\n>Well, the actual question is:\n>In svn I can do a remote diff (diff between two remote revisions) without\n>having to do a checkout, is this possible for git ?\n\nI'm not sure what you mean by \"two remote revisions\".  Do you mean you\nare on machine X, and you want to diff content on machine Y and\nmachine Z?  If so, you could probably do that in git fairly easily\nwith some script magic that would fetch the remote branches into local\ntracking branches, and then diff them.  This would not literally\nrequire you to perform a \"checkout\", but you would need a git repo\n(actually a script could take care of creating a temporary repo, fetch\ninto it, do the diff and then remove the temporary repo when done).\n\nIf you are talking about having an existing repo on machine X and\ndiffing content that is on machine Y, you can do a fetch followed by a\ndiff, so in that case you can do it literally \"without having to do a\ncheckout\".  Example: if you are working on master and want to see what\nis different between what you have and what is in a remote repo you\nare tracking, you can do \"git fetch\" then \"git diff origin/master\".\n\n\nBill\n"},{"id":"73267","messageId":"20080328143114.GL7202@mit.edu","threadId":"12901","inReplyTo":"47ECF459.2040500@users.sourceforge.net","subject":"Re: Git vs svn. Is ... possible ?","fromName":"Theodore Tso","fromEmail":"tytso@mit.edu","sentAt":"2008-03-28T14:31:14Z","receivedAt":"2008-03-28T14:31:14Z","isPatch":false,"sender":{"key":"tytso@mit.edu","avatar":"https://avatars.githubusercontent.com/u/51416?v=4"},"body":"On Fri, Mar 28, 2008 at 02:36:25PM +0100, Adam Piatyszek wrote:\n>\n> The question makes no sense to me. Git by design is a distributed SCM tool, \n> so there is no such thing like \"remote revisions\". You can have tracking \n> branches (clones) of some remote repositories, but all the commits on such \n> branches are also stored locally. So you have full access to them, even \n> without a permanent connection to such remote repositories.\n>\n\nIt would certainly be possible to *implement* such a thing, but first\nquestion would be, \"why would you want to\".  One of the things that\nmakes git so nice is that repositories don't take that much space, and\nif you have a local repository (or no network access at all) it's much\nfaster to consult the local repository at all.\n\nIn fact, with svn, I normally consider it a bug that you *have* to\nconsult the remote repository to do a diff between two arbitrary\nrevisions.\n\n\t\t\t\t\t\t- Ted\n"},{"id":"73441","messageId":"slrnfv21gk.b4c.jgoerzen@katherina.lan.complete.org","threadId":"12901","inReplyTo":"20080328132438.GA32646@blackspire","subject":"Re: Git vs svn. Is ... possible ?","fromName":"John Goerzen","fromEmail":"jgoerzen@complete.org","sentAt":"2008-03-31T15:41:08Z","receivedAt":"2008-03-31T15:41:08Z","isPatch":false,"sender":{"key":"jgoerzen@complete.org","avatar":null},"body":"On 2008-03-28, Rafa? Mu?y?o <galtgendo@o2.pl> wrote:\n> Well, the actual question is:\n> In svn I can do a remote diff (diff between two remote revisions) without\n> having to do a checkout, is this possible for git ?\n\nYou can craft URLs to gitweb in specific ways to do this.  For\ninstance:\n\nhttp://git.complete.org/branches/redmine-integration/?a=commitdiff_plain;h=fb-bug-738-projects-block;hp=upstream\n\nShows the diff from branch upstream to branch\nfb-bug-738-projects-block.  You can replace the branch names with the\nfull 40-character SHA1 ids as well.\n\nLeave off the \"_plain\" and you get diff highlighting.\n\nThe header at the top of this thing is going to be a bit misleading,\nbut the content is what you want.\n\n-- John\n"}]}