From: Yuting Zheng <05zyt30@gmail.com>
To: git@vger.kernel.org
Subject: [GSoC] git-refs proposal v2
Date: Sun, 6 Apr 2025 14:08:10 +0800 [thread overview]
Message-ID: <CAMvj1+rUYPpOzo78RJurj4Lcoop=hPQ0G6_e2eK6TD55tdGPkg@mail.gmail.com> (raw)
In-Reply-To: <20250329150248.2274482-1-05ZYT30@gmail.com>
## Name and Contact Information
- Full Name: Zheng Yuting
- Email Address: 05ZYT30@gmail.com
- Time Zone: UTC +8:00
---
## Abstract
The current Git reference management functionality is fragmented across
multiple independent commands (`git-show-ref`, `git-for-each-ref`,
`git-update-ref`,
`git-pack-refs`, `git-check-ref-format`, and `git-symbolic-ref`),
leading to code
redundancy and increased maintenance costs.
Based on Patrick Steinhardt’s integration vision[1], this project aims to
consolidate functionality under the unified `git-refs` command by initially
implementing three core subcommands: **show**, **list**, and **update**.
These subcommands will cover the most essential reference management
operations while ensuring backward compatibility and laying the foundation
for further refinement.
If time permits, additional subcommands (such as `exists`, `resolve`, `pack`,
and `check-format`) will be gradually integrated to extend and enhance the
existing functionality. Comprehensive testing and updated documentation
will support this phased approach, ensuring a robust transition from the
legacy tools.
---
## Implementation Plan
### Command Integration Strategy
#### Implementation Sequence
The development will proceed in the following order:
1. `git-refs show`
- **Purpose:** Replace `git-show-ref --verify` with strict
reference validation.
2. `git-refs list`
- **Purpose:** Merge `git-show-ref` and `git-for-each-ref` for
listing references.
- **Output Format:** `<oid> SP <ref> LF` (git-show-ref style).
- **Options:**
- **Filtering:**
- From `git-for-each-ref`:
- `--count`,
- `--points-at=<object>`,
- `--merged[=<object>]`,
- `--no-merged[=<object>]`,
- `--contains[=<object>]`,
- `--no-contains[=<object>]`,
- `--omit-empty`,
- `--exclude=<pattern>`,
- `--include-root-refs`.
- From `git-show-ref`:
- `--head`,
- `--branches`,
- `--tags`,
- `--exclude-existing`.
- **Sorting:**
- From `git-for-each-ref`: `--sort=<key>`.
- **Formatting:**
- From `git-for-each-ref`:
- `--format=<format>`,
- `--color[=<when>]`,
- `--tcl` (under discussion),
- `--shell`(under discussion),
- `--perl`(under discussion).
- From `git-show-ref`:
- `--dereference`,
- `--hash`.
- **Global:** `--ignore-case` (applies to all filtering/sorting).
3. `git-refs update`
- **Purpose:** Replace `git-update-ref` with transactional updates and
batch processing.
- **Options (all from `git-update-ref`):**
- `<ref>`: Target reference.
- `<newvalue>`: New object identifier.
- `[<oldvalue>]`: Expected old value (atomic check).
- `--stdin`: Read batch updates from stdin.
- `-d, --delete`: Delete the reference.
- `-m <message>, --message <message>`: Custom reflog message.
- `--no-reflog`: Skip reflog updates.
- `--no-deref`: Update symbolic refs directly.
---
#### Testing & Documentation Updates:
- **Unified Testing:**
- Develop comprehensive test cases for each subcommand to ensure
that the new commands produce outputs consistent with the legacy ones.
- Leverage existing test scenarios (e.g., those used for `git-show-ref`
and `git-update-ref`) and add new tests specific to the new option
categories and output formats.
- **Documentation:**
- Update the user manual (e.g., Documentation/git-refs.txt) to include
detailed sections for each subcommand, mapping the new options to
their legacy equivalents.
- Provide developer notes to explain changes, highlight areas of
functional parity, and outline the phased implementation approach.
---
### Timeline
- **May 8 – May 17 (10 days):** Design Finalization & Alignment (publish
proposals, resolve conflicts).
- **May 18 – June 7 (21 days):** Implement `git-refs show` (includes
testing/docs).
- **June 8 – July 3 (26 days):** Implement `git-refs list` (includes
testing/docs).
- **July 4 – August 4 (32 days):** Implement `git-refs update` (includes
testing/docs).
- **August 5 – August 25 (21 days):** Cross-command validation &
edge-case fixes.
- **August 26 – September 1 (7 days):** Final Review & Adjustments.
---
## Background & Experience
I graduated in June 2024 from Wenzhou University with a degree in
Network Engineering. My experience includes C programming and
command-line tool development, along with proficiency in Shell
scripting. I am currently in a transitional phase and expect to finalize
my schedule by late April, and then update my weekly schedule for GSoC,
estimating 25-30 hours per week for this project currently.
### Project Experience
- **One Student One Chip Project[2]**
Extending the open-source NEMU simulator by implementing CPU cycle
functionalities in C.
- **Web Development**
Developed a Django-based campus website, including user chat, news
publishing, and teacher management modules.
- **Custom Communication Protocols**
Built a UDP-based chatroom with peer-to-peer and group messaging.
- **Stock Monitoring Tool**
Implemented real-time monitoring and historical data analysis, with
email alerting and planned AI-driven strategy optimization.
I have also obtained CCNA certification and gained hands-on experience
as a network engineer. Additionally, I contributed a patch (currently pending
merge) optimizing send-email functionality in Git [3], which has given me
valuable insights into the Git codebase. For reference, my draft proposal
discussions can be reviewed on the mailing list [4], and `git-refs list`
discussion on the mailing list [5].
---
## Appendix
[1] https://gitlab.com/gitlab-org/git/-/issues/330
[2] https://ysyx.oscc.cc/en/project/intro.html
[3] https://lore.kernel.org/git/20250312064639.668875-1-05ZYT30@gmail.com/
[4] https://lore.kernel.org/git/CAMvj1+rbYKFNeWEvvN76MTpzfuWc4TN4ViXRE4nTfWy7ZMspWg@mail.gmail.com/
[5] https://lore.kernel.org/git/20250403154404.3459805-1-05ZYT30@gmail.com/
prev parent reply other threads:[~2025-04-06 6:08 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-23 13:36 [GSoC] Proposal Discussion: git-refs Project Yuting Zheng
2025-03-24 12:02 ` Patrick Steinhardt
2025-03-27 2:26 ` Yuting Zheng
2025-03-28 13:45 ` shejialuo
2025-03-29 14:54 ` Yuting Zheng
2025-03-29 15:02 ` [GSoC] git-refs proposal draft Zheng Yuting
2025-03-31 9:42 ` Patrick Steinhardt
2025-04-01 13:37 ` Yuting Zheng
2025-04-02 8:02 ` Patrick Steinhardt
2025-04-03 15:44 ` Discussion on git-refs list Implementation and Possible Approaches Zheng Yuting
2025-04-04 11:08 ` Karthik Nayak
2025-04-04 15:25 ` Yuting Zheng
2025-04-04 11:15 ` Patrick Steinhardt
[not found] ` <CAMvj1+rMY2YR8_GGFeDoJ6HCiVDusZZk9fAguKh=kbctHO=2Qg@mail.gmail.com>
2025-04-04 15:20 ` Fwd: " Yuting Zheng
2025-04-04 15:26 ` Yuting Zheng
2025-04-04 15:16 ` Yuting Zheng
2025-04-06 6:08 ` Yuting Zheng [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAMvj1+rUYPpOzo78RJurj4Lcoop=hPQ0G6_e2eK6TD55tdGPkg@mail.gmail.com' \
--to=05zyt30@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).