Hashar has uploaded a new change for review.
https://gerrit.wikimedia.org/r/60804
Change subject: git-changed-in-head helper script
......................................................................
git-changed-in-head helper script
A simple bash wrapper to easily list modified files in HEAD that matches
a set of extensions. It will NOT list deleted files.
Examples:
git-changed-in-head php php5 inc
git-changed-in-head pp
git-changed-in-head js
Change-Id: If91cecca4e94db88939c8a1978430085ab3279e0
---
A bin/git-changed-in-head
1 file changed, 30 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/integration/jenkins
refs/changes/04/60804/1
diff --git a/bin/git-changed-in-head b/bin/git-changed-in-head
new file mode 100755
index 0000000..20da6dc
--- /dev/null
+++ b/bin/git-changed-in-head
@@ -0,0 +1,30 @@
+#!/bin/bash
+#
+# git-changed-in-head : list changed files in HEAD matching a file extension
+#
+# This script list any added, copied or modified file in the current directory
+# and filters out by extension.
+#
+# The current directory must be a git repository.
+#
+# USAGE:
+# git-changed-in-head [extension..]
+#
+# EXAMPLE:
+#
+# List files ending with .php, .php5 or .inc
+# git-changed-in-head php php5 inc
+#
+# List any file changed (now filtering):
+# git-changed-in-head
+#
+# Copyright © 2013, Antoine Musso
+# Copyright © 2013, Wikimedia Foundation Inc.
+#
+# Licensed under GPLv2.0
+#
+PATH_ARGS=()
+for ext in "$@"; do
+ PATH_ARGS+=("*.$ext")
+done;
+git diff HEAD^..HEAD --name-only --diff-filter=ACM -- "${PATH_ARGS[@]}"
--
To view, visit https://gerrit.wikimedia.org/r/60804
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: If91cecca4e94db88939c8a1978430085ab3279e0
Gerrit-PatchSet: 1
Gerrit-Project: integration/jenkins
Gerrit-Branch: master
Gerrit-Owner: Hashar <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits