]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
build: ignore untracked files in submodule for version branch-0.7
authorVincent Bernat <vincent@bernat.im>
Sat, 17 Oct 2015 17:30:39 +0000 (19:30 +0200)
committerVincent Bernat <vincent@bernat.im>
Sat, 17 Oct 2015 17:31:16 +0000 (19:31 +0200)
We can't update the .gitignore of a submodule and we don't want the
version to be "dirty" just for that.

get-version

index 5c118094363fb8f5339e418ff4a5f8b76c92f535..19a2e3ebe56e0a3b516daabe90ba79a62d5135cd 100755 (executable)
@@ -35,7 +35,7 @@ elif [ -e .git ]; then
 
   # Check if we are on a dirty checkout.
   git update-index --refresh -q >/dev/null
-  dirty=$(git diff-index --name-only HEAD 2>/dev/null)
+  dirty=$(git diff-index --name-only --ignore-submodules=untracked HEAD 2>/dev/null)
   if [ -n "$dirty" ]; then
     version="$version-dirty"
   fi