[GSOC][RFC PATCH 0/2] add-patch: compare object id
- From
Ghanshyam Thakkar <shyamthakkar001@gmail.com>
- Date
- Jan 28, 2024, 18:11 UTC
- Message-ID
- <20240128181202.986753-2-shyamthakkar001@gmail.com>
This patch series is RFC as this contains a partial behavior change. The first patch introduces a new function to compare object id instead of revision strings. The second patch removes the special case for HEAD in builtin/checkout.c.
This patch series enables for HEAD to be specified in any form and removes need to be kept a literal string 'HEAD'. Consequently, this removes the need to keep a special case for HEAD in callers of run_add_p() (as in builtin/checkout.c).
Additional context: https://lore.kernel.org/git/xmqqsgat7ttf.fsf@gitster.c.googlers.com/
Ghanshyam Thakkar (2): add-patch: compare object id instead of literal string checkout: remove HEAD special case
add-patch.c | 28 +++++++++++++++------- builtin/checkout.c | 9 ++++--- t/t2016-checkout-patch.sh | 50 +++++++++++++++++++++++---------------- t/t2071-restore-patch.sh | 21 ++++++++++------ t/t7105-reset-patch.sh | 14 +++++++++++ 5 files changed, 81 insertions(+), 41 deletions(-)
-- 2.43.0