git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 0/5] object.c: localize global the_repository variable into r

From
PGparth gala <parthpgala@gmail.com>
Date
Feb 13, 2020, 05:14 UTC
Message-ID
<f1e4da02-9411-8a93-ca62-6d7ae7bf4ae8@gmail.com>
In-Reply-To
<20200212201810.GB4364@syl.local>
On 13/02/20 1:48 am, Taylor Blau wrote:
Show 19 quoted lines
> Hi Parth,
>
> On Wed, Feb 12, 2020 at 07:19:06PM +0000, Parth Gala via GitGitGadget wrote:
>> I have created this commit in response to
>> https://github.com/gitgitgadget/git/issues/379#issue-503866117.
> Fantastic! Thank you for working on this.
>
>> All the functions in object.c which relied on 'the_repository' have
>> been modified.  The functions calling these functions in object.c
>> consisted calls to other functions using 'the_repository' as well, and
>> although I intended to use 'r' at all those instances, I thought it
>> would make more sense when we would deal with their callee functions
>> in another similar patch. What do you think ?
> That makes sense, and follows the conventions that other similar
> refactorings have done in the past.
>
> Any reason why you decided to start with 'object.c'? Not that any such
> reason is necessary, I'm just curious about how you came to this
> decision.

I am new to the git community and while searching for issues to solve I found the issue linked above. I figured solving it would give me a good experience navigating between functions and exploring the huge repository.

Initially I grepped to find all functions using `the_repository` but randomly chose object.c since the refactoring had to start somewhere. Special thanks to Johannes Schindelin for this.

>> Signed-off-by: Parth Gala parthpgala@gmail.com [parthpgala@gmail.com]
> Even though you *do* need a 'Signed-off-by' in each of your patches,
> adding it in the cover letter is not necessary.

I probably did not check the preview I sent to myself carefully for this. Will make note of it.

Show 39 quoted lines
>> Parth Gala (5):
>>    object.c: get_max_object_index and get_indexed_object accept 'r'
>>      parameter
>>    object.c: lookup_unknown_object() accept 'r' as parameter
>>    object.c: parse_object_or_die() accept 'r' as parameter
>>    object.c: clear_object_flags() accept 'r' as parameter
>>    object.c: clear_commit_marks_all() accept 'r' as parameter
>>
>>   builtin/checkout.c               |  3 ++-
>>   builtin/fsck.c                   |  8 +++++---
>>   builtin/grep.c                   |  6 ++++--
>>   builtin/index-pack.c             |  5 +++--
>>   builtin/log.c                    |  3 ++-
>>   builtin/name-rev.c               |  5 +++--
>>   builtin/pack-objects.c           |  3 ++-
>>   builtin/prune.c                  |  3 ++-
>>   bundle.c                         |  8 +++++---
>>   http-push.c                      |  3 ++-
>>   object.c                         | 32 ++++++++++++++++----------------
>>   object.h                         | 12 ++++++------
>>   pack-bitmap.c                    |  5 +++--
>>   reachable.c                      |  6 ++++--
>>   refs.c                           |  3 ++-
>>   revision.c                       |  3 ++-
>>   shallow.c                        | 13 ++++++++-----
>>   t/helper/test-example-decorate.c |  7 ++++---
>>   upload-pack.c                    | 19 ++++++++++++-------
>>   walker.c                         |  3 ++-
>>   20 files changed, 89 insertions(+), 61 deletions(-)
>>
>>
>> base-commit: 0ad714499976290d9a0229230cbe4efae930b8dc
>> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-545%2FParthGala2k%2Flocalize-the_repository-variable-v1
>> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-545/ParthGala2k/localize-the_repository-variable-v1
>> Pull-Request: https://github.com/gitgitgadget/git/pull/545
>> --
>> gitgitgadget
> Thanks,
> Taylor
Previous: Taylor Blau
Message 17 of 17 in “object.c: localize global the_repository variable into r”
  1. 0/5 object.c: localize global the_repository variable into rParth Gala via GitGitGadget, Feb 12, 2020
  2. 3/5 object.c: parse_object_or_die() accept 'r' as parameterParth Gala via GitGitGadget, Feb 12, 2020
  3. 1/5 object.c: get_max_object_index and get_indexed_object accept 'r' parameterParth Gala via GitGitGadget, Feb 12, 2020
  4. Taylor BlauFeb 12, 2020
  5. Eric SunshineFeb 12, 2020
  6. parth galaFeb 13, 2020
  7. 4/5 object.c: clear_object_flags() accept 'r' as parameterParth Gala via GitGitGadget, Feb 12, 2020
  8. 2/5 object.c: lookup_unknown_object() accept 'r' as parameterParth Gala via GitGitGadget, Feb 12, 2020
  9. Taylor BlauFeb 12, 2020
  10. Junio C HamanoFeb 12, 2020
  11. Taylor BlauFeb 13, 2020
  12. Junio C HamanoFeb 13, 2020
  13. Jeff KingFeb 13, 2020
  14. Taylor BlauFeb 15, 2020
  15. 5/5 object.c: clear_commit_marks_all() accept 'r' as parameterParth Gala via GitGitGadget, Feb 12, 2020
  16. Taylor BlauFeb 12, 2020
  17. parth galaFeb 13, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.