* [BUG] StGit removed git branch of the same name as StGit branch @ 2006-11-20 21:01 Jakub Narebski 2006-11-20 21:08 ` Junio C Hamano ` (2 more replies) 0 siblings, 3 replies; 13+ messages in thread From: Jakub Narebski @ 2006-11-20 21:01 UTC (permalink / raw) To: Catalin Marinas; +Cc: git I have used StGit (wonderfull tool) to manage patches on git branch gitweb/web. Unfortunately, I have named stg branch the same as git branch. When removing stg branch (I wanted to remove heads/base/gitweb/web) using "stg branch --delete gitweb/web" it deleted also git branch when I wanted to remove only the StGit managed indicator. Fortunately I was able to recover the branch from reflog, as StGit didn't delete reflog with deletion of git branch. Perhaps that is correct behavior... but certainly unexpected. Stacked GIT 0.11 git version 1.4.3.4 Python version 2.4.3 (#1, Jun 13 2006, 16:41:18) [GCC 4.0.2 20051125 (Red Hat 4.0.2-8)] -- Jakub Narebski ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [BUG] StGit removed git branch of the same name as StGit branch 2006-11-20 21:01 [BUG] StGit removed git branch of the same name as StGit branch Jakub Narebski @ 2006-11-20 21:08 ` Junio C Hamano 2006-11-20 22:28 ` J. Bruce Fields 2006-11-21 9:26 ` Catalin Marinas 2 siblings, 0 replies; 13+ messages in thread From: Junio C Hamano @ 2006-11-20 21:08 UTC (permalink / raw) To: Jakub Narebski; +Cc: git Jakub Narebski <jnareb@gmail.com> writes: > I have used StGit (wonderfull tool) to manage patches on git branch > gitweb/web. Unfortunately, I have named stg branch the same as git > branch. When removing stg branch (I wanted to remove > heads/base/gitweb/web) using "stg branch --delete gitweb/web" it > deleted also git branch when I wanted to remove only the StGit managed > indicator. Fortunately I was able to recover the branch from reflog, as > StGit didn't delete reflog with deletion of git branch. > > Perhaps that is correct behavior... but certainly unexpected. I am also a novice who recently started appreciating the convenience of StGIT. I _think_ the usage StGIT expect us to follow is to run "stg clean" to make the series empty, and not worry about leftover refs/bases/ at all, but I may well be mistaken. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [BUG] StGit removed git branch of the same name as StGit branch 2006-11-20 21:01 [BUG] StGit removed git branch of the same name as StGit branch Jakub Narebski 2006-11-20 21:08 ` Junio C Hamano @ 2006-11-20 22:28 ` J. Bruce Fields 2006-11-20 22:37 ` Jakub Narebski 2006-11-21 9:26 ` Catalin Marinas 2 siblings, 1 reply; 13+ messages in thread From: J. Bruce Fields @ 2006-11-20 22:28 UTC (permalink / raw) To: Jakub Narebski; +Cc: Catalin Marinas, git On Mon, Nov 20, 2006 at 10:01:44PM +0100, Jakub Narebski wrote: > I have used StGit (wonderfull tool) to manage patches on git branch > gitweb/web. Unfortunately, I have named stg branch the same as git > branch. When removing stg branch (I wanted to remove > heads/base/gitweb/web) using "stg branch --delete gitweb/web" it > deleted also git branch when I wanted to remove only the StGit managed > indicator. You probably actually had to "stg branch --delete --force", didn't you? What you want is "stg commit". > Perhaps that is correct behavior... but certainly unexpected. I think "stg branch --delete" is pretty clearly named and documented.... The idea I guess was to make it possible to use stgit (and only stgit) for everything, and never type a git command. It might have been better to make stgit only manage patch series, and admit that people should use git for the rest. Then it might work more like you expect. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [BUG] StGit removed git branch of the same name as StGit branch 2006-11-20 22:28 ` J. Bruce Fields @ 2006-11-20 22:37 ` Jakub Narebski 2006-11-20 22:48 ` J. Bruce Fields 0 siblings, 1 reply; 13+ messages in thread From: Jakub Narebski @ 2006-11-20 22:37 UTC (permalink / raw) To: git J. Bruce Fields wrote: > On Mon, Nov 20, 2006 at 10:01:44PM +0100, Jakub Narebski wrote: > >> I have used StGit (wonderfull tool) to manage patches on git branch >> gitweb/web. Unfortunately, I have named stg branch the same as git >> branch. When removing stg branch (I wanted to remove >> heads/base/gitweb/web) using "stg branch --delete gitweb/web" it >> deleted also git branch when I wanted to remove only the StGit managed >> indicator. > > You probably actually had to "stg branch --delete --force", didn't you? Nope. "stg branch --delete gitweb/web" > What you want is "stg commit". No. Whole stack was committed, I wanted only get rid of heads/base/gitweb/web (of StGit managed branch indicator). >> Perhaps that is correct behavior... but certainly unexpected. > > I think "stg branch --delete" is pretty clearly named and documented.... I thought it delete only stg branch, refs/base/gitwbe/web, and not refs/heads/gitweb/web. > The idea I guess was to make it possible to use stgit (and only stgit) > for everything, and never type a git command. It might have been better > to make stgit only manage patch series, and admit that people should use > git for the rest. Then it might work more like you expect. Yes, I expected to use StGit as a kind of preprocessing (branch preparation) for git. -- Jakub Narebski Warsaw, Poland ShadeHawk on #git ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [BUG] StGit removed git branch of the same name as StGit branch 2006-11-20 22:37 ` Jakub Narebski @ 2006-11-20 22:48 ` J. Bruce Fields 2006-11-20 22:57 ` Jakub Narebski 0 siblings, 1 reply; 13+ messages in thread From: J. Bruce Fields @ 2006-11-20 22:48 UTC (permalink / raw) To: Jakub Narebski; +Cc: git On Mon, Nov 20, 2006 at 11:37:54PM +0100, Jakub Narebski wrote: > J. Bruce Fields wrote: > > You probably actually had to "stg branch --delete --force", didn't you? > > Nope. "stg branch --delete gitweb/web" > > > What you want is "stg commit". > > No. Whole stack was committed, I wanted only get rid of > heads/base/gitweb/web (of StGit managed branch indicator). Oh, right, got it. > > The idea I guess was to make it possible to use stgit (and only stgit) > > for everything, and never type a git command. It might have been better > > to make stgit only manage patch series, and admit that people should use > > git for the rest. Then it might work more like you expect. > > Yes, I expected to use StGit as a kind of preprocessing (branch preparation) > for git. The multiple-porcelains idea seems like a mistake to me--it'd be fine if you're just adding new features on the side, but who wants to learn entirely different sets of commands, with subtly different syntax, semantics, and feature sets, for doing the same thing? ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [BUG] StGit removed git branch of the same name as StGit branch 2006-11-20 22:48 ` J. Bruce Fields @ 2006-11-20 22:57 ` Jakub Narebski 2006-11-20 23:53 ` Carl Worth 0 siblings, 1 reply; 13+ messages in thread From: Jakub Narebski @ 2006-11-20 22:57 UTC (permalink / raw) To: git J. Bruce Fields wrote: > On Mon, Nov 20, 2006 at 11:37:54PM +0100, Jakub Narebski wrote: >> J. Bruce Fields wrote: >>> The idea I guess was to make it possible to use stgit (and only stgit) >>> for everything, and never type a git command. It might have been better >>> to make stgit only manage patch series, and admit that people should use >>> git for the rest. Then it might work more like you expect. >> >> Yes, I expected to use StGit as a kind of preprocessing (branch preparation) >> for git. > > The multiple-porcelains idea seems like a mistake to me--it'd be fine if > you're just adding new features on the side, but who wants to learn > entirely different sets of commands, with subtly different syntax, > semantics, and feature sets, for doing the same thing? I don't think so. StGit seems that way because it mainly adds new feature: patch management. But it can be used both as standalone SCM (like Quilt), or as a tool to manage patches in branch (rebase/cherry-pick on steroids). -- Jakub Narebski Warsaw, Poland ShadeHawk on #git ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [BUG] StGit removed git branch of the same name as StGit branch 2006-11-20 22:57 ` Jakub Narebski @ 2006-11-20 23:53 ` Carl Worth 2006-11-21 10:06 ` Catalin Marinas 0 siblings, 1 reply; 13+ messages in thread From: Carl Worth @ 2006-11-20 23:53 UTC (permalink / raw) To: Jakub Narebski; +Cc: git [-- Attachment #1: Type: text/plain, Size: 1578 bytes --] On Mon, 20 Nov 2006 23:57:16 +0100, Jakub Narebski wrote: > > The multiple-porcelains idea seems like a mistake to me--it'd be fine if > > you're just adding new features on the side, but who wants to learn > > entirely different sets of commands, with subtly different syntax, > > semantics, and feature sets, for doing the same thing? > > I don't think so. StGit seems that way because it mainly adds new feature: > patch management. But it can be used both as standalone SCM (like Quilt), > or as a tool to manage patches in branch (rebase/cherry-pick on steroids). From my inspection, StGit works just fine in its "standalone SCM" role, but falls over somewhat if using it as an additional tool alongside git itself for a few reasons: * There's a two-world-view problem with extra commands just to translate back and forth (assimilate, commit, uncommit, etc.) * The new references that StGit introduces can lead to collisions, (it happened to me anyway---I ended up having to rm -r .git/refs/bases or whatever just to make the ambiguity go away and let me get work done with git again). So, for use as something separate from git, StGit might be just fine. Otherwise, for being just another tool for users of "git" the command-line tool, I agree that the current StGit design is a mistake. I'd much prefer to have a minimal set of new "git" sub-commands that introduce the new functionality without a separate command namespace and several sub-commands with redundant functionality compared to existing git sub-commands. -Carl [-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [BUG] StGit removed git branch of the same name as StGit branch 2006-11-20 23:53 ` Carl Worth @ 2006-11-21 10:06 ` Catalin Marinas 2006-11-21 10:56 ` Karl Hasselström 0 siblings, 1 reply; 13+ messages in thread From: Catalin Marinas @ 2006-11-21 10:06 UTC (permalink / raw) To: Carl Worth; +Cc: Jakub Narebski, git Carl Worth <cworth@cworth.org> wrote: > From my inspection, StGit works just fine in its "standalone SCM" > role, but falls over somewhat if using it as an additional tool > alongside git itself for a few reasons: > > * There's a two-world-view problem with extra commands just to > translate back and forth (assimilate, commit, uncommit, etc.) I initially opposed to commands like "uncommit" since people shouldn't modify the history. I currently see the assimilate/uncommit only as a way to fix mistakes of committing with GIT when you actually wanted an StGIT patch. I rarely use these commands. I use StGIT in maintainer mode as well and the only additional command is "commit" to permanently store the patches and freeze the history before pushing the changes to the public repository. > * The new references that StGit introduces can lead to collisions, (it > happened to me anyway---I ended up having to rm -r .git/refs/bases > or whatever just to make the ambiguity go away and let me get work > done with git again). I find the refs/bases useful, for example when invoking gitk I can see where the base of the stack is. You can also use the base in plain "git" commands. > So, for use as something separate from git, StGit might be just > fine. Otherwise, for being just another tool for users of "git" the > command-line tool, I agree that the current StGit design is a > mistake. I personally don't like mixing StGIT and GIT commands unnecessarily, unless there is no other option (like "git log" since "stg log" has a different meaning). There are people (including me) who use StGIT almost exclusively, without relying on the GIT commands. That's why I duplicated some of the GIT commands. I don't think there is a problem with StGIT's design but rather a workflow one (which neither GIT nor StGIT have clearly documented it, you can see many people writing their own scripts to do the things they need). For example, I thought "uncommit" only as a way to fix a mistaken commit but someone posted a bug report that it wasn't possible to uncommit hundreds of commits and going over merges. This was not the intended behaviour but you can't force people not to be inventive :-). > I'd much prefer to have a minimal set of new "git" sub-commands that > introduce the new functionality without a separate command namespace > and several sub-commands with redundant functionality compared to > existing git sub-commands. I find the GIT command space to be pretty cramped and without a clear separation between low-level commands and porcelain ones. Adding even more functionality for patch management would scare beginners even more (had the GNU Arch experience where you need a steep learning curve). -- ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [BUG] StGit removed git branch of the same name as StGit branch 2006-11-21 10:06 ` Catalin Marinas @ 2006-11-21 10:56 ` Karl Hasselström 0 siblings, 0 replies; 13+ messages in thread From: Karl Hasselström @ 2006-11-21 10:56 UTC (permalink / raw) To: Catalin Marinas; +Cc: Carl Worth, Jakub Narebski, git On 2006-11-21 10:06:30 +0000, Catalin Marinas wrote: > I personally don't like mixing StGIT and GIT commands unnecessarily, > unless there is no other option (like "git log" since "stg log" has > a different meaning). There are people (including me) who use StGIT > almost exclusively, without relying on the GIT commands. That's why > I duplicated some of the GIT commands. I, on the other hand, tend to freely mix git and stgit commands. For example, I often commit things with the git emacs modes, but I do all my merging with stgit. This is all very straightforward once you learn that stgit just adds a thin layer of extra metadata on top of git. All the really valuable information is stored in git; what stgit adds is e.g. convenient names for patches, and the distinction between commits that are patches and commits that aren't (so that you won't edit supposedly immutable history by mistake). To me, stgit is a convenient way to edit git history, which happens to make patchset maintenance very easy. However, interoperability could be much better than it is. I think stgit maintains too much extra metadata on top of what git already has. -- Karl Hasselström, kha@treskal.com ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [BUG] StGit removed git branch of the same name as StGit branch 2006-11-20 21:01 [BUG] StGit removed git branch of the same name as StGit branch Jakub Narebski 2006-11-20 21:08 ` Junio C Hamano 2006-11-20 22:28 ` J. Bruce Fields @ 2006-11-21 9:26 ` Catalin Marinas 2006-11-21 10:07 ` Jakub Narebski 2 siblings, 1 reply; 13+ messages in thread From: Catalin Marinas @ 2006-11-21 9:26 UTC (permalink / raw) To: Jakub Narebski; +Cc: git On 20/11/06, Jakub Narebski <jnareb@gmail.com> wrote: > I have used StGit (wonderfull tool) to manage patches on git branch > gitweb/web. Unfortunately, I have named stg branch the same as git > branch. Well, there is no such thing as a stg branch. StGIT shares the branch structure with GIT and the "branch" command works on the whole GIT branch, with some additional things for handling the patches. Once a GIT branch is StGIT-initialised (either by being created with "stg branch" or by "stg init") it will always remain a StGIT branch and get a reference in refs/bases/. > When removing stg branch (I wanted to remove > heads/base/gitweb/web) using "stg branch --delete gitweb/web" it > deleted also git branch when I wanted to remove only the StGit managed > indicator. Fortunately I was able to recover the branch from reflog, as > StGit didn't delete reflog with deletion of git branch. > > Perhaps that is correct behavior... but certainly unexpected. I've never thought anyone would see a different meaing for the "branch" command. What you wanted to do was the reverse of the "init" command. Maybe something like "uninit" or a "--uninit" option to "branch". -- ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [BUG] StGit removed git branch of the same name as StGit branch 2006-11-21 9:26 ` Catalin Marinas @ 2006-11-21 10:07 ` Jakub Narebski 2006-11-21 10:19 ` Catalin Marinas 0 siblings, 1 reply; 13+ messages in thread From: Jakub Narebski @ 2006-11-21 10:07 UTC (permalink / raw) To: git Catalin Marinas wrote: > On 20/11/06, Jakub Narebski <jnareb@gmail.com> wrote: >> When removing stg branch (I wanted to remove >> heads/base/gitweb/web) using "stg branch --delete gitweb/web" it >> deleted also git branch when I wanted to remove only the StGit managed >> indicator. Fortunately I was able to recover the branch from reflog, as >> StGit didn't delete reflog with deletion of git branch. >> >> Perhaps that is correct behavior... but certainly unexpected. > > I've never thought anyone would see a different meaing for the > "branch" command. What you wanted to do was the reverse of the "init" > command. Maybe something like "uninit" or a "--uninit" option to > "branch". Yes, that is what I wanted. "stg branch --unmanage" or something like that. By the way, why "stg branch --delete" doesn't remove reflog? Not that I'm complaining, because it sure saved some work when resurrecting branch, and I didn't loose reflog info. -- Jakub Narebski Warsaw, Poland ShadeHawk on #git ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [BUG] StGit removed git branch of the same name as StGit branch 2006-11-21 10:07 ` Jakub Narebski @ 2006-11-21 10:19 ` Catalin Marinas 2006-11-21 10:48 ` Jakub Narebski 0 siblings, 1 reply; 13+ messages in thread From: Catalin Marinas @ 2006-11-21 10:19 UTC (permalink / raw) To: Jakub Narebski; +Cc: git Jakub Narebski <jnareb@gmail.com> wrote: > Catalin Marinas wrote: >> I've never thought anyone would see a different meaing for the >> "branch" command. What you wanted to do was the reverse of the "init" >> command. Maybe something like "uninit" or a "--uninit" option to >> "branch". > > Yes, that is what I wanted. "stg branch --unmanage" or something > like that. I'll put it on my to-do list. > By the way, why "stg branch --delete" doesn't remove reflog? Not that I'm > complaining, because it sure saved some work when resurrecting branch, and > I didn't loose reflog info. Reflogs came into GIT after the StGIT branch command and never looked at them in detail. And maybe it should not touch the reflog info, especially for situations like this, unless GIT has a mechanism for a trash bin (StGIT has one for patches - .git/patches/<branch>/trash/ - but undocumented) -- ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [BUG] StGit removed git branch of the same name as StGit branch 2006-11-21 10:19 ` Catalin Marinas @ 2006-11-21 10:48 ` Jakub Narebski 0 siblings, 0 replies; 13+ messages in thread From: Jakub Narebski @ 2006-11-21 10:48 UTC (permalink / raw) To: Catalin Marinas; +Cc: git Catalin Marinas wrote: > Jakub Narebski <jnareb@gmail.com> wrote: >> By the way, why "stg branch --delete" doesn't remove reflog? Not that I'm >> complaining, because it sure saved some work when resurrecting branch, and >> I didn't loose reflog info. > > Reflogs came into GIT after the StGIT branch command and never looked > at them in detail. And maybe it should not touch the reflog info, > especially for situations like this, unless GIT has a mechanism for a > trash bin (StGIT has one for patches - .git/patches/<branch>/trash/ - > but undocumented) Well, I'm asking because "git branch -D" deletes also reflog. So I'm worrying if StGit works with packed refs (although one usually do not pack branches/heads, only tags). -- Jakub Narebski ^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2006-11-21 10:56 UTC | newest] Thread overview: 13+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2006-11-20 21:01 [BUG] StGit removed git branch of the same name as StGit branch Jakub Narebski 2006-11-20 21:08 ` Junio C Hamano 2006-11-20 22:28 ` J. Bruce Fields 2006-11-20 22:37 ` Jakub Narebski 2006-11-20 22:48 ` J. Bruce Fields 2006-11-20 22:57 ` Jakub Narebski 2006-11-20 23:53 ` Carl Worth 2006-11-21 10:06 ` Catalin Marinas 2006-11-21 10:56 ` Karl Hasselström 2006-11-21 9:26 ` Catalin Marinas 2006-11-21 10:07 ` Jakub Narebski 2006-11-21 10:19 ` Catalin Marinas 2006-11-21 10:48 ` Jakub Narebski
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).