Skip to content

Handle .gitignore #2

Description

@ENAMINE1

Inside the write_tree.cpp code we skip those entries which are a part of teh .gitignore file. But there can be a case when .gitignore dosent exits or the folder in which i am currently in dosent have the .gitignore file then in that case the code wont find any .gitnore file even if it exists in the outer parent directory.

  • Handle the absence of .gitignore file
  • Handlle the presence of .gitignore file in teh parent or grandparent directory somewhere.
|-- CMakeLists.txt
|-- Makefile
|-- cmake_install.cmake
|-- git_c
`-- src
    |-- CPP
    |   |-- cat_file.cpp
    |   |-- git_add.cpp
    |   |-- git_init.cpp
    |   |-- hash_object.cpp
    |   |-- ls_tree.cpp
    |   |-- main.cpp
    |   |-- utils.cpp
    |   `-- write_tree.cpp
    `-- Headers
        |-- cat_file.h
        |-- git_add.h
        |-- git_init.h
        |-- hash_object.h
        |-- ls_tree.h
        |-- utils.h
        `-- write_tree.h

Here there isnt any .gitignore file

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinggood first issueGood for newcomers

Projects

Status
In progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions