Commit 1545c6153ed22df10b02f9353f2054f4c7cb9c53

Stefan Sperling 2019-02-10T13:23:52

show commit id after update even if all files were missing

diff --git a/got/got.c b/got/got.c
index 709848c..755f467 100644
--- a/got/got.c
+++ b/got/got.c
@@ -436,8 +436,7 @@ update_progress(void *arg, unsigned char status, const char *path)
 	if (status == GOT_STATUS_EXISTS)
 		return;
 
-	if (status != GOT_STATUS_MISSING)
-		*did_something = 1;
+	*did_something = 1;
 	while (path[0] == '/')
 		path++;
 	printf("%c  %s\n", status, path);
diff --git a/regress/cmdline/update.sh b/regress/cmdline/update.sh
index 3267b8e..0a6f228 100755
--- a/regress/cmdline/update.sh
+++ b/regress/cmdline/update.sh
@@ -823,7 +823,9 @@ function test_update_restores_missing_file {
 	rm $testroot/wt/alpha
 
 	echo "!  alpha" > $testroot/stdout.expected
-	echo "Already up-to-date" >> $testroot/stdout.expected
+	echo -n "Updated to commit " >> $testroot/stdout.expected
+	git_show_head $testroot/repo >> $testroot/stdout.expected
+	echo >> $testroot/stdout.expected
 	(cd $testroot/wt && got update > $testroot/stdout)
 
 	cmp $testroot/stdout.expected $testroot/stdout