Add change 24 instructions
This commit is contained in:
parent
671fa4b6b1
commit
81bf86d41b
18
how_to/Change_24.md
Normal file
18
how_to/Change_24.md
Normal file
@ -0,0 +1,18 @@
|
||||
- base: Try different directories when searching for a ref
|
||||
|
||||
In the previous change, you might have noticed that we need to spell out the
|
||||
full name of a tag (Like *refs/tags/mytag*). This isn't very convenient, we
|
||||
would like to have shorter command names. For example, if we've created "mytag"
|
||||
tag, we should be able to do `ugit log mytag` rather than having to specify
|
||||
`ugit log refs/tags/mytag`.
|
||||
|
||||
We'll extend `get_oid` to search in different ref subdirectories when resolving
|
||||
a name. We'll search in:
|
||||
```
|
||||
Root (.ugit): This way we can specify refs/tags/mytag
|
||||
.ugit/refs: This way we can specify tags/mytag
|
||||
.ugit/refs/tags: This way we can specify mytag
|
||||
.ugit/refs/heads: This will be needed for a future change
|
||||
```
|
||||
If we find the requested name in any of the directories, return it. Otherwise
|
||||
assume that the name is an OID.
|
Loading…
Reference in New Issue
Block a user