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

Unexpected behavior in git-rev-list

From
PEPeter Eriksen <s022018@student.dtu.dk>
Date
Sep 18, 2005, 14:49 UTC
Message-ID
<20050918144931.GA9561@ebar091.ebar.dtu.dk>
Hello people,

There's something I don't quite understand about git-rev-list. After adding two files only one shows up with the --objects option.

I'm looking at commit e621a691e9bdbbe263ce34dd20458d9fbbf1a126 at
http://www.student.dtu.dk/~s022018/git/gitweb.cgi?p=recipes.git;a=summary
I can find the difference between the latest commit and it's parent:
> git diff HEAD^ HEAD
diff --git a/HS-Plugins/20050403/Recipe b/HS-Plugins/20050403/Recipe
new file mode 100644
--- /dev/null
+++ b/HS-Plugins/20050403/Recipe
@@ -0,0 +1,16 @@
 [snip]
diff --git a/HS-Plugins/20050403/Resources/Dependencies
b/HS-Plugins/20050403/Resources/Dependencies
new file mode 100644
--- /dev/null
+++ b/HS-Plugins/20050403/Resources/Dependencies
@@ -0,0 +1,5 @@
 [snip] 

Notice that it creates exactly two files.  Now I expect the folllowing
objects:

tree HS-Plugins
tree 20050403
blob Recipe
tree Resources
blob Dependencies

Now what I understand so far is that we can list all objects reachable
from the HEAD commit but not reachable from its parent commit by: 

> git-rev-list --objects ^HEAD^ HEAD
e621a691e9bdbbe263ce34dd20458d9fbbf1a126
609c26436053564e8df145b175d75df339b2318b
fe47bcfb8f47b55e3f6fabd2b2d188030fb57e1f HS-Plugins
6c8582e49c9f792f4f550fcf510432c84d24d868 20050403
808a68c33f87693c873f8f9c5f66c050a5ddc81e Recipe

My question is now: Why doesn't "git-rev-list --objects ^HEAD^ HEAD"
list the Dependencies blob?  I'm a bit confused.

Regards,

Peter
Next: Linus Torvalds
Message 1 of 9 in “Unexpected behavior in git-rev-list”
  1. Peter EriksenSep 18, 2005
  2. Linus TorvaldsSep 18, 2005
  3. Peter EriksenSep 18, 2005
  4. Peter EriksenSep 21, 2005
  5. Linus TorvaldsSep 21, 2005
  6. Junio C HamanoSep 21, 2005
  7. Linus TorvaldsSep 21, 2005
  8. Daniel BarkalowSep 22, 2005
  9. Linus TorvaldsSep 22, 2005

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.