Re: [PATCHv8 4/4] status: better advices when splitting a commit (during rebase -i)
- From
- konglu@minatec.inpg.fr <konglu@minatec.inpg.fr>
- Date
- Jun 8, 2012, 09:29 UTC
- Message-ID
- <20120608112945.Horde.I4abIHwdC4BP0cYJzywVAeA@webmail.minatec.grenoble-inp.fr>
- In-Reply-To
- <7vfwa9o3xo.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> a écrit :
Show 7 quoted lines
> Reading from git_path("HEAD") looked funny, as you may end up
> reading the "ref: refs/heads/master". Of course that would not
> compare equal to what you would read from "rebase-merge/amend", and
> that may be fine for the purpose of your test, but it still looks
> somewhat funny. As modern rebase is done on a detached HEAD,
> perhaps it is a good idea to check if the HEAD is detached and
> return false from this function if that is not the case. I dunno.On second thoughts, I do not think that checking if HEAD is detached or not is needed, as the part of the code that includes reading can only be called during a rebase interactive, in which case the HEAD can only be detached.