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

(no subject)

From
FLFIGADERE, LAURENT <laurent.figadere@atos.net>
Date
Sep 21, 2018, 08:43 UTC
Message-ID
<DB6PR0201MB245532DA30DD1EA21C3CF0FAE6120@DB6PR0201MB2455.eurprd02.prod.outlook.com>
Hi,
Coming back to you with some updates.
I understand finally interest of difference between 'from' and 'at'.
The point is: is it a bug if the 'git status' provide the origin/HEAD instead of HEAD SHA1? 
If you want a test case with screenshots, let me know.

Regards, Laurent

_____________________________________________
From: FIGADERE, LAURENT 
Sent: Thursday, September 20, 2018 3:26 PM
To: 'git@vger.kernel.org' <mailto:git@vger.kernel.org>
Subject: git status - difference between from and at
Hi guys,
Recently I used git on a top repository which integrated few other submodules.

The 'git submodule' command provides the right information on SHA1 used for each submodule. When I 'cd' into a submodule and run the command 'git status', I got this message: HEAD detached from 55846b8 nothing to commit, working tree clean Which was not the right checked out SHA1: it should be 2422597

I verified in a git log command, and I was using really the '2422597' SHA1 and not 55846b8.
The command: 
      git log --graph --oneline --abbrev-commit --all
Output:
*   55846b8 (tag: 01.050.002, origin/master, origin/HEAD, master) 
...
*   2422597 (HEAD)
...
After running :
	git co master
	cd ..
	git submodule update

I ran again git status command inside the submodule. This time, I got this message: HEAD detached at 2422597 nothing to commit, working tree clean

First question: do you confirm that 'HEAD detached FROM' provides the SHA1 of origin/HEAD? And 'HEAD detached AT' provides the SHA1 we are using : HEAD?

Second question: what is the goal of such information? Because from my opinion it can be difficult for end users to understand what SHA1 they are using in the submodule.

Thanks by advance for you feedbacks.

Regards, Laurent Figadere

Message 1 of 1 in “”
  1. FIGADERE, LAURENTSep 21, 2018

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.