{"thread":{"id":"43203","subject":"Re: [BUG] StGit removed git branch of the same name as StGit branch","startedAt":"2006-11-20T21:01:44Z","lastAt":"2006-11-21T10:56:32Z","messageCount":13,"participants":["Karl Hasselström","Carl Worth","Junio C Hamano","Jakub Narebski","Catalin Marinas","J. Bruce Fields"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"295582","messageId":"200611202201.45521.jnareb@gmail.com","threadId":"43203","inReplyTo":null,"subject":"[BUG] StGit removed git branch of the same name as StGit branch","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-11-20T21:01:44Z","receivedAt":"2006-11-20T21:01:44Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"I have used StGit (wonderfull tool) to manage patches on git branch \ngitweb/web. Unfortunately, I have named stg branch the same as git \nbranch. When removing stg branch (I wanted to remove \nheads/base/gitweb/web) using \"stg branch --delete gitweb/web\" it \ndeleted also git branch when I wanted to remove only the StGit managed \nindicator. Fortunately I was able to recover the branch from reflog, as \nStGit didn't delete reflog with deletion of git branch.\n\nPerhaps that is correct behavior... but certainly unexpected.\n\nStacked GIT 0.11\ngit version 1.4.3.4\nPython version 2.4.3 (#1, Jun 13 2006, 16:41:18) \n[GCC 4.0.2 20051125 (Red Hat 4.0.2-8)]\n-- \nJakub Narebski\n"},{"id":"294499","messageId":"7vbqn125db.fsf@assigned-by-dhcp.cox.net","threadId":"43203","inReplyTo":"200611202201.45521.jnareb@gmail.com","subject":"Re: [BUG] StGit removed git branch of the same name as StGit branch","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-11-20T21:08:32Z","receivedAt":"2006-11-20T21:08:32Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jakub Narebski <jnareb@gmail.com> writes:\n\n> I have used StGit (wonderfull tool) to manage patches on git branch \n> gitweb/web. Unfortunately, I have named stg branch the same as git \n> branch. When removing stg branch (I wanted to remove \n> heads/base/gitweb/web) using \"stg branch --delete gitweb/web\" it \n> deleted also git branch when I wanted to remove only the StGit managed \n> indicator. Fortunately I was able to recover the branch from reflog, as \n> StGit didn't delete reflog with deletion of git branch.\n>\n> Perhaps that is correct behavior... but certainly unexpected.\n\nI am also a novice who recently started appreciating the\nconvenience of StGIT.  I _think_ the usage StGIT expect us to\nfollow is to run \"stg clean\" to make the series empty, and not\nworry about leftover refs/bases/ at all, but I may well be\nmistaken.\n\n"},{"id":"296298","messageId":"20061120222812.GE12285@fieldses.org","threadId":"43203","inReplyTo":"200611202201.45521.jnareb@gmail.com","subject":"Re: [BUG] StGit removed git branch of the same name as StGit branch","fromName":"J. Bruce Fields","fromEmail":"bfields@fieldses.org","sentAt":"2006-11-20T22:28:12Z","receivedAt":"2006-11-20T22:28:12Z","isPatch":false,"sender":{"key":"bfields@citi.umich.edu","avatar":null},"body":"On Mon, Nov 20, 2006 at 10:01:44PM +0100, Jakub Narebski wrote:\n> I have used StGit (wonderfull tool) to manage patches on git branch \n> gitweb/web. Unfortunately, I have named stg branch the same as git \n> branch. When removing stg branch (I wanted to remove \n> heads/base/gitweb/web) using \"stg branch --delete gitweb/web\" it \n> deleted also git branch when I wanted to remove only the StGit managed \n> indicator.\n\nYou probably actually had to \"stg branch --delete --force\", didn't you?\n\nWhat you want is \"stg commit\".\n\n> Perhaps that is correct behavior... but certainly unexpected.\n\nI think \"stg branch --delete\" is pretty clearly named and documented....\n\nThe idea I guess was to make it possible to use stgit (and only stgit)\nfor everything, and never type a git command.  It might have been better\nto make stgit only manage patch series, and admit that people should use\ngit for the rest.  Then it might work more like you expect.\n\n"},{"id":"297704","messageId":"ejtal6$p8s$1@sea.gmane.org","threadId":"43203","inReplyTo":"20061120222812.GE12285@fieldses.org","subject":"Re: [BUG] StGit removed git branch of the same name as StGit branch","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-11-20T22:37:54Z","receivedAt":"2006-11-20T22:37:54Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"J. Bruce Fields wrote:\n\n> On Mon, Nov 20, 2006 at 10:01:44PM +0100, Jakub Narebski wrote:\n>\n>> I have used StGit (wonderfull tool) to manage patches on git branch \n>> gitweb/web. Unfortunately, I have named stg branch the same as git \n>> branch. When removing stg branch (I wanted to remove \n>> heads/base/gitweb/web) using \"stg branch --delete gitweb/web\" it \n>> deleted also git branch when I wanted to remove only the StGit managed \n>> indicator.\n> \n> You probably actually had to \"stg branch --delete --force\", didn't you?\n\nNope. \"stg branch --delete gitweb/web\"\n\n> What you want is \"stg commit\".\n\nNo. Whole stack was committed, I wanted only get rid of\nheads/base/gitweb/web (of StGit managed branch indicator).\n\n>> Perhaps that is correct behavior... but certainly unexpected.\n> \n> I think \"stg branch --delete\" is pretty clearly named and documented....\n\nI thought it delete only stg branch, refs/base/gitwbe/web, and not\nrefs/heads/gitweb/web.\n \n> The idea I guess was to make it possible to use stgit (and only stgit)\n> for everything, and never type a git command.  It might have been better\n> to make stgit only manage patch series, and admit that people should use\n> git for the rest.  Then it might work more like you expect.\n\nYes, I expected to use StGit as a kind of preprocessing (branch preparation)\nfor git.\n-- \nJakub Narebski\nWarsaw, Poland\nShadeHawk on #git\n\n"},{"id":"297227","messageId":"20061120224800.GF12285@fieldses.org","threadId":"43203","inReplyTo":"ejtal6$p8s$1@sea.gmane.org","subject":"Re: [BUG] StGit removed git branch of the same name as StGit branch","fromName":"J. Bruce Fields","fromEmail":"bfields@fieldses.org","sentAt":"2006-11-20T22:48:00Z","receivedAt":"2006-11-20T22:48:00Z","isPatch":false,"sender":{"key":"bfields@citi.umich.edu","avatar":null},"body":"On Mon, Nov 20, 2006 at 11:37:54PM +0100, Jakub Narebski wrote:\n> J. Bruce Fields wrote:\n> > You probably actually had to \"stg branch --delete --force\", didn't you?\n> \n> Nope. \"stg branch --delete gitweb/web\"\n> \n> > What you want is \"stg commit\".\n> \n> No. Whole stack was committed, I wanted only get rid of\n> heads/base/gitweb/web (of StGit managed branch indicator).\n\nOh, right, got it.\n\n> > The idea I guess was to make it possible to use stgit (and only stgit)\n> > for everything, and never type a git command.  It might have been better\n> > to make stgit only manage patch series, and admit that people should use\n> > git for the rest.  Then it might work more like you expect.\n> \n> Yes, I expected to use StGit as a kind of preprocessing (branch preparation)\n> for git.\n\nThe multiple-porcelains idea seems like a mistake to me--it'd be fine if\nyou're just adding new features on the side, but who wants to learn\nentirely different sets of commands, with subtly different syntax,\nsemantics, and feature sets, for doing the same thing?\n\n"},{"id":"295116","messageId":"ejtbph$tod$1@sea.gmane.org","threadId":"43203","inReplyTo":"20061120224800.GF12285@fieldses.org","subject":"Re: [BUG] StGit removed git branch of the same name as StGit branch","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-11-20T22:57:16Z","receivedAt":"2006-11-20T22:57:16Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"J. Bruce Fields wrote:\n\n> On Mon, Nov 20, 2006 at 11:37:54PM +0100, Jakub Narebski wrote:\n>> J. Bruce Fields wrote:\n\n>>> The idea I guess was to make it possible to use stgit (and only stgit)\n>>> for everything, and never type a git command.  It might have been better\n>>> to make stgit only manage patch series, and admit that people should use\n>>> git for the rest.  Then it might work more like you expect.\n>> \n>> Yes, I expected to use StGit as a kind of preprocessing (branch preparation)\n>> for git.\n> \n> The multiple-porcelains idea seems like a mistake to me--it'd be fine if\n> you're just adding new features on the side, but who wants to learn\n> entirely different sets of commands, with subtly different syntax,\n> semantics, and feature sets, for doing the same thing?\n\nI don't think so. StGit seems that way because it mainly adds new feature:\npatch management. But it can be used both as standalone SCM (like Quilt),\nor as a tool to manage patches in branch (rebase/cherry-pick on steroids).\n\n-- \nJakub Narebski\nWarsaw, Poland\nShadeHawk on #git\n\n"},{"id":"294373","messageId":"87y7q5y8s6.wl%cworth@cworth.org","threadId":"43203","inReplyTo":"ejtbph$tod$1@sea.gmane.org","subject":"Re: [BUG] StGit removed git branch of the same name as StGit branch","fromName":"Carl Worth","fromEmail":"cworth@cworth.org","sentAt":"2006-11-20T23:53:45Z","receivedAt":"2006-11-20T23:53:45Z","isPatch":false,"sender":{"key":"cworth@cworth.org","avatar":"https://gravatar.com/avatar/3746dc28cde609bdbd7f939058356e7e2bbd16d21e32274df0725eb3d998bc5b?d=mp&s=160"},"body":"On Mon, 20 Nov 2006 23:57:16 +0100, Jakub Narebski wrote:\n> > The multiple-porcelains idea seems like a mistake to me--it'd be fine if\n> > you're just adding new features on the side, but who wants to learn\n> > entirely different sets of commands, with subtly different syntax,\n> > semantics, and feature sets, for doing the same thing?\n> \n> I don't think so. StGit seems that way because it mainly adds new feature:\n> patch management. But it can be used both as standalone SCM (like Quilt),\n> or as a tool to manage patches in branch (rebase/cherry-pick on steroids).\n\nFrom my inspection, StGit works just fine in its \"standalone SCM\"\nrole, but falls over somewhat if using it as an additional tool\nalongside git itself for a few reasons:\n\n* There's a two-world-view problem with extra commands just to\n  translate back and forth (assimilate, commit, uncommit, etc.)\n\n* The new references that StGit introduces can lead to collisions, (it\n  happened to me anyway---I ended up having to rm -r .git/refs/bases\n  or whatever just to make the ambiguity go away and let me get work\n  done with git again).\n\nSo, for use as something separate from git, StGit might be just\nfine. Otherwise, for being just another tool for users of \"git\" the\ncommand-line tool, I agree that the current StGit design is a mistake.\n\nI'd much prefer to have a minimal set of new \"git\" sub-commands that\nintroduce the new functionality without a separate command namespace\nand several sub-commands with redundant functionality compared to\nexisting git sub-commands.\n\n-Carl\n"},{"id":"295886","messageId":"b0943d9e0611210126x493848d9xae006af835fc62c7@mail.gmail.com","threadId":"43203","inReplyTo":"200611202201.45521.jnareb@gmail.com","subject":"Re: [BUG] StGit removed git branch of the same name as StGit branch","fromName":"Catalin Marinas","fromEmail":"catalin.marinas@gmail.com","sentAt":"2006-11-21T09:26:52Z","receivedAt":"2006-11-21T09:26:52Z","isPatch":false,"sender":{"key":"catalin.marinas@gmail.com","avatar":null},"body":"On 20/11/06, Jakub Narebski <jnareb@gmail.com> wrote:\n> I have used StGit (wonderfull tool) to manage patches on git branch\n> gitweb/web. Unfortunately, I have named stg branch the same as git\n> branch.\n\nWell, there is no such thing as a stg branch. StGIT shares the branch\nstructure with GIT and the \"branch\" command works on the whole GIT\nbranch, with some additional things for handling the patches. Once a\nGIT branch is StGIT-initialised (either by being created with \"stg\nbranch\" or by \"stg init\") it will always remain a StGIT branch and get\na reference in refs/bases/.\n\n> When removing stg branch (I wanted to remove\n> heads/base/gitweb/web) using \"stg branch --delete gitweb/web\" it\n> deleted also git branch when I wanted to remove only the StGit managed\n> indicator. Fortunately I was able to recover the branch from reflog, as\n> StGit didn't delete reflog with deletion of git branch.\n>\n> Perhaps that is correct behavior... but certainly unexpected.\n\nI've never thought anyone would see a different meaing for the\n\"branch\" command. What you wanted to do was the reverse of the \"init\"\ncommand. Maybe something like \"uninit\" or a \"--uninit\" option to\n\"branch\".\n\n-- \n"},{"id":"297279","messageId":"tnx64d9xgex.fsf@arm.com","threadId":"43203","inReplyTo":"87y7q5y8s6.wl%cworth@cworth.org","subject":"Re: [BUG] StGit removed git branch of the same name as StGit branch","fromName":"Catalin Marinas","fromEmail":"catalin.marinas@arm.com","sentAt":"2006-11-21T10:06:30Z","receivedAt":"2006-11-21T10:06:30Z","isPatch":false,"sender":{"key":"catalin.marinas@arm.com","avatar":null},"body":"Carl Worth <cworth@cworth.org> wrote:\n> From my inspection, StGit works just fine in its \"standalone SCM\"\n> role, but falls over somewhat if using it as an additional tool\n> alongside git itself for a few reasons:\n>\n> * There's a two-world-view problem with extra commands just to\n>   translate back and forth (assimilate, commit, uncommit, etc.)\n\nI initially opposed to commands like \"uncommit\" since people shouldn't\nmodify the history. I currently see the assimilate/uncommit only as a\nway to fix mistakes of committing with GIT when you actually wanted an\nStGIT patch. I rarely use these commands.\n\nI use StGIT in maintainer mode as well and the only additional command\nis \"commit\" to permanently store the patches and freeze the history\nbefore pushing the changes to the public repository.\n\n> * The new references that StGit introduces can lead to collisions, (it\n>   happened to me anyway---I ended up having to rm -r .git/refs/bases\n>   or whatever just to make the ambiguity go away and let me get work\n>   done with git again).\n\nI find the refs/bases useful, for example when invoking gitk I can see\nwhere the base of the stack is. You can also use the base in plain\n\"git\" commands.\n\n> So, for use as something separate from git, StGit might be just\n> fine. Otherwise, for being just another tool for users of \"git\" the\n> command-line tool, I agree that the current StGit design is a\n> mistake.\n\nI personally don't like mixing StGIT and GIT commands unnecessarily,\nunless there is no other option (like \"git log\" since \"stg log\" has a\ndifferent meaning). There are people (including me) who use StGIT\nalmost exclusively, without relying on the GIT commands. That's why I\nduplicated some of the GIT commands.\n\nI don't think there is a problem with StGIT's design but rather a\nworkflow one (which neither GIT nor StGIT have clearly documented it,\nyou can see many people writing their own scripts to do the things\nthey need). For example, I thought \"uncommit\" only as a way to fix a\nmistaken commit but someone posted a bug report that it wasn't\npossible to uncommit hundreds of commits and going over merges. This\nwas not the intended behaviour but you can't force people not to be\ninventive :-).\n\n> I'd much prefer to have a minimal set of new \"git\" sub-commands that\n> introduce the new functionality without a separate command namespace\n> and several sub-commands with redundant functionality compared to\n> existing git sub-commands.\n\nI find the GIT command space to be pretty cramped and without a clear\nseparation between low-level commands and porcelain ones. Adding even\nmore functionality for patch management would scare beginners even\nmore (had the GNU Arch experience where you need a steep learning\ncurve).\n\n-- \n"},{"id":"294656","messageId":"ejuj2a$2ot$1@sea.gmane.org","threadId":"43203","inReplyTo":"b0943d9e0611210126x493848d9xae006af835fc62c7@mail.gmail.com","subject":"Re: [BUG] StGit removed git branch of the same name as StGit branch","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-11-21T10:07:31Z","receivedAt":"2006-11-21T10:07:31Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Catalin Marinas wrote:\n\n> On 20/11/06, Jakub Narebski <jnareb@gmail.com> wrote:\n\n>> When removing stg branch (I wanted to remove\n>> heads/base/gitweb/web) using \"stg branch --delete gitweb/web\" it\n>> deleted also git branch when I wanted to remove only the StGit managed\n>> indicator. Fortunately I was able to recover the branch from reflog, as\n>> StGit didn't delete reflog with deletion of git branch.\n>>\n>> Perhaps that is correct behavior... but certainly unexpected.\n> \n> I've never thought anyone would see a different meaing for the\n> \"branch\" command. What you wanted to do was the reverse of the \"init\"\n> command. Maybe something like \"uninit\" or a \"--uninit\" option to\n> \"branch\".\n\nYes, that is what I wanted. \"stg branch --unmanage\" or something like that.\n\nBy the way, why \"stg branch --delete\" doesn't remove reflog? Not that I'm\ncomplaining, because it sure saved some work when resurrecting branch, and\nI didn't loose reflog info.\n-- \nJakub Narebski\nWarsaw, Poland\nShadeHawk on #git\n\n"},{"id":"297226","messageId":"tnx1wnxxfu3.fsf@arm.com","threadId":"43203","inReplyTo":"ejuj2a$2ot$1@sea.gmane.org","subject":"Re: [BUG] StGit removed git branch of the same name as StGit branch","fromName":"Catalin Marinas","fromEmail":"catalin.marinas@arm.com","sentAt":"2006-11-21T10:19:00Z","receivedAt":"2006-11-21T10:19:00Z","isPatch":false,"sender":{"key":"catalin.marinas@arm.com","avatar":null},"body":"Jakub Narebski <jnareb@gmail.com> wrote:\n> Catalin Marinas wrote:\n>> I've never thought anyone would see a different meaing for the\n>> \"branch\" command. What you wanted to do was the reverse of the \"init\"\n>> command. Maybe something like \"uninit\" or a \"--uninit\" option to\n>> \"branch\".\n>\n> Yes, that is what I wanted. \"stg branch --unmanage\" or something\n> like that.\n\nI'll put it on my to-do list.\n\n> By the way, why \"stg branch --delete\" doesn't remove reflog? Not that I'm\n> complaining, because it sure saved some work when resurrecting branch, and\n> I didn't loose reflog info.\n\nReflogs came into GIT after the StGIT branch command and never looked\nat them in detail. And maybe it should not touch the reflog info,\nespecially for situations like this, unless GIT has a mechanism for a\ntrash bin (StGIT has one for patches - .git/patches/<branch>/trash/ -\nbut undocumented)\n\n-- \n"},{"id":"295913","messageId":"200611211148.30937.jnareb@gmail.com","threadId":"43203","inReplyTo":"tnx1wnxxfu3.fsf@arm.com","subject":"Re: [BUG] StGit removed git branch of the same name as StGit branch","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-11-21T10:48:30Z","receivedAt":"2006-11-21T10:48:30Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Catalin Marinas wrote:\n> Jakub Narebski <jnareb@gmail.com> wrote:\n\n>> By the way, why \"stg branch --delete\" doesn't remove reflog? Not that I'm\n>> complaining, because it sure saved some work when resurrecting branch, and\n>> I didn't loose reflog info.\n> \n> Reflogs came into GIT after the StGIT branch command and never looked\n> at them in detail. And maybe it should not touch the reflog info,\n> especially for situations like this, unless GIT has a mechanism for a\n> trash bin (StGIT has one for patches - .git/patches/<branch>/trash/ -\n> but undocumented)\n\nWell, I'm asking because \"git branch -D\" deletes also reflog. So I'm\nworrying if StGit works with packed refs (although one usually do not\npack branches/heads, only tags).\n-- \nJakub Narebski\n"},{"id":"294026","messageId":"20061121105632.GA17021@diana.vm.bytemark.co.uk","threadId":"43203","inReplyTo":"tnx64d9xgex.fsf@arm.com","subject":"Re: [BUG] StGit removed git branch of the same name as StGit branch","fromName":"Karl Hasselström","fromEmail":"kha@treskal.com","sentAt":"2006-11-21T10:56:32Z","receivedAt":"2006-11-21T10:56:32Z","isPatch":false,"sender":{"key":"kha@treskal.com","avatar":"https://gravatar.com/avatar/f0120c734b5279b345075a28521e1ac66acb20c9913ffe9bf6ae97e53f7f3f13?d=mp&s=160"},"body":"On 2006-11-21 10:06:30 +0000, Catalin Marinas wrote:\n\n> I personally don't like mixing StGIT and GIT commands unnecessarily,\n> unless there is no other option (like \"git log\" since \"stg log\" has\n> a different meaning). There are people (including me) who use StGIT\n> almost exclusively, without relying on the GIT commands. That's why\n> I duplicated some of the GIT commands.\n\nI, on the other hand, tend to freely mix git and stgit commands. For\nexample, I often commit things with the git emacs modes, but I do all\nmy merging with stgit.\n\nThis is all very straightforward once you learn that stgit just adds a\nthin layer of extra metadata on top of git. All the really valuable\ninformation is stored in git; what stgit adds is e.g. convenient names\nfor patches, and the distinction between commits that are patches and\ncommits that aren't (so that you won't edit supposedly immutable\nhistory by mistake). To me, stgit is a convenient way to edit git\nhistory, which happens to make patchset maintenance very easy.\n\nHowever, interoperability could be much better than it is. I think\nstgit maintains too much extra metadata on top of what git already\nhas.\n\n-- \nKarl Hasselström, kha@treskal.com\n"}]}