When calling `git ls-files -m` to list modified files, use --with-tree=HEAD
authorZac Medico <zmedico@gentoo.org>
Wed, 3 Dec 2008 05:42:34 +0000 (05:42 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 3 Dec 2008 05:42:34 +0000 (05:42 -0000)
so that differences from the most recent commit are given instead of
differences from the index which is used for commit staging purposes.
This is required since otherwise files that have been added via `git add`
(such as echangelog does with the ChangeLog) won't show up in the list
of modified files due to being unmodified relative to the index. Thanks
to Christian Ruppert (idl0r) for reporting.

svn path=/main/trunk/; revision=12140

bin/repoman

index ae4109b7085526dc85631815807fe6f0480d2209..d773419b9335ead98a29a564c1cd21aa6a517c98 100755 (executable)
@@ -737,7 +737,7 @@ if vcs == "svn":
        mychanged = [ "./" + elem.split()[-1:][0] for elem in svnstatus if elem and elem[:1] in "MR" ]
        mynew     = [ "./" + elem.split()[-1:][0] for elem in svnstatus if elem.startswith("A") ]
 elif vcs == "git":
-       mychanged = os.popen("git ls-files -m").readlines()
+       mychanged = os.popen("git ls-files -m --with-tree=HEAD").readlines()
        mychanged = [ "./" +  elem[:-1] for elem in mychanged ]
        mynew = os.popen("git diff --cached --name-only --diff-filter=A").readlines()
        strip_levels = repolevel - 1
@@ -1733,7 +1733,7 @@ else:
                        for prop in props if " - " in prop)
 
        elif vcs == "git":
-               mychanged = os.popen("git ls-files -m").readlines()
+               mychanged = os.popen("git ls-files -m --with-tree=HEAD").readlines()
                mychanged = [ "./" +  elem[:-1] for elem in mychanged ]
                mynew = os.popen("git diff --cached --name-only --diff-filter=A").readlines()
                strip_levels = repolevel - 1