summaryrefslogtreecommitdiff
path: root/submodule.c
AgeCommit message (Collapse)Author
2010-01-31Fix memory leak in submodule.cJens Lehmann
The strbuf used in add_submodule_odb() was never released. So for every submodule - populated or not - we leaked its object directory name when using "git diff*" with the --submodule option. Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-30is_submodule_modified(): fix breakage with external GIT_INDEX_FILEv1.7.0-rc1Junio C Hamano
Even when the environment was given for the top-level process, checking in the submodule work tree should use the index file associated with the work tree of the submodule. Do not export it to the environment. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-25Teach diff --submodule that modified submodule directory is dirtyJens Lehmann
Since commit 8e08b4 git diff does append "-dirty" to the work tree side if the working directory of a submodule contains new or modified files. Lets do the same when the --submodule option is used. Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-23Merge branch 'jl/submodule-diff'Junio C Hamano
* jl/submodule-diff: Performance optimization for detection of modified submodules git status: Show uncommitted submodule changes too when enabled Teach diff that modified submodule directory is dirty Show submodules as modified when they contain a dirty work tree
2010-01-17Show submodules as modified when they contain a dirty work treeJens Lehmann
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>
2010-01-12submodule.c: mark file-local function staticJunio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-21submodule.c: Squelch a "use before assignment" warningDavid Aguilar
i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5493) compiler (and probably others) mistakenly thinks variable 'right' is used before assigned. Work around it by giving it a fake initialization. Signed-off-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-31fixup tr/stash-format mergeJunio C Hamano
2009-10-20Add the --submodule option to the diff option familyJohannes Schindelin
When you use the option --submodule=log you can see the submodule summaries inlined in the diff, instead of not-quite-helpful SHA-1 pairs. The format imitates what "git submodule summary" shows. To do that, <path>/.git/objects/ is added to the alternate object databases (if that directory exists). This option was requested by Jens Lehmann at the GitTogether in Berlin. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>