Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Commits on Aug 9, 2010
  1. @jlehmann @gitster

    Submodules: Add the new "ignore" config option for diff and status

    jlehmann authored gitster committed
    The new "ignore" config option controls the default behavior for "git
    status" and the diff family. It specifies under what circumstances they
    consider submodules as modified and can be set separately for each
    submodule.
    
    The command line option "--ignore-submodules=" has been extended to accept
    the new parameter "none" for both status and diff.
    
    Users that chose submodules to get rid of long work tree scanning times
    might want to set the "dirty" option for those submodules. This brings
    back the pre 1.7.0 behavior, where submodule work trees were never
    scanned for modifications. By using "--ignore-submodules=none" on the
    command line the status and diff commands can be told to do a full scan.
    
    This option can be set to the following values (which have the same name
    and meaning as for the "--ignore-submodules" option of status and diff):
    
    "all": All changes to the submodule will be ignored.
    
    "dirty": Only differences of the commit recorded in the superproject and
    	the submodules HEAD will be considered modifications, all changes
    	to the work tree of the submodule will be ignored. When using this
    	value, the submodule will not be scanned for work tree changes at
    	all, leading to a performance benefit on large submodules.
    
    "untracked": Only untracked files in the submodules work tree are ignored,
    	a changed HEAD and/or modified files in the submodule will mark it
    	as modified.
    
    "none" (which is the default): Either untracked or modified files in a
    	submodules work tree or a difference between the subdmodules HEAD
    	and the commit recorded in the superproject will make it show up
    	as changed. This value is added as a new parameter for the
    	"--ignore-submodules" option of the diff family and "git status"
    	so the user can override the settings in the configuration.
    
    Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Jun 11, 2010
  1. @jlehmann @gitster

    Add optional parameters to the diff option "--ignore-submodules"

    jlehmann authored gitster committed
    In some use cases it is not desirable that the diff family considers
    submodules that only contain untracked content as dirty. This may happen
    e.g. when the submodule is not under the developers control and not all
    build generated files have been added to .gitignore by the upstream
    developers. Using the "untracked" parameter for the "--ignore-submodules"
    option disables checking for untracked content and lets git diff report
    them as changed only when they have new commits or modified content.
    
    Sometimes it is not wanted to have submodules show up as changed when they
    just contain changes to their work tree. An example for that are scripts
    which just want to check for submodule commits while ignoring any changes
    to the work tree. Also users having large submodules known not to change
    might want to use this option, as the - sometimes substantial - time it
    takes to scan the submodule work tree(s) is saved.
    
    Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Mar 14, 2010
  1. @jlehmann @gitster

    git status: ignoring untracked files must apply to submodules too

    jlehmann authored gitster committed
    Since 1.7.0 submodules are considered dirty when they contain untracked
    files. But when git status is called with the "-uno" option, the user
    asked to ignore untracked files, so they must be ignored in submodules
    too. To achieve this, the new flag DIFF_OPT_IGNORE_UNTRACKED_IN_SUBMODULES
    is introduced.
    
    Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Mar 13, 2010
  1. @jlehmann @gitster

    git status: Fix false positive "new commits" output for dirty submodules

    jlehmann authored gitster committed
    Testing if the output "new commits" should appear in the long format of
    "git status" is done by comparing the hashes of the diffpair. This always
    resulted in printing "new commits" for submodules that contained untracked
    or modified content, even if they did not contain new commits. The reason
    was that match_stat_with_submodule() did set the "changed" flag for dirty
    submodules, resulting in two->sha1 being set to the null_sha1 at the call
    sites, which indicates that new commits are present. This is changed so
    that when no new commits are present, the same object names are in the
    sha1 field for both sides of the filepair, and the working tree side will
    have the "dirty_submodule" flag set when appropriate. For a submodule to
    be seen as modified even when it just has a dirty work tree, some
    conditions had to be extended to also check for the "dirty_submodule"
    flag.
    
    Unfortunately the test case that should have found this bug had been
    changed incorrectly too. It is fixed and extended to test for other
    combinations too.
    
    Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. @jlehmann @gitster

    Refactor dirty submodule detection in diff-lib.c

    jlehmann authored gitster committed
    Moving duplicated code into the new function match_stat_with_submodule().
    Replacing the implicit activation of detailed checks for the dirtiness of
    submodules when DIFF_FORMAT_PATCH was selected with explicitly setting
    the recently added DIFF_OPT_DIRTY_SUBMODULES option in diff_setup_done().
    
    Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Mar 8, 2010
  1. @jlehmann @gitster

    git status: Show detailed dirty status of submodules in long format

    jlehmann authored gitster committed
    Since 1.7.0 there are three reasons a submodule is considered modified
    against the work tree: It contains new commits, modified content or
    untracked content. Lets show all reasons in the long format of git status,
    so the user can better asses the nature of the modification. This change
    does not affect the short and porcelain formats.
    
    Two new members are added to "struct wt_status_change_data" to store the
    information gathered by run_diff_files(). wt-status.c uses the new flag
    DIFF_OPT_DIRTY_SUBMODULES to tell diff-lib.c it wants to get detailed
    dirty information about submodules.
    
    A hint line for submodules is printed in the dirty header when dirty
    submodules are present.
    
    Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Mar 5, 2010
  1. @jlehmann @gitster

    git diff --submodule: Show detailed dirty status of submodules

    jlehmann authored gitster committed
    When encountering a dirty submodule while doing "git diff --submodule"
    print an extra line for new untracked content and another for modified
    but already tracked content. And if the HEAD of the submodule is equal
    to the ref diffed against in the superproject, drop the output which
    would just show the same SHA1s and no commit message headlines.
    
    To achieve that, the dirty_submodule bitfield is expanded to two bits.
    The output of "git status" inside the submodule is parsed to set the
    according bits.
    
    Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Jan 25, 2010
  1. @jlehmann @gitster

    git diff: Don't test submodule dirtiness with --ignore-submodules

    jlehmann authored gitster committed
    The diff family suppresses the output of submodule changes when
    requested but checks them nonetheless. But since recently submodules
    get examined for their dirtiness, which is rather expensive. There is
    no need to do that when the --ignore-submodules option is used, as
    the gathered information is never used anyway.
    
    Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Jan 19, 2010
  1. @jlehmann @gitster

    Performance optimization for detection of modified submodules

    jlehmann authored gitster committed
    In the worst case is_submodule_modified() got called three times for
    each submodule. The information we got from scanning the whole
    submodule tree the first time can be reused instead.
    
    New parameters have been added to diff_change() and diff_addremove(),
    the information is stored in a new member of struct diff_filespec. Its
    value is then reused instead of calling is_submodule_modified() again.
    
    When no explicit "-dirty" is needed in the output the call to
    is_submodule_modified() is not necessary when the submodules HEAD
    already disagrees with the ref of the superproject, as this alone
    marks it as modified. To achieve that, get_stat_data() got an extra
    argument.
    
    Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Jan 17, 2010
  1. @jlehmann @gitster

    Show submodules as modified when they contain a dirty work tree

    jlehmann authored gitster committed
    Until now a submodule only then showed up as modified in the supermodule
    when the last commit in the submodule differed from the one in the index
    or the diffed against commit of the superproject. A dirty work tree
    containing new untracked or modified files in a submodule was
    undetectable when looking at it from the superproject.
    
    Now git status and git diff (against the work tree) in the superproject
    will also display submodules as modified when they contain untracked or
    modified files, even if the compared ref matches the HEAD of the
    submodule.
    
    Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
    Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Something went wrong with that request. Please try again.