Subject: Re: Why Is There No Bug Tracker And Why Are Patches Sent Instead Of Pull Requests

From: Neal Kreitzinger <[email-masked]>
Date: Thu, 01 Mar 2012 22:03:37 -0600

On 3/1/2012 11:10 AM, Junio C Hamano wrote:
>
> Something based on the idea mentioned in Ævar's message (downstream in
> this thread) to seamlessly integrate with the e-mail traffic might have a
> chance to succeed.  I also think the integration must be two-way for it to
> be useful.  A summary of "new issues untouched for N weeks" and another
> "older issues unclosed for N weeks" periodically sent here, or something.
>
> Perhaps collecting messages based on a handful of simple heuristics like
> "A message mentioned the keyword 'bug', but no In-Reply-To for it from any
> list regulars came in two weeks" might be a good place to start.
>
Why don't you just use git for your bug-tracking?  With commit-messages, 
annotated-tags, signed-tags, branches, branch-descriptions, git-notes, 
submodules, sha-1's, send-email, patches, hooks, etc., not to mention 
all-kinds-of-files you can commit (screen-shots, bug-reports, etc.) it 
seems you have more than enough pieces to build a bug-tracker with git. 
  For example:

Some Ideas:

(Setup)
   - The bug tracker repo could be a one-way mirror of git.git.  That 
way the bug-reports are literally tied to the source but don't clutter 
git.git.
   - Create a bug tracking branch parallel to each release branch.
   - Create a bug-branch off-of the buggy-commit and do the fix and make 
the bug-tracking-admin updates around the bug branch.

(Submitting Bugs)
   - Post-receive hook to assess new commits and send formatted email to 
mailing list, ie. new-bug push sends bug email to mailing list.
   - The mailing list creates "bug-report-commits" kind-of-like Junio 
mentioned above so the mailing list also feeding into it.
   - Bugs can be submitted directly to the bug repo and replicated to 
the mailing list via post-receive hook, and bugs can be submitted via 
the mailing list and automatically "forwarded" to the bug repo as "bug 
report" refs.
   - Screenshots could be a submodule for "large file" optimization.

(Issue-Numbers)
   - The sha-1 of the originating bug-report could be its issue-id.
   - Tag the commit with a "bug tag".  The sha-1 of the bug-tag could be 
the issue-id.
   - Calculate issue number from commit-counting to assign unique numbers.
   - The sha-1 of the buggy-commit could be the issue-id.

(Status Updates)
   - Use git-notes to update issue status.
   - Use annotated-tags to update issue status.
   - Use commit-messages to update issue status (or a file in the commit).

(Reporting)
   - Interrogate bug-formatted refnames with wildcards to generate 
queries of whats going on.
   - Use gitk for ad hoc or pre-defined gui queries of what-you-want-to-see.
   - Use git time-machine commands to see how old stuff is or whats new.
   - have a bug-report-id.txt file that people just modify and commit 
and use git-annotate to see the history of that bug-report.

(Signoff)
   - Signed tags for authenticity.

(Standardization)
   - Git-commands or git-aliases or git-contrib-scripts to make sure 
people do-it-right (format names/messages/files correctly), ie. templates.
   - Commit hook snippet that detects bug branch format and brings up 
bug commit template.
   - Rebase hook snippet that doesn't allow bug branches to be rebased.

(Integration)
   - The bug tracking system becomes part of the release workflow, ie., 
bugs are only considered fixed when they graduate to an official release 
or something close.
   - The "bug" tracking system also tracks "enhancements" and they are 
integrated into new releases using that workflow.

(Concurrency control)
   - Concurrent bug-report updates merge-conflict.
   - If someone beat-you-to-it then you cherry-pick or rebase on top of 
them.

(Interfaces)
   - works from commandline
   - works with gitk, git-gui
   - works with gitweb

(Quality)
   - Do you really need the greatest commercial-bug-tracker "x" or 
opensource-bug-tracker "y" to meet your needs?  If you've done well with 
nothing then you probably don't need all the bells an whistles. 
Management-by-report is mainly for clueless managers who want to feel 
like they know whats going on, and to supervise people who 
don't-really-care.  Since git people are on-the-ground and know whats 
going on, and are highly motivated individuals you probably don't really 
need all that fluff.  I suspect you would already be using 
opensource-bug-tracker "y" if there was one you actually liked using.
   - There's probably someone on this list who thinks they can create a 
bug-tracker with git that's better-than-anything-else-out-there, and 
they're probably right.

(Intuitive)
   - If you know how to use git then you know how to use git bug-tracker.
   - If you don't know how to use git then you probably shouldn't be 
submitting bug reports.

(Open Source Reusability)
   - The git bug repo system can then be used by others internally as 
they apply that system to their own project's canonical repository to 
track their bugs internally.

Some-Stuff-You-Already-Know:

(Distributed)
   - clone, push, pull -- your using git.

(Reliability)
   - you're using git so you know its uncorrupted, and if it does go 
down just clone from someone else and verify the checksum.

(Support)
   - [email-masked]
   - If git.git is down there is not much point in bug-tracking it.

I've been wanting to do this internally for a whle, but I'm still 
learning the git scm part.  Some of the git technologies I listed above 
I haven't used yet so they may sound a bit off, but I think you can get 
the gist of it.

I think git people in general would be enthusiastic about this, and if 
so, that would be the one thing that truly distinguishes this proposal 
from the others ;-)  You could call the repo or system bug-git, 
git-err-done, or something like that.

v/r,
neal