[Outreachy][Proposal] : Improve droping and rewording commits in Git interactive rebase

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hey Everyone!

This is the initial version of my proposal. Although I realized that,
I am quite late for sending the proposal but I still hope to have
reviews from the community.
I also thank Phillip for helping me in understanding more about the
project details [1] .
I have made the timelines accordingly, but still I think I am lacking
in it as I don't know much about the codebase in detail . Need some
guidance for the timeline .
Also, there's a column for community-specific questions in the final
application. Is there anything specific that I have to fill in that part ?

Thanks and Regards ,
Charvi
[1] https://lore.kernel.org/git/CAPSFM5e9tXx_LuwNK+e1wOjaHb6kiTCEt3WeL851KAbTPNsEow@xxxxxxxxxxxxxx/

-------------------------------------------------------------------------------
Link to docs : https://docs.google.com/document/d/19LYskEBWFp2q2Yi2hfibbxT5kt6czLZk_ZCajkHQ4QQ/edit?usp=sharing
-------------------------------------------------------------------------------
## Project

Improve droping and rewording commits in Git interactive rebase

## Contact Information

Name                  :   Charvi Mendiratta
E-mail                 :   charvi077@xxxxxxxxx
IRC                     :   charvi077 on #git or #git-devel
Linkedin              :   charvi077 [https://www.linkedin.com/in/charvi077/]
Github                 :   charvi-077 [https://github.com/charvi-077]
Time Zone           :   IST (UTC +0530)

## Background

I am Charvi Mendiratta, recently graduated from Panjab University,
India in Electronics and Communication. I like to learn and explore
new things in my day to day life. I have worked mostly on Robotics
Software development, college projects and have internship experience.
I’ve been writing code in C/C++ and Python. I have worked a bit on
shell scripts also during my semester project. Besides this I always
prefer to make my work and projects open source on github, contribute
to other projects and to promote open source culture.

## Contribution to Git

Contributing to git helped me a lot understanding about the workflow,
getting familiar with the mailing list, overview of writing test
scripts and  about the git commands itself. I will keep contributing
to Git, solving more issues or through review discussions.

#### Microproject :

Modernize the test script t7201,t7101,t7102
List: https://lore.kernel.org/git/20201015175709.20121-1-charvi077@xxxxxxxxx/

#### Status :

cm/t7xxx-cleanup (2020-10-22) 6 commits
(merged to 'next' on 2020-10-26 at 8b58e54942)

## Project Overview

Git commit commands include the two options for the use with rebase
--autosquash, '--fixup=<commit>', that creates the commit message with
a prefix of 'fixup!' with the subject line from the specific commit
and '--squash=<commit>' . At the same time, to reword the commit
message one has to deal with fixups and editing a todo list upon
rebase --autosquash to reword the commit message .
Implementing the reword! commit will make it easy and give the options
to either reword the old commit message or to change the both content
and message of the old commit at the same time.

Next, the current  way of marking the commit to be excluded in
subsequent rebase --autosquash is git revert -n <commit> && git commit
-m 'drop!' '$(git show -s --oneline <commit>)'. Implementing the drop!
commit will make it easy to drop the changes and the effect of drop
commit can be reversed for any commit built on top of the drop! commit
before rebase.

## Discussions and points to work on

The project is mentioned by Dscho in the issue
[https://github.com/gitgitgadget/git/issues/259] and further discussed
briefly
[https://public-inbox.org/git/alpine.DEB.2.21.1.1710151754070.40514@virtualbox/].
Also there is discussion
[https://lore.kernel.org/git/95cc6fb2-d1bc-11de-febe-c2b5c78a6850@xxxxxxxxx/]
regarding the implementation of the reword! commit. Apart from this, I
also discussed with the Phillip Wood regarding the project
[https://lore.kernel.org/git/CAPSFM5e9tXx_LuwNK+e1wOjaHb6kiTCEt3WeL851KAbTPNsEow@xxxxxxxxxxxxxx/]

Considering all the past threads and discussions, I summed up with the
following points to work on :

#### Adding reword command  in the rebase

In the past patches of Phillip Wood’s work
[https://github.com/phillipwood/git/commits/wip/rebase-amend] , the
'reword!' is implemented as 'amend!' in git rebase .

- Need to figure out the implementation of the reword in the rebase.
As of  now the possible options are :

To avoid the reword command and instead use the 'fixup -C' as
discussed with Phillip
[https://lore.kernel.org/git/29fc2f59-1cca-a3db-5586-bbd7b2e4806d@xxxxxxxxx/].

Otherwise if we are using it then, also the name 'reword' must be
changed to 'revise' or 'amend' or may be other, because the content
and commit message both are changing in the reword! commit.

- Implement the way to handle empty commits in the git rebase.

#### Implementation of reword! Commit

- Figure out the user interface for the --reword.
As of now as mentioned by Phillip
[https://lore.kernel.org/git/966470c3-8883-faf1-629f-89fc8d18b339@xxxxxxxxx/],
there is the possible way of implementing the reword! Commit as
'--fixup= reword/amend:commit'.

- Look into the present codebase of --fixup commit and implement the
reword! commit option in it.

#### Implementation of drop! commit and adding drop command in rebase

- Figure out the way to add drop commit, as of now one of possible
ways to add it is 'git revert --drop' also looking for its
implementation in Git rebase .

- Look for its related codebase and work on its implementation .

#### Tests and Documentation

- Write the test scripts of every codebase I add and also complete its
documentation following the proper guidelines .

## Project Timeline

#### Nov 23 - Dec 1 (Before internship officially starts)

- Interact with git community regarding the project for any suggestion
- Get familiar with the Coding Guidelines, test scripts and
documentation  instructions to be followed
- Discuss with mentors regarding the prerequisites that are being
essential to be completed or tested for the smooth flow of the project
- Understand and implement the Phillip’s work [
https://github.com/phillipwood/git/commits/wip/rebase-amend]

#### Dec 1 - Dec 11 (Phase 1)

- Figure out and discuss with the community, regarding the
implementation of --reword in the git interactive rebase
- Make changes in Phillips Wood’s work, as per the decided UI for
--reword in the rebase
- Implement the way to handle empty commits in the rebase
- Complete the documentation of the above work


#### Dec 12 - Jan 12 (Phase 2)

- Figure out and discuss with the community, regarding the user
interface for the git reword! commit
- Discuss with mentors regarding the related codebase to be changed
- Implement the reword! commit
- Write the test scripts for the code base added
- Add the documentation of the reword! commit

#### Jan 12 - February 16 (Phase 3)

- Figure out and discuss with the community, regarding the user
interface for the git drop! commit and also for the implementation of
drop in git interactive rebase
- Discuss with mentors regarding the related codebase to be changed
- Implement drop! commit and write the test cases for the added codebase
- Addition of the drop! commit
- Implement the drop commit in the rebase
- Write the test scripts for the drop command code that is added

#### February 16 - March 2 (Buffer time)

- Check for the major issues if any leftovers are in the project.
- Complete the documentation of drop command in rebase

## Contribution process and Interaction with the mentors

I will keep committing changes on my Github fork
[https://github.com/charvi-077/git] and finally post a patch series on
the Mailing List. I will make sure to interact with the community as
well as mentors regularly and will take feedback from them after every
phase mentioned in the project timeline.
Also, I aim to  weekly update my progress report on the blog and share
it on the List. Apart from that I will document anything new I learn,
its related references and will share it on my blog.

## Availability

I have no commitments planned for the Internship period. So, I can
easily devote 40-45 hours a week on this project.

## After Outreachy

Even after completion of Outreachy, I plan on continuing my
contribution to Git, by solving more issues or review discussions. I
vision to do more improvements to the git interactive rebase or
writing its wrapper as pointed out by Phillip
[https://lore.kernel.org/git/966470c3-8883-faf1-629f-89fc8d18b339@xxxxxxxxx/].

Besides this, I always like the way the Open Source community works
and I aim to get involved in the same way, develop mentorship skills
as well as the ability to help each other and try to give back to the
community by mentoring and guiding others.




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux