git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git describe --contains doesn't work properly for a commit

From
MHMichal Hocko <mhocko@suse.cz>
Date
Feb 26, 2015, 14:23 UTC
Message-ID
<20150226142314.GC14878@dhcp22.suse.cz>
In-Reply-To
<20150226133534.GB14878@dhcp22.suse.cz>
On Thu 26-02-15 14:35:34, Michal Hocko wrote:
Show 8 quoted lines
> Hi,
> I have just encountered an old kernel git commit:
> commit c854363e80b49dd04a4de18ebc379eb8c8806674
> Author: Dave Chinner <david@fromorbit.com>
> Date:   Sat Feb 6 12:39:36 2010 +1100
> 
>     xfs: Use delayed write for inodes rather than async V2
> [...]
 
OK, I've managed to recreate this in a simple repo with 3 commits:
$ git log --format="%H %cd"
ab0efec2b697f2f9f864bb0e2cd77308d1f04561 Thu Feb 26 15:18:36 2015 +0100
d63972e4e4e7eda0444e56739ad09bfbc476b9bd Wed Feb 26 15:18:30 2014 +0100
108a0d5972fd2e5f25b2f38cfd2fee73031ff9d3 Thu Feb 26 14:57:29 2015 +0100

The commit in the middle was ammended to have committer date in the past. $ git describe --contains d63972e4e4e7eda0444e56739ad09bfbc476b9bd tag~1

but $ git describe --contains 108a0d5972fd2e5f25b2f38cfd2fee73031ff9d3 fatal: cannot describe '108a0d5972fd2e5f25b2f38cfd2fee73031ff9d3'

I guess this is the same issue reported previously here: http://git.661346.n2.nabble.com/git-describe-contains-fails-on-given-tree-td5448286.html

Can this be fixed somehow or it would lead to other kind of issues?
-- 
Michal Hocko
SUSE Labs
Previous: Michal HockoNext: Jeff King
Message 2 of 9 in “git describe --contains doesn't work properly for a commit”
  1. Michal HockoFeb 26, 2015
  2. Michal HockoFeb 26, 2015
  3. Jeff KingMar 4, 2015
  4. Michael J GruberMar 4, 2015
  5. Jeff KingMar 4, 2015
  6. Junio C HamanoMar 4, 2015
  7. Mike HommeyMar 4, 2015
  8. Jeff KingMar 5, 2015
  9. Junio C HamanoMar 5, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.