Best method of detecting if list of commit refs is a parent

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm working on my 'Stick' git bug-tracking tool and am working on the
functionality to get a list of relevant bug-items at a specific point
in history.

Before I get into figuring out the 'best' way to do this, I thought
I'd at least get the simple single-item case of detecting if a
specific commit can be walked to from another commit... and that
doesn't seem to work as expected.

 git rev-list 0..Y --graph --abbrev-commit --abbrev=4
* Y
*   X
|\
| * d
| * c
| * b
* | E
* | D
* | C
* | B
|/
* A

For example... bug is reported to affect 'B'.. .user is at 'd' and is
wondering if said bug is listed as affecting him.
Command:
git rev-list B..d --graph ..  reports:
* d
* c
* b

... shouldn't this fail as the path from B to d doesn't really exist?
Or is there some better command or algorithm to use.
One mechanism that I thought 'could' work is to show the parents as
well and check that the last listed commit contains B ... but then I
can't take advantage of the no-output option for speed...

Now... into 'best method'...  given a list of N revisions with
associated bug-items, how would one determine the subset that revision
A is affected by.
Basically the bug storage mechanism is a directory structure w/ files
containing bug-items that can have one or more commit references....
to facilitate faster reports, a small database is used as a caching
mechanism to help create a distinct list of commits to worry about and
look up all the items associated w/ the status-processed commit...

Note: bug-items can mean anything from bug reported at X, bug-status
affected by X, or bug-closed at X  (at which case any previous items
related to a given bug could be ignored and not displayed... but
that's deeper implementation...).

I intend this bug tracker to be best-suited to git... but if other bug
trackers could have the mechanisms to provide this commit-tracking,
then those could be dropped in...
As for web interface idea... I'd probably have it "linked" to a
specific branch-head for its status-tracking............

-- 
Thomas Harning Jr.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux