summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorGravatar http://identi.ca/cwebber/ <cwebber@web>2012-11-27 23:58:10 +0000
committerGravatar admin <admin@branchable.com>2012-11-27 23:58:10 +0000
commit36c0288030684e35698a3aa509c357610f9e5718 (patch)
treee6c4e16160312898d187e2def734fed36709116f /doc
parentb96d88bafe0276479f821f44d6f73381543088ed (diff)
Added a comment
Diffstat (limited to 'doc')
-rw-r--r--doc/forum/The_ability_to_leave_a_file_unlocked_for_a_bit_while_committing_it_repeatedly__63__/comment_4_f33fd6f72cb9ad7dd20a04c82199413b._comment26
1 files changed, 26 insertions, 0 deletions
diff --git a/doc/forum/The_ability_to_leave_a_file_unlocked_for_a_bit_while_committing_it_repeatedly__63__/comment_4_f33fd6f72cb9ad7dd20a04c82199413b._comment b/doc/forum/The_ability_to_leave_a_file_unlocked_for_a_bit_while_committing_it_repeatedly__63__/comment_4_f33fd6f72cb9ad7dd20a04c82199413b._comment
new file mode 100644
index 000000000..ba6baad91
--- /dev/null
+++ b/doc/forum/The_ability_to_leave_a_file_unlocked_for_a_bit_while_committing_it_repeatedly__63__/comment_4_f33fd6f72cb9ad7dd20a04c82199413b._comment
@@ -0,0 +1,26 @@
+[[!comment format=mdwn
+ username="http://identi.ca/cwebber/"
+ nickname="cwebber"
+ subject="comment 4"
+ date="2012-11-27T23:58:10Z"
+ content="""
+Ah, thanks Joey... here's an updated version:
+
+ function git-annex-unlocked-commit {
+ if [ $# -ne 2 ]; then
+ echo \"Wrong number of args.\"
+ return 1
+ fi
+
+ if [ ! -e \"$1\" ]; then
+ echo \"Need a filename!\"
+ return 1
+ fi
+
+ read -p \"Really do an unlocked commit? (y/n): \"
+ if [ \"$REPLY\" == \"y\" ]; then
+ git add $1 && git commit $1 -m \"$2\" && git annex unlock $1
+ fi
+ }
+
+"""]]