-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Store issues as dedicated 'issues' branch of main project repo #9
Comments
See also #7. Using the project's branches allows issues to be live only on a specific branch. Your proposed method provides a single global store for the issues. Each method has advantages and disadvantages. |
@dspinellis, I wonder if this is a misinterpretation. I agree that issues should not be visible only in individual branches; the current work flows in github and gitlab (at least) supports issues that are specific only to a project as a whole, agnostic to any branches within it. I suggest that this could easily parallel GitHub (project) Pages and GitLab Pages, where the metadata (i.e., "not code") is stored in a specific branch that does not contain the actual code or content of the main project. For instance, consider this tree of branches and files:
I suggest that it is not difficult for the script to work in a separate branch than what is currently visible; if no other way, then this could use a A path-forward (to not break backward-compatibility) would be a failure-mechanism: if the needed infrastructure is not found in the current branch and directory, then change the "working directory" to the (This is a very interesting project!) |
I agree that typical workflows are designed so that issues apply to all branches. This can be easily accomplished by storing them in a separate repo. I find the idea of using a branch to use data that is completely different from that of the other branches (as is done in GitHub pages and is proposed in this issue) to be at odds with Git's design. As a result, working with such data is cumbersome, inefficient, and counter-intuitive. PS Thank you for your kind words. |
I agree in a sense with your dislike of separate branches, more-so for gh-pages than here. However, to me, the alternatives have their own disadvantages:
The "subdir of current" is obviously bad for issues, since that would produce different views of issues based on where you sit, as you stated earlier. The separate repo is always a safe backup, I think. The "separate branch" (as suggested) is greatly facilitated with worktrees, though, and I think greatly mitigates the problems of being cumbersome, inefficient, and counter-intuitive (with which I do not disagree). (When I learned about and started using worktrees, it made a huge impact on my dev-cycle. If you haven't worked with them before, I strongly recommend giving them a try, docs at atlassian and of course git-scm.) As an example, let's say the host@~/myrepo> git worktree add issues ./.issues
host@~/myrepo> find . -type f
./README.md
./.git/...
./.issues/issues/xx/xxxxxx...
./py/mycode.py
./py/helpersfuncs.py
./py/morefuncs.py and then all of the content your script expects is under Yet another option would be git submodules, which I think allow for "nesting" another repo entirely within the subdir of the current repo. That might be something more to your liking, though I still contend a separate branch in the same repo has its advantages. I don't use submodules, so I may have this completely wrong. But if I'm right and that sounds more agreeable to you, then I contend that the biggest effective difference between a submodule and a worktree is primarily built on preference, not technology. (On reading further, one problem with submodules is that a change to the submodule does not change the remote itself, so it's like a local-only fork of the other repo. Not quite right for here.) |
I was not aware of Git worktrees, hence my intense dislike for the complications and inefficiencies of maintaining issues in a separate branch. With a worktree the idea seems workable, doable, and aligned with Git's design. Thank you for pointing this out to me. Would you like to contribute the change via a pull request? This should include a paragraph in the documentation outlining the advantages and issues with each alternative approach. |
I'd be interested in working on both this issue and (perhaps separately) #27. I'll look into it. |
Btw github also uses From (my) dev experience perspective having issues in the same repository has significant pros:
As for possible contradiction to Git design, forgive my impertinence to quote W3C, that statement might be suitable:
|
I wrote my initial response two years ago. I've since become wiser and I also read about Git worktrees. I can now appreciate that a Git branch can also be a name for a completely separate set of files (rather than a genuine branch from the source code trunk) and that Git worktrees can be used to provide the required storage transparency and also to simplify the implementation and operation. |
(and I apologize for being completely unavailable since making that recommendation and offer, sorry @dspinellis ) |
Tried the recommendation and it seems to work. This is what I did:
if this is alright I can send a diff to |
Thank you @kaveman- for reviving this! I think we would like this to be an option (even the default) in |
sorry about the silence. couldn't find time to work on it. however, my teammate @sk-sajid is working on this and should be posting a diff real soon. |
What would it take to implement this system within a branch of the core/main repo of a project? I love the method of storing issues as text files and I was wondering whether it's advantageous or desirable to store and manage issues etc. separately to the project code...
Thoughts?
The text was updated successfully, but these errors were encountered: