Files
git/Documentation
shejialuo d996b4475c ref: check whether the target of the symref is a ref
Ideally, we want to the users use "git symbolic-ref" to create symrefs
instead of writing raw contents into the filesystem. However, "git
symbolic-ref" is strict with the refname but not strict with the
referent. For example, we can make the "referent" located at the
"$(gitdir)/logs/aaa" and manually write the content into this where we
can still successfully parse this symref by using "git rev-parse".

  $ git init repo && cd repo && git commit --allow-empty -mx
  $ git symbolic-ref refs/heads/test logs/aaa
  $ echo $(git rev-parse HEAD) > .git/logs/aaa
  $ git rev-parse test

We may need to add some restrictions for "referent" parameter when using
"git symbolic-ref" to create symrefs because ideally all the
nonpseudo-refs should be located under the "refs" directory and we may
tighten this in the future.

In order to tell the user we may tighten the above situation, create
a new fsck message "symrefTargetIsNotARef" to notify the user that this
may become an error in the future.

Mentored-by: Patrick Steinhardt <ps@pks.im>
Mentored-by: Karthik Nayak <karthik.188@gmail.com>
Signed-off-by: shejialuo <shejialuo@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-11-21 08:21:33 +09:00
..
2024-10-10 14:22:25 -07:00
2024-10-18 14:01:50 -04:00
2024-07-23 11:02:52 -07:00
2024-09-23 12:47:36 -07:00
2024-09-23 12:47:36 -07:00
2024-06-17 15:55:56 -07:00
2023-11-26 10:07:05 +09:00
2023-06-12 13:52:51 -07:00
2024-08-16 09:46:25 -07:00
2023-10-09 12:06:29 -07:00
2023-11-26 10:07:05 +09:00
2023-12-26 11:06:55 -08:00
2024-02-21 10:02:55 -08:00
2023-10-09 12:06:29 -07:00
2023-06-12 13:52:51 -07:00
2023-06-12 13:52:51 -07:00
2024-01-02 13:51:30 -08:00
2024-05-07 10:06:03 -07:00
2024-04-19 12:38:50 +02:00
2023-12-14 14:38:07 -08:00
2023-12-26 11:06:55 -08:00
2024-09-23 12:47:36 -07:00
2023-11-26 10:07:05 +09:00