aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-02-02 13:36:55 -0800
committerJunio C Hamano <gitster@pobox.com>2017-02-02 13:36:55 -0800
commit6f1c08bdb75b37ad30103f0f12339780fdc004e2 (patch)
tree3a6909ffaaa512519c3f6f6e7a11f0956276bcd1 /contrib
parentd008809bb5d1f9a669ee89b77b3a4b6bb7905009 (diff)
parent0aaad415bcbdd7ccdfbb27eafb2f5926540455fa (diff)
downloadgit-6f1c08bdb75b37ad30103f0f12339780fdc004e2.tar.gz
git-6f1c08bdb75b37ad30103f0f12339780fdc004e2.tar.xz
Merge branch 'rs/absolute-pathdup'
Code cleanup. * rs/absolute-pathdup: use absolute_pathdup() abspath: add absolute_pathdup()
Diffstat (limited to 'contrib')
-rw-r--r--contrib/coccinelle/xstrdup_or_null.cocci6
1 files changed, 6 insertions, 0 deletions
diff --git a/contrib/coccinelle/xstrdup_or_null.cocci b/contrib/coccinelle/xstrdup_or_null.cocci
index 3fceef132..8e05d1ca4 100644
--- a/contrib/coccinelle/xstrdup_or_null.cocci
+++ b/contrib/coccinelle/xstrdup_or_null.cocci
@@ -5,3 +5,9 @@ expression V;
- if (E)
- V = xstrdup(E);
+ V = xstrdup_or_null(E);
+
+@@
+expression E;
+@@
+- xstrdup(absolute_path(E))
++ absolute_pathdup(E)