Skip to content

Commit 673b0ad

Browse files
committed
Add ability to stash untracked changes, so they don't get obliterated
1 parent 63e084e commit 673b0ad

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

readme2tex/render.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
%s
1414
\usepackage{geometry}
1515
\pagestyle{empty}
16-
\geometry{paperwidth=170mm, paperheight=16383pt, left=40pt, top=40pt, textwidth=280pt, marginparsep=20pt, marginparwidth=100pt, textheight=16263pt, footskip=40pt}
16+
\geometry{paperwidth=250mm, paperheight=16383pt, left=0pt, top=0pt, textwidth=426pt, marginparsep=20pt, marginparwidth=100pt, textheight=16263pt, footskip=40pt}
1717
\begin{document}
1818
%s%s
1919
\end{document}
@@ -234,14 +234,14 @@ def render(
234234
else:
235235
# git stash -q --keep-index
236236
stashed = False
237-
if check_output(['git', 'status', '-u', 'no', '-s']).decode('utf-8').strip():
237+
if check_output(['git', 'status', '-s']).decode('utf-8').strip():
238238
if input(
239239
"There are unstaged files, would you like to stash them? "
240240
"(They will be automatically unstashed.) [(y)/n]").lower().startswith('n'):
241241
print("Aborting.")
242242
return
243243
print("Stashing...")
244-
check_output(['git', 'stash'])
244+
check_output(['git', 'stash', '-u'])
245245
stashed = True
246246
try:
247247
print("Checking out %s" % branch)

0 commit comments

Comments
 (0)