Re: [Outreachy] Introduction

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

 



Hi Sangeeta

On 07/10/2020 21:10, Sangeeta NB wrote:
Hello everyone,

Welcome to the list

My name is Sangeeta and I’m one of the Outreachy applicants.  I would
like to work on the microproject "Unify the meaning of dirty between
diff and describe".

While looking at the files for `describe` and `diff` commands I found
that the `describe.c`  is present in builtin[1] folder whereas diff.c
is found in the root[2] folder as well as builtin[3] folder. I could
not find any implementation of --dirty in the diff.c present in
builtin[3] folder. So is it that I have to compare the implementation
of describe.c[1] and diff.c(of root folder)?

Also, I was curious to know why is there a builtin folder when many
commands described in that are described again in the root folder?

The files in the root directory are (mostly) library code that ends up in libgit.a. The builtin directory contains the individual git commands that form the git binary that is linked with libgit.a. builtin/diff.c contains cmd_diff() which will be called when the user runs `git diff`. That function parses the command line options and sets up the necessary data to pass to the diff implementation in /diff.c. The diff and log family of commands are a bit different to most of the other commands in that the option parsing is mostly done by calling setup_revisions() in /revision.c rather than using the option parsing library routines in /parse-options.c directly. I think the `--dirty` option for diff ends up being handled by handle_ignore_submodules_arg() in submodule.c, I'll leave it to you to see where that is called from (you can use `git grep`).

I'm going to be off line for the rest of today, hopefully someone else will be able to help if you get stuck or I'll try and answer any other questions tomorrow.

Best Wishes

Phillip

Looking forward to working with you all.

Sangeeta
[1] https://github.com/git/git/blob/master/builtin/describe.c
[2] https://github.com/git/git/blob/master/builtin/diff.c
[3] https://github.com/git/git/blob/master/diff.c




[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